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/animation/transform_operations.h" | 10 #include "cc/animation/transform_operations.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 content_bounds); | 81 content_bounds); |
82 } | 82 } |
83 | 83 |
84 class MockContentLayerClient : public ContentLayerClient { | 84 class MockContentLayerClient : public ContentLayerClient { |
85 public: | 85 public: |
86 MockContentLayerClient() {} | 86 MockContentLayerClient() {} |
87 virtual ~MockContentLayerClient() {} | 87 virtual ~MockContentLayerClient() {} |
88 virtual void PaintContents( | 88 virtual void PaintContents( |
89 SkCanvas* canvas, | 89 SkCanvas* canvas, |
90 const gfx::Rect& clip, | 90 const gfx::Rect& clip, |
| 91 bool can_paint_lcd_text, |
91 gfx::RectF* opaque, | 92 gfx::RectF* opaque, |
92 ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE {} | 93 ContentLayerClient::GraphicsContextStatus gc_status) OVERRIDE {} |
93 virtual void DidChangeLayerCanUseLCDText() OVERRIDE {} | 94 virtual bool PaintsLCDText() const OVERRIDE { return false; } |
94 virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } | 95 virtual bool FillsBoundsCompletely() const OVERRIDE { return false; } |
95 }; | 96 }; |
96 | 97 |
97 scoped_refptr<ContentLayer> CreateDrawableContentLayer( | 98 scoped_refptr<ContentLayer> CreateDrawableContentLayer( |
98 ContentLayerClient* delegate) { | 99 ContentLayerClient* delegate) { |
99 scoped_refptr<ContentLayer> to_return = ContentLayer::Create(delegate); | 100 scoped_refptr<ContentLayer> to_return = ContentLayer::Create(delegate); |
100 to_return->SetIsDrawable(true); | 101 to_return->SetIsDrawable(true); |
101 return to_return; | 102 return to_return; |
102 } | 103 } |
103 | 104 |
(...skipping 8203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8307 expected.insert(child_raw); | 8308 expected.insert(child_raw); |
8308 expected.insert(grand_child1_raw); | 8309 expected.insert(grand_child1_raw); |
8309 expected.insert(grand_child2_raw); | 8310 expected.insert(grand_child2_raw); |
8310 | 8311 |
8311 actual.clear(); | 8312 actual.clear(); |
8312 GatherDrawnLayers(render_surface_layer_list_impl(), &actual); | 8313 GatherDrawnLayers(render_surface_layer_list_impl(), &actual); |
8313 EXPECT_EQ(expected, actual); | 8314 EXPECT_EQ(expected, actual); |
8314 } | 8315 } |
8315 } // namespace | 8316 } // namespace |
8316 } // namespace cc | 8317 } // namespace cc |
OLD | NEW |