Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2992)

Unified Diff: cc/ImageLayerChromium.cpp

Issue 11074009: cc: Remove LayerTextureUpdater::Texture::updateRect() callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/ImageLayerChromium.cpp
diff --git a/cc/ImageLayerChromium.cpp b/cc/ImageLayerChromium.cpp
index ce1621c3d64c1443115cec96d23c56836d5a8737..dfe33f479d94bac07ba3f5cde8745ef5c56c36f9 100644
--- a/cc/ImageLayerChromium.cpp
+++ b/cc/ImageLayerChromium.cpp
@@ -10,6 +10,7 @@
#include "base/compiler_specific.h"
#include "CCLayerTreeHost.h"
+#include "CCTextureUpdateQueue.h"
#include "LayerTextureUpdater.h"
#include "PlatformColor.h"
@@ -25,9 +26,9 @@ public:
{
}
- virtual void updateRect(CCResourceProvider* resourceProvider, const IntRect& sourceRect, const IntSize& destOffset) OVERRIDE
+ virtual void update(CCTextureUpdateQueue& queue, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate, CCRenderingStats&) OVERRIDE
{
- textureUpdater()->updateTextureRect(resourceProvider, texture(), sourceRect, destOffset);
+ textureUpdater()->updateTexture(queue, texture(), sourceRect, destOffset, partialUpdate);
}
private:
@@ -55,7 +56,7 @@ public:
LayerTextureUpdater::SampledTexelFormatRGBA : LayerTextureUpdater::SampledTexelFormatBGRA;
}
- void updateTextureRect(CCResourceProvider* resourceProvider, CCPrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset)
+ void updateTexture(CCTextureUpdateQueue& queue, CCPrioritizedTexture* texture, const IntRect& sourceRect, const IntSize& destOffset, bool partialUpdate)
{
// Source rect should never go outside the image pixels, even if this
// is requested because the texture extends outside the image.
@@ -65,8 +66,11 @@ public:
IntSize clippedDestOffset = destOffset + IntSize(clippedSourceRect.location() - sourceRect.location());
- SkAutoLockPixels lock(m_bitmap);
- texture->upload(resourceProvider, static_cast<const uint8_t*>(m_bitmap.getPixels()), imageRect, clippedSourceRect, clippedDestOffset);
+ TextureUploader::Parameters upload = { texture, &m_bitmap, NULL, { imageRect, clippedSourceRect, clippedDestOffset } };
+ if (partialUpdate)
+ queue.appendPartialUpload(upload);
+ else
+ queue.appendFullUpload(upload);
}
void setBitmap(const SkBitmap& bitmap)

Powered by Google App Engine
This is Rietveld 408576698