diff options
author | reveman@google.com <reveman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 01:44:52 +0000 |
---|---|---|
committer | reveman@google.com <reveman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-18 01:44:52 +0000 |
commit | 1e5b6bf58a04ff80f1255090e91e196c8ba706fe (patch) | |
tree | cec52c032e71e74fd4a2855f62a5ad7dff114797 /cc/test/tiled_layer_test_common.cc | |
parent | 3513af8dda3c2d453bf9b438a36030754a558968 (diff) | |
download | chromium_src-1e5b6bf58a04ff80f1255090e91e196c8ba706fe.zip chromium_src-1e5b6bf58a04ff80f1255090e91e196c8ba706fe.tar.gz chromium_src-1e5b6bf58a04ff80f1255090e91e196c8ba706fe.tar.bz2 |
cc: Replace TextureUploader::Parameters with ResourceUpdate struct.
This is in preparation to reducing texture uploader classes and
simplifying the resource update system. Also moves accelerated
painting code to texture update controller. This doesn't change
the behavior of the compositor in any way.
BUG=
TEST=cc_unittests
Review URL: https://codereview.chromium.org/11183027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/tiled_layer_test_common.cc')
-rw-r--r-- | cc/test/tiled_layer_test_common.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/cc/test/tiled_layer_test_common.cc b/cc/test/tiled_layer_test_common.cc index 6316cf9..5d85d65 100644 --- a/cc/test/tiled_layer_test_common.cc +++ b/cc/test/tiled_layer_test_common.cc @@ -14,6 +14,8 @@ FakeLayerTextureUpdater::Texture::Texture(FakeLayerTextureUpdater* layer, scoped : LayerTextureUpdater::Texture(texture.Pass()) , m_layer(layer) { + m_bitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); + m_bitmap.allocPixels(); } FakeLayerTextureUpdater::Texture::~Texture() @@ -22,7 +24,9 @@ FakeLayerTextureUpdater::Texture::~Texture() void FakeLayerTextureUpdater::Texture::update(CCTextureUpdateQueue& queue, const IntRect&, const IntSize&, bool partialUpdate, CCRenderingStats&) { - TextureUploader::Parameters upload = { texture(), NULL, NULL, { IntRect(), IntRect(), IntSize() } }; + const IntRect rect(0, 0, 10, 10); + ResourceUpdate upload = ResourceUpdate::Create( + texture(), &m_bitmap, rect, rect, IntSize()); if (partialUpdate) queue.appendPartialUpload(upload); else @@ -149,9 +153,14 @@ void FakeTextureUploader::markPendingUploadsAsNonBlocking() { } -void FakeTextureUploader::uploadTexture(cc::CCResourceProvider* resourceProvider, Parameters upload) +void FakeTextureUploader::uploadTexture(CCResourceProvider* resourceProvider, + CCPrioritizedTexture* texture, + const SkBitmap*, + IntRect, + IntRect, + IntSize) { - upload.texture->acquireBackingTexture(resourceProvider); + texture->acquireBackingTexture(resourceProvider); } double FakeTextureUploader::estimatedTexturesPerSecond() |