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

Unified Diff: cc/throttled_texture_uploader_unittest.cc

Issue 11074009: cc: Remove LayerTextureUpdater::Texture::updateRect() callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. 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
« no previous file with comments | « cc/throttled_texture_uploader.cc ('k') | cc/tiled_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/throttled_texture_uploader_unittest.cc
diff --git a/cc/throttled_texture_uploader_unittest.cc b/cc/throttled_texture_uploader_unittest.cc
index 5e03dcaddc5e4a60baa952e38a3e926044da1f78..ca60324ab7d0bc4490c2c519348f5e3d65778d62 100644
--- a/cc/throttled_texture_uploader_unittest.cc
+++ b/cc/throttled_texture_uploader_unittest.cc
@@ -6,6 +6,7 @@
#include "ThrottledTextureUploader.h"
+#include "CCPrioritizedTexture.h"
#include "Extensions3DChromium.h"
#include "FakeWebGraphicsContext3D.h"
#include "GraphicsContext3D.h"
@@ -43,26 +44,20 @@ private:
unsigned m_resultAvailable;
};
-class FakeTexture : public cc::LayerTextureUpdater::Texture {
-public:
- FakeTexture() : LayerTextureUpdater::Texture(
- CCPrioritizedTexture::create(NULL, IntSize(256,256), GL_RGBA)) {
- }
-
- virtual void updateRect(cc::CCResourceProvider* , const cc::IntRect&, const cc::IntSize&) OVERRIDE { }
-
-};
-
TEST(ThrottledTextureUploaderTest, NumBlockingUploads)
{
OwnPtr<FakeWebGraphicsContext3DWithQueryTesting> fakeContext(adoptPtr(new FakeWebGraphicsContext3DWithQueryTesting));
OwnPtr<ThrottledTextureUploader> uploader = ThrottledTextureUploader::create(fakeContext.get());
- OwnPtr<FakeTexture> texture = adoptPtr(new FakeTexture);
+ scoped_ptr<CCPrioritizedTexture> texture =
+ CCPrioritizedTexture::create(NULL, IntSize(256, 256), GL_RGBA);
TextureUploader::Parameters upload;
upload.texture = texture.get();
- upload.sourceRect = IntRect(IntPoint(0,0), texture->texture()->size());
- upload.destOffset = IntSize();
+ upload.bitmap = NULL;
+ upload.picture = NULL;
+ upload.geometry.contentRect = IntRect(IntPoint(0,0), texture->size());
+ upload.geometry.sourceRect = IntRect(IntPoint(0,0), texture->size());
+ upload.geometry.destOffset = IntSize();
fakeContext->setResultAvailable(0);
EXPECT_EQ(0, uploader->numBlockingUploads());
@@ -84,11 +79,15 @@ TEST(ThrottledTextureUploaderTest, MarkPendingUploadsAsNonBlocking)
{
OwnPtr<FakeWebGraphicsContext3DWithQueryTesting> fakeContext(adoptPtr(new FakeWebGraphicsContext3DWithQueryTesting));
OwnPtr<ThrottledTextureUploader> uploader = ThrottledTextureUploader::create(fakeContext.get());
- OwnPtr<FakeTexture> texture = adoptPtr(new FakeTexture);
+ scoped_ptr<CCPrioritizedTexture> texture =
+ CCPrioritizedTexture::create(NULL, IntSize(256, 256), GL_RGBA);
TextureUploader::Parameters upload;
upload.texture = texture.get();
- upload.sourceRect = IntRect(IntPoint(0,0), texture->texture()->size());
- upload.destOffset = IntSize();
+ upload.bitmap = NULL;
+ upload.picture = NULL;
+ upload.geometry.contentRect = IntRect(IntPoint(0,0), texture->size());
+ upload.geometry.sourceRect = IntRect(IntPoint(0,0), texture->size());
+ upload.geometry.destOffset = IntSize();
fakeContext->setResultAvailable(0);
EXPECT_EQ(0, uploader->numBlockingUploads());
« no previous file with comments | « cc/throttled_texture_uploader.cc ('k') | cc/tiled_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698