| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |