diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 03:56:58 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-01 03:56:58 +0000 |
commit | 3c0a63c22fac0ae07d5682826b6b4af9d8473eb1 (patch) | |
tree | 3f424fe04f0374d9f700c56634915c03a5b34506 /cc/texture_draw_quad.cc | |
parent | b6d0cd9a7c38055a9e719e7ac3d90fc1aaa3cddb (diff) | |
download | chromium_src-3c0a63c22fac0ae07d5682826b6b4af9d8473eb1.zip chromium_src-3c0a63c22fac0ae07d5682826b6b4af9d8473eb1.tar.gz chromium_src-3c0a63c22fac0ae07d5682826b6b4af9d8473eb1.tar.bz2 |
cc: Make a general iterator for DrawQuad resources.
The DrawQuad::AppendResources function needs to iterate over
all resources in the quads and do something with them. A similar
pattern will be needed for the delegated renderer layer to
iterate over all resources and remap them into the parent
comspositor's namespace.
This CL renames AppendResources into IterateResources which
calls a callback method for each resource, and allows that
method to change the id of the given resource.
Tests:
DrawQuadIteratorTest.CheckerboardDrawQuad
DrawQuadIteratorTest.DebugBorderDrawQuad
DrawQuadIteratorTest.IOSurfaceDrawQuad
DrawQuadIteratorTest.RenderPassDrawQuad
DrawQuadIteratorTest.SolidColorDrawQuad
DrawQuadIteratorTest.StreamVideoDrawQuad
DrawQuadIteratorTest.TextureDrawQuad
DrawQuadIteratorTest.TileDrawQuad
DrawQuadIteratorTest.YUVVideoDrawQuad
R=piman
BUG=123444
Review URL: https://chromiumcodereview.appspot.com/12381027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/texture_draw_quad.cc')
-rw-r--r-- | cc/texture_draw_quad.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/texture_draw_quad.cc b/cc/texture_draw_quad.cc index 2f48686..03f89e2 100644 --- a/cc/texture_draw_quad.cc +++ b/cc/texture_draw_quad.cc @@ -65,9 +65,9 @@ void TextureDrawQuad::SetAll(const SharedQuadState* shared_quad_state, this->flipped = flipped; } -void TextureDrawQuad::AppendResources( - ResourceProvider::ResourceIdArray* resources) { - resources->push_back(resource_id); +void TextureDrawQuad::IterateResources( + const ResourceIteratorCallback& callback) { + resource_id = callback.Run(resource_id); } const TextureDrawQuad* TextureDrawQuad::MaterialCast(const DrawQuad* quad) { |