summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_aggregator.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 20:09:03 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-11 20:09:03 +0000
commit6fae8a38608b2c3045ab9d177de1a61f3aa73917 (patch)
treeb43bb918797048d8f4028015d966eb5c799932a4 /cc/surfaces/surface_aggregator.h
parentedef1c25eb44529879f759b46719bfed1fdfe4ff (diff)
downloadchromium_src-6fae8a38608b2c3045ab9d177de1a61f3aa73917.zip
chromium_src-6fae8a38608b2c3045ab9d177de1a61f3aa73917.tar.gz
chromium_src-6fae8a38608b2c3045ab9d177de1a61f3aa73917.tar.bz2
Pixel tests and some shared quad state fixups
This adds some pixel tests for the output of SurfaceAggregator and fixes several issues related to shared quad state management. This also concatenates the transform for the surface draw quad with the quads aggregated into the root draw pass of the referenced surface. Shared quad state mapping is a little bit nontrivial when doing aggregation since we copy the shared quad state entries from the aggregated frame's root pass into the shared quad state list of the pass containing the surface quad. When doing multiple levels of aggregation the relationship between the shared quad list offset from the aggregated pass to the destination pass gets tricky. Here's how this patch handles things: Root surface root pass: shared_quad_state_list: [A], [B] quad_list: [Quad using (A)], [Quad using (A)], [Surface 1], [Quad using (B)] Surface 1 root pass: shared_quad_state_list: [C], [D] quad_list: [Quad using (C)], [Surface 2], [Surface 3], [Quad using (D)] Surface 2 root pass: shared_quad_state_list: [E] quad_list: [Quad using (E)] Surface 3 root pass: shared_quad_state_list: [F] quad_list: [Quad using (F)] We append the shared quad stats to the aggregated pass' list as we encounter the quads that reference them, so the final aggregated frame looks like this: Aggregated frame root pass: shared_quad_state_list: [A], [C], [E], [F], [D], [B] quad_list: [Quad using (A)], [Quad using (A)], [Quad using (C)], [Quad using (E)], [Quad using (F)], [Quad using (D)], [Quad using (B)] Note that there's no shared quad state for the surface quads in the final shared quad state list. We use the transform and other properties from the surface quad's shared quad state when aggregating, but don't need them beyond aggregation. BUG=334876 Review URL: https://codereview.chromium.org/142863015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/surfaces/surface_aggregator.h')
-rw-r--r--cc/surfaces/surface_aggregator.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cc/surfaces/surface_aggregator.h b/cc/surfaces/surface_aggregator.h
index aa0fd85..9ee3d11 100644
--- a/cc/surfaces/surface_aggregator.h
+++ b/cc/surfaces/surface_aggregator.h
@@ -33,8 +33,12 @@ class CC_SURFACES_EXPORT SurfaceAggregator {
void HandleSurfaceQuad(const SurfaceDrawQuad* surface_quad,
RenderPass* dest_pass);
+ void CopySharedQuadState(const SharedQuadState& source_sqs,
+ const gfx::Transform& content_to_target_transform,
+ SharedQuadStateList* dest_sqs_list);
void CopyQuadsToPass(const QuadList& source_quad_list,
const SharedQuadStateList& source_shared_quad_state_list,
+ const gfx::Transform& content_to_target_transform,
RenderPass* dest_pass,
int surface_id);
void CopyPasses(const RenderPassList& source_pass_list, int surface_id);