diff options
author | thildebr@chromium.org <thildebr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-19 06:49:28 +0000 |
---|---|---|
committer | thildebr@chromium.org <thildebr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-19 06:49:28 +0000 |
commit | a9d4d4f8ff5b837ff736c6019aae93386582e4d3 (patch) | |
tree | 3c2268be6b030bba8385dba19435ac002ed7ae92 /cc/test | |
parent | 696bfd03c9ca0be794b3189cea1f6bd7ed16d5ba (diff) | |
download | chromium_src-a9d4d4f8ff5b837ff736c6019aae93386582e4d3.zip chromium_src-a9d4d4f8ff5b837ff736c6019aae93386582e4d3.tar.gz chromium_src-a9d4d4f8ff5b837ff736c6019aae93386582e4d3.tar.bz2 |
Rendering context information added to SharedQuadState
Context IDs given to DrawQuads to identify when a rendering context
changes, and whether or not a DrawQuad is in a 3D sorting context.
Review URL: https://codereview.chromium.org/332873005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/layer_tree_host_common_test.h | 2 | ||||
-rw-r--r-- | cc/test/layer_tree_json_parser.cc | 6 | ||||
-rw-r--r-- | cc/test/render_pass_test_common.cc | 6 | ||||
-rw-r--r-- | cc/test/render_pass_test_utils.cc | 22 |
4 files changed, 25 insertions, 11 deletions
diff --git a/cc/test/layer_tree_host_common_test.h b/cc/test/layer_tree_host_common_test.h index 38dd85a..67eb6cc 100644 --- a/cc/test/layer_tree_host_common_test.h +++ b/cc/test/layer_tree_host_common_test.h @@ -43,7 +43,7 @@ class LayerTreeHostCommonTestBase { layer->SetPosition(position); layer->SetBounds(bounds); layer->SetShouldFlattenTransform(flatten_transform); - layer->SetIs3dSorted(is_3d_sorted); + layer->Set3dSortingContextId(is_3d_sorted ? 1 : 0); } void SetLayerPropertiesForTesting(Layer* layer, diff --git a/cc/test/layer_tree_json_parser.cc b/cc/test/layer_tree_json_parser.cc index e94bbea..f177e118 100644 --- a/cc/test/layer_tree_json_parser.cc +++ b/cc/test/layer_tree_json_parser.cc @@ -130,8 +130,10 @@ scoped_refptr<Layer> ParseTreeFromValue(base::Value* val, new_layer->SetHaveScrollEventHandlers(scroll_handler); bool is_3d_sorted; - if (dict->GetBoolean("Is3DSorted", &is_3d_sorted)) - new_layer->SetIs3dSorted(is_3d_sorted); + if (dict->GetBoolean("Is3DSorted", &is_3d_sorted)) { + // A non-zero context ID will put the layer into a 3D sorting context + new_layer->Set3dSortingContextId(1); + } if (dict->HasKey("TouchRegion")) { success &= dict->GetList("TouchRegion", &list); diff --git a/cc/test/render_pass_test_common.cc b/cc/test/render_pass_test_common.cc index dd58b43..9cbb987 100644 --- a/cc/test/render_pass_test_common.cc +++ b/cc/test/render_pass_test_common.cc @@ -80,7 +80,8 @@ void TestRenderPass::AppendOneOfEveryQuadType( rect, false, 1, - SkXfermode::kSrcOver_Mode); + SkXfermode::kSrcOver_Mode, + 0); scoped_ptr<CheckerboardDrawQuad> checkerboard_quad = CheckerboardDrawQuad::Create(); @@ -197,7 +198,8 @@ void TestRenderPass::AppendOneOfEveryQuadType( rect, false, 1, - SkXfermode::kSrcOver_Mode); + SkXfermode::kSrcOver_Mode, + 0); scoped_ptr<TileDrawQuad> tile_quad = TileDrawQuad::Create(); tile_quad->SetNew(shared_state2, diff --git a/cc/test/render_pass_test_utils.cc b/cc/test/render_pass_test_utils.cc index 43cbf1f..7ea3a7a 100644 --- a/cc/test/render_pass_test_utils.cc +++ b/cc/test/render_pass_test_utils.cc @@ -37,7 +37,8 @@ SolidColorDrawQuad* AddQuad(TestRenderPass* pass, rect, false, 1, - SkXfermode::kSrcOver_Mode); + SkXfermode::kSrcOver_Mode, + 0); scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); quad->SetNew(shared_state, rect, rect, color, false); SolidColorDrawQuad* quad_ptr = quad.get(); @@ -55,7 +56,8 @@ SolidColorDrawQuad* AddClippedQuad(TestRenderPass* pass, rect, true, 1, - SkXfermode::kSrcOver_Mode); + SkXfermode::kSrcOver_Mode, + 0); scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); quad->SetNew(shared_state, rect, rect, color, false); SolidColorDrawQuad* quad_ptr = quad.get(); @@ -68,8 +70,14 @@ SolidColorDrawQuad* AddTransformedQuad(TestRenderPass* pass, SkColor color, const gfx::Transform& transform) { SharedQuadState* shared_state = pass->CreateAndAppendSharedQuadState(); - shared_state->SetAll( - transform, rect.size(), rect, rect, false, 1, SkXfermode::kSrcOver_Mode); + shared_state->SetAll(transform, + rect.size(), + rect, + rect, + false, + 1, + SkXfermode::kSrcOver_Mode, + 0); scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); quad->SetNew(shared_state, rect, rect, color, false); SolidColorDrawQuad* quad_ptr = quad.get(); @@ -87,7 +95,8 @@ void AddRenderPassQuad(TestRenderPass* to_pass, output_rect, false, 1, - SkXfermode::kSrcOver_Mode); + SkXfermode::kSrcOver_Mode, + 0); scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); quad->SetNew(shared_state, output_rect, @@ -115,7 +124,8 @@ void AddRenderPassQuad(TestRenderPass* to_pass, output_rect, false, 1, - SkXfermode::kSrcOver_Mode); + SkXfermode::kSrcOver_Mode, + 0); scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); quad->SetNew(shared_state, output_rect, |