summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_aggregator.cc
diff options
context:
space:
mode:
authorweiliangc@chromium.org <weiliangc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 15:39:41 +0000
committerweiliangc@chromium.org <weiliangc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-07 15:39:41 +0000
commit9be1adc83cd60051957268b4aa6517cf2c23fbbb (patch)
tree7930ff16a9ead5412d0a5a10dd325e4b575a6c87 /cc/surfaces/surface_aggregator.cc
parentaf5e7996e4e5e60ea67512143a226aac952a695d (diff)
downloadchromium_src-9be1adc83cd60051957268b4aa6517cf2c23fbbb.zip
chromium_src-9be1adc83cd60051957268b4aa6517cf2c23fbbb.tar.gz
chromium_src-9be1adc83cd60051957268b4aa6517cf2c23fbbb.tar.bz2
Create SharedQuadState on RenderPass
Instead of creating SharedQuadState on layers and pass ownership around, create SharedQuadState on RenderPass and only pass the raw pointer to layers. Also let QuadCuller hold pointer to RenderPass instead of two points to DrawQuadList and SharedQuadStateList that is owned by RenderPass. BUG=344962 TEST=cc_unittests Review URL: https://codereview.chromium.org/265823015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/surfaces/surface_aggregator.cc')
-rw-r--r--cc/surfaces/surface_aggregator.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index 5b108bb..6b2178d 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -131,10 +131,12 @@ void SurfaceAggregator::HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
}
void SurfaceAggregator::CopySharedQuadState(
- const SharedQuadState& source_sqs,
+ const SharedQuadState* source_sqs,
const gfx::Transform& content_to_target_transform,
- SharedQuadStateList* dest_sqs_list) {
- scoped_ptr<SharedQuadState> copy_shared_quad_state = source_sqs.Copy();
+ RenderPass* dest_render_pass) {
+ SharedQuadState* copy_shared_quad_state =
+ dest_render_pass->CreateAndAppendSharedQuadState();
+ copy_shared_quad_state->CopyFrom(source_sqs);
// content_to_target_transform contains any transformation that may exist
// between the context that these quads are being copied from (i.e. the
// surface's draw transform when aggregated from within a surface) to the
@@ -143,7 +145,6 @@ void SurfaceAggregator::CopySharedQuadState(
// transform is not identity.
copy_shared_quad_state->content_to_target_transform.ConcatTransform(
content_to_target_transform);
- dest_sqs_list->push_back(copy_shared_quad_state.Pass());
}
void SurfaceAggregator::CopyQuadsToPass(
@@ -167,9 +168,8 @@ void SurfaceAggregator::CopyQuadsToPass(
HandleSurfaceQuad(surface_quad, dest_pass);
} else {
if (quad->shared_quad_state != last_copied_source_shared_quad_state) {
- CopySharedQuadState(*quad->shared_quad_state,
- content_to_target_transform,
- &dest_pass->shared_quad_state_list);
+ CopySharedQuadState(
+ quad->shared_quad_state, content_to_target_transform, dest_pass);
last_copied_source_shared_quad_state = quad->shared_quad_state;
}
if (quad->material == DrawQuad::RENDER_PASS) {