Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: cc/layers/render_surface_unittest.cc

Issue 2018833002: cc : Delete LayerImpl::opacity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/scrollbar_layer_impl_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/append_quads_data.h" 5 #include "cc/layers/append_quads_data.h"
6 #include "cc/layers/layer_impl.h" 6 #include "cc/layers/layer_impl.h"
7 #include "cc/layers/render_pass_sink.h" 7 #include "cc/layers/render_pass_sink.h"
8 #include "cc/layers/render_surface_impl.h" 8 #include "cc/layers/render_surface_impl.h"
9 #include "cc/quads/shared_quad_state.h" 9 #include "cc/quads/shared_quad_state.h"
10 #include "cc/test/fake_impl_task_runner_provider.h" 10 #include "cc/test/fake_impl_task_runner_provider.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 RenderSurfaceImpl* render_surface = owning_layer->render_surface(); 49 RenderSurfaceImpl* render_surface = owning_layer->render_surface();
50 gfx::Rect test_rect(3, 4, 5, 6); 50 gfx::Rect test_rect(3, 4, 5, 6);
51 host_impl.active_tree()->ResetAllChangeTracking(); 51 host_impl.active_tree()->ResetAllChangeTracking();
52 52
53 // Currently, the content_rect, clip_rect, and 53 // Currently, the content_rect, clip_rect, and
54 // owning_layer->layerPropertyChanged() are the only sources of change. 54 // owning_layer->layerPropertyChanged() are the only sources of change.
55 EXECUTE_AND_VERIFY_SURFACE_CHANGED(render_surface->SetClipRect(test_rect)); 55 EXECUTE_AND_VERIFY_SURFACE_CHANGED(render_surface->SetClipRect(test_rect));
56 EXECUTE_AND_VERIFY_SURFACE_CHANGED( 56 EXECUTE_AND_VERIFY_SURFACE_CHANGED(
57 render_surface->SetContentRectForTesting(test_rect)); 57 render_surface->SetContentRectForTesting(test_rect));
58 58
59 owning_layer->SetOpacity(0.5f); 59 owning_layer->OnOpacityAnimated(0.5f);
60 EXPECT_TRUE(render_surface->SurfacePropertyChanged()); 60 EXPECT_TRUE(render_surface->SurfacePropertyChanged());
61 host_impl.active_tree()->ResetAllChangeTracking(); 61 host_impl.active_tree()->ResetAllChangeTracking();
62 62
63 // Setting the surface properties to the same values again should not be 63 // Setting the surface properties to the same values again should not be
64 // considered "change". 64 // considered "change".
65 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE( 65 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(
66 render_surface->SetClipRect(test_rect)); 66 render_surface->SetClipRect(test_rect));
67 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE( 67 EXECUTE_AND_VERIFY_SURFACE_DID_NOT_CHANGE(
68 render_surface->SetContentRectForTesting(test_rect)); 68 render_surface->SetContentRectForTesting(test_rect));
69 69
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 ASSERT_EQ(1u, pass_sink.RenderPasses().size()); 183 ASSERT_EQ(1u, pass_sink.RenderPasses().size());
184 RenderPass* pass = pass_sink.RenderPasses()[0].get(); 184 RenderPass* pass = pass_sink.RenderPasses()[0].get();
185 185
186 EXPECT_EQ(RenderPassId(2, 0), pass->id); 186 EXPECT_EQ(RenderPassId(2, 0), pass->id);
187 EXPECT_EQ(content_rect, pass->output_rect); 187 EXPECT_EQ(content_rect, pass->output_rect);
188 EXPECT_EQ(origin, pass->transform_to_root_target); 188 EXPECT_EQ(origin, pass->transform_to_root_target);
189 } 189 }
190 190
191 } // namespace 191 } // namespace
192 } // namespace cc 192 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/scrollbar_layer_impl_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698