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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "cc/playback/clip_display_item.h" | 9 #include "cc/playback/clip_display_item.h" |
10 #include "cc/playback/display_item_list_settings.h" | 10 #include "cc/playback/display_item_list_settings.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 SkPaint paint; | 94 SkPaint paint; |
95 paint.setColor(red ? SK_ColorRED : SK_ColorBLUE); | 95 paint.setColor(red ? SK_ColorRED : SK_ColorBLUE); |
96 canvas = sk_ref_sp(recorder.beginRecording(gfx::RectToSkRect(draw_rect))); | 96 canvas = sk_ref_sp(recorder.beginRecording(gfx::RectToSkRect(draw_rect))); |
97 canvas->drawIRect(gfx::RectToSkIRect(draw_rect), paint); | 97 canvas->drawIRect(gfx::RectToSkIRect(draw_rect), paint); |
98 display_list->CreateAndAppendItem<DrawingDisplayItem>( | 98 display_list->CreateAndAppendItem<DrawingDisplayItem>( |
99 draw_rect, recorder.finishRecordingAsPicture()); | 99 draw_rect, recorder.finishRecordingAsPicture()); |
100 draw_rect.Inset(1, 1); | 100 draw_rect.Inset(1, 1); |
101 } | 101 } |
102 } | 102 } |
103 | 103 |
104 | |
105 display_list->Finalize(); | 104 display_list->Finalize(); |
106 return display_list; | 105 return display_list; |
107 } | 106 } |
108 | 107 |
109 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } | 108 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } |
110 | 109 |
111 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { | 110 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { |
112 return reported_memory_usage_; | 111 return reported_memory_usage_; |
113 } | 112 } |
114 | 113 |
115 } // namespace cc | 114 } // namespace cc |
OLD | NEW |