/** * @inheritDoc. */ void BrowserWindow::onPaint(Berkelium::Window *win, const unsigned char *sourceBuffer, const Berkelium::Rect &sourceBufferRect, size_t numCopyRects, const Berkelium::Rect *copyRects, int dx, int dy, const Berkelium::Rect &scrollRect) { const Ogre::HardwarePixelBufferSharedPtr textureBuffer = m_texture->getBuffer(); const Ogre::PixelBox srcBox = Ogre::PixelBox(rectToBox(sourceBufferRect), Ogre::PF_BYTE_BGRA, const_cast<unsigned char*>(sourceBuffer)); for(int i = 0; i < numCopyRects; i++) { const Ogre::Box destBox = rectToBox(copyRects[i]); textureBuffer->blitFromMemory(srcBox.getSubVolume(destBox), destBox); } }
void HTML::Paint(Ogre::HardwarePixelBufferSharedPtr pixelBuffer, const unsigned char*srcBuffer, const Berkelium::Rect& srcRect, size_t num_copy_rects, const Berkelium::Rect *copy_rects) { /**/ const Ogre::PixelBox srcBox = Ogre::PixelBox(ToBox(srcRect), Ogre::PF_BYTE_BGRA, const_cast<unsigned char*>(srcBuffer)); for(unsigned int i = 0; i < num_copy_rects; i++) { const Ogre::Box destBox = ToBox(copy_rects[i]); pixelBuffer->blitFromMemory(srcBox.getSubVolume(destBox), destBox); } }