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/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "cc/animation/layer_animation_controller.h" | 9 #include "cc/animation/layer_animation_controller.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 virtual ~LayerWithForcedDrawsContent() {} | 189 virtual ~LayerWithForcedDrawsContent() {} |
190 }; | 190 }; |
191 | 191 |
192 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } | 192 bool LayerWithForcedDrawsContent::DrawsContent() const { return true; } |
193 | 193 |
194 class MockContentLayerClient : public ContentLayerClient { | 194 class MockContentLayerClient : public ContentLayerClient { |
195 public: | 195 public: |
196 MockContentLayerClient() {} | 196 MockContentLayerClient() {} |
197 virtual ~MockContentLayerClient() {} | 197 virtual ~MockContentLayerClient() {} |
198 virtual void PaintContents(SkCanvas* canvas, | 198 virtual void PaintContents(SkCanvas* canvas, |
199 gfx::Rect clip, | 199 const gfx::Rect& clip, |
200 gfx::RectF* opaque) OVERRIDE {} | 200 gfx::RectF* opaque) OVERRIDE {} |
201 virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} | 201 virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} |
202 }; | 202 }; |
203 | 203 |
204 scoped_refptr<ContentLayer> CreateDrawableContentLayer( | 204 scoped_refptr<ContentLayer> CreateDrawableContentLayer( |
205 ContentLayerClient* delegate) { | 205 ContentLayerClient* delegate) { |
206 scoped_refptr<ContentLayer> to_return = ContentLayer::Create(delegate); | 206 scoped_refptr<ContentLayer> to_return = ContentLayer::Create(delegate); |
207 to_return->SetIsDrawable(true); | 207 to_return->SetIsDrawable(true); |
208 return to_return; | 208 return to_return; |
209 } | 209 } |
(...skipping 9530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9740 fixed_layer->draw_properties().screen_space_transform.To2dTranslation(), | 9740 fixed_layer->draw_properties().screen_space_transform.To2dTranslation(), |
9741 container_offset); | 9741 container_offset); |
9742 EXPECT_VECTOR_EQ(scroll_layer->draw_properties() | 9742 EXPECT_VECTOR_EQ(scroll_layer->draw_properties() |
9743 .screen_space_transform.To2dTranslation(), | 9743 .screen_space_transform.To2dTranslation(), |
9744 container_offset - rounded_scroll_delta); | 9744 container_offset - rounded_scroll_delta); |
9745 } | 9745 } |
9746 } | 9746 } |
9747 | 9747 |
9748 } // namespace | 9748 } // namespace |
9749 } // namespace cc | 9749 } // namespace cc |
OLD | NEW |