summaryrefslogtreecommitdiffstats
path: root/cc/layers/io_surface_layer_impl.cc
diff options
context:
space:
mode:
authorweiliangc@chromium.org <weiliangc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-03 18:54:34 +0000
committerweiliangc@chromium.org <weiliangc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-03 18:54:34 +0000
commitf7030c34dd9efa5710b503d88e37b7e848a436ce (patch)
tree1482a8105f389ae2244b2c03f25d3dd55b2b2adc /cc/layers/io_surface_layer_impl.cc
parent405cb61dc2d5b8969b69d005e57873a239e5d89c (diff)
downloadchromium_src-f7030c34dd9efa5710b503d88e37b7e848a436ce.zip
chromium_src-f7030c34dd9efa5710b503d88e37b7e848a436ce.tar.gz
chromium_src-f7030c34dd9efa5710b503d88e37b7e848a436ce.tar.bz2
Create DrawQuad in RenderPass and only give out raw pointer to layers
Instead of each layer calling Create function on DrawQuad and pass ownership around, create DrawQuad in RenderPass and only pass the raw pointer to layers. BUG=344962 TEST=cc_unittests Review URL: https://codereview.chromium.org/369623002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281306 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/io_surface_layer_impl.cc')
-rw-r--r--cc/layers/io_surface_layer_impl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/layers/io_surface_layer_impl.cc b/cc/layers/io_surface_layer_impl.cc
index 8f6c46c..a741cde 100644
--- a/cc/layers/io_surface_layer_impl.cc
+++ b/cc/layers/io_surface_layer_impl.cc
@@ -82,7 +82,8 @@ void IOSurfaceLayerImpl::AppendQuads(
if (visible_quad_rect.IsEmpty())
return;
- scoped_ptr<IOSurfaceDrawQuad> quad = IOSurfaceDrawQuad::Create();
+ IOSurfaceDrawQuad* quad =
+ render_pass->CreateAndAppendDrawQuad<IOSurfaceDrawQuad>();
quad->SetNew(shared_quad_state,
quad_rect,
opaque_rect,
@@ -90,7 +91,6 @@ void IOSurfaceLayerImpl::AppendQuads(
io_surface_size_,
io_surface_resource_id_,
IOSurfaceDrawQuad::FLIPPED);
- render_pass->AppendDrawQuad(quad.PassAs<DrawQuad>());
}
void IOSurfaceLayerImpl::ReleaseResources() {