OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/test/fake_content_layer_client.h" | 5 #include "cc/test/fake_content_layer_client.h" |
6 | 6 |
7 #include "cc/playback/clip_display_item.h" | 7 #include "cc/playback/clip_display_item.h" |
8 #include "cc/playback/display_item_list_settings.h" | 8 #include "cc/playback/display_item_list_settings.h" |
9 #include "cc/playback/drawing_display_item.h" | 9 #include "cc/playback/drawing_display_item.h" |
10 #include "cc/playback/transform_display_item.h" | 10 #include "cc/playback/transform_display_item.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 FakeContentLayerClient::FakeContentLayerClient() | 29 FakeContentLayerClient::FakeContentLayerClient() |
30 : fill_with_nonsolid_color_(false), | 30 : fill_with_nonsolid_color_(false), |
31 last_canvas_(nullptr), | 31 last_canvas_(nullptr), |
32 last_painting_control_(PAINTING_BEHAVIOR_NORMAL), | 32 last_painting_control_(PAINTING_BEHAVIOR_NORMAL), |
33 reported_memory_usage_(0) {} | 33 reported_memory_usage_(0) {} |
34 | 34 |
35 FakeContentLayerClient::~FakeContentLayerClient() { | 35 FakeContentLayerClient::~FakeContentLayerClient() { |
36 } | 36 } |
37 | 37 |
38 gfx::Rect FakeContentLayerClient::PaintableRegion() { | |
39 CHECK(bounds_set_); | |
enne (OOO)
2015/11/18 21:31:58
I get that you're trying to check that you covered
chrishtr
2015/11/18 22:33:11
Per offline conversation, there were actually a wh
| |
40 return gfx::Rect(bounds_); | |
41 } | |
42 | |
38 scoped_refptr<DisplayItemList> | 43 scoped_refptr<DisplayItemList> |
39 FakeContentLayerClient::PaintContentsToDisplayList( | 44 FakeContentLayerClient::PaintContentsToDisplayList( |
40 const gfx::Rect& clip, | 45 const gfx::Rect& clip, |
41 PaintingControlSetting painting_control) { | 46 PaintingControlSetting painting_control) { |
42 // Cached picture is used because unit tests expect to be able to | 47 // Cached picture is used because unit tests expect to be able to |
43 // use GatherPixelRefs. | 48 // use GatherPixelRefs. |
44 DisplayItemListSettings settings; | 49 DisplayItemListSettings settings; |
45 settings.use_cached_picture = true; | 50 settings.use_cached_picture = true; |
46 scoped_refptr<DisplayItemList> display_list = | 51 scoped_refptr<DisplayItemList> display_list = |
47 DisplayItemList::Create(clip, settings); | 52 DisplayItemList::Create(clip, settings); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
103 return display_list; | 108 return display_list; |
104 } | 109 } |
105 | 110 |
106 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } | 111 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } |
107 | 112 |
108 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { | 113 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { |
109 return reported_memory_usage_; | 114 return reported_memory_usage_; |
110 } | 115 } |
111 | 116 |
112 } // namespace cc | 117 } // namespace cc |
OLD | NEW |