| Index: cc/bitmap_canvas_layer_texture_updater.cc
|
| diff --git a/cc/bitmap_canvas_layer_texture_updater.cc b/cc/bitmap_canvas_layer_texture_updater.cc
|
| index 3231b7d84a9e30173e23d3f9b5cb46b06f2826ac..a83c77b223a6f62d02004206760675e1871526e2 100644
|
| --- a/cc/bitmap_canvas_layer_texture_updater.cc
|
| +++ b/cc/bitmap_canvas_layer_texture_updater.cc
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "BitmapCanvasLayerTextureUpdater.h"
|
|
|
| +#include "CCTextureUpdateQueue.h"
|
| #include "LayerPainterChromium.h"
|
| #include "PlatformColor.h"
|
| #include "skia/ext/platform_canvas.h"
|
| @@ -25,9 +26,9 @@ BitmapCanvasLayerTextureUpdater::Texture::~Texture()
|
| {
|
| }
|
|
|
| -void BitmapCanvasLayerTextureUpdater::Texture::updateRect(CCResourceProvider* resourceProvider, const IntRect& sourceRect, const IntSize& destOffset)
|
| +void BitmapCanvasLayerTextureUpdater::Texture::update(CCTextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, CCRenderingStats&)
|
| {
|
| - textureUpdater()->updateTextureRect(resourceProvider, texture(), sourceRect, destOffset);
|
| + textureUpdater()->updateTexture(queue, texture(), sourceRect, destOffset, partialUpdate);
|
| }
|
|
|
| PassRefPtr<BitmapCanvasLayerTextureUpdater> BitmapCanvasLayerTextureUpdater::create(PassOwnPtr<LayerPainterChromium> painter)
|
| @@ -67,13 +68,13 @@ void BitmapCanvasLayerTextureUpdater::prepareToUpdate(const IntRect& contentRect
|
| paintContents(m_canvas.get(), contentRect, contentsWidthScale, contentsHeightScale, resultingOpaqueRect, stats);
|
| }
|
|
|
| -void BitmapCanvasLayerTextureUpdater::updateTextureRect(CCResourceProvider* resourceProvider, CCPrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset)
|
| +void BitmapCanvasLayerTextureUpdater::updateTexture(CCTextureUpdateQueue& queue, CCPrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate)
|
| {
|
| - const SkBitmap& bitmap = m_canvas->getDevice()->accessBitmap(false);
|
| - bitmap.lockPixels();
|
| -
|
| - texture->upload(resourceProvider, static_cast<const uint8_t*>(bitmap.getPixels()), contentRect(), sourceRect, destOffset);
|
| - bitmap.unlockPixels();
|
| + TextureUploader::Parameters upload = { texture, &m_canvas->getDevice()->accessBitmap(false), NULL, { contentRect(), sourceRect, destOffset } };
|
| + if (partialUpdate)
|
| + queue.appendPartialUpload(upload);
|
| + else
|
| + queue.appendFullUpload(upload);
|
| }
|
|
|
| void BitmapCanvasLayerTextureUpdater::setOpaque(bool opaque)
|
|
|