OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/resources/display_list_recording_source.h" | 5 #include "cc/resources/display_list_recording_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "cc/base/region.h" | 9 #include "cc/base/region.h" |
10 #include "cc/layers/content_layer_client.h" | 10 #include "cc/layers/content_layer_client.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 for (int i = 0; i < repeat_count; ++i) { | 105 for (int i = 0; i < repeat_count; ++i) { |
106 display_list_ = painter->PaintContentsToDisplayList(recorded_viewport_, | 106 display_list_ = painter->PaintContentsToDisplayList(recorded_viewport_, |
107 painting_control); | 107 painting_control); |
108 } | 108 } |
109 display_list_->set_layer_rect(recorded_viewport_); | 109 display_list_->set_layer_rect(recorded_viewport_); |
110 is_suitable_for_gpu_rasterization_ = | 110 is_suitable_for_gpu_rasterization_ = |
111 display_list_->IsSuitableForGpuRasterization(); | 111 display_list_->IsSuitableForGpuRasterization(); |
112 | 112 |
113 DetermineIfSolidColor(); | 113 DetermineIfSolidColor(); |
114 display_list_->EmitTraceSnapshot(); | 114 display_list_->EmitTraceSnapshot(); |
| 115 |
| 116 display_list_->CreateAndCacheSkPicture(); |
| 117 |
115 return true; | 118 return true; |
116 } | 119 } |
117 | 120 |
118 void DisplayListRecordingSource::DidMoveToNewCompositor() { | 121 void DisplayListRecordingSource::DidMoveToNewCompositor() { |
119 // No invalidation history to worry about here. | 122 // No invalidation history to worry about here. |
120 } | 123 } |
121 | 124 |
122 gfx::Size DisplayListRecordingSource::GetSize() const { | 125 gfx::Size DisplayListRecordingSource::GetSize() const { |
123 return size_; | 126 return size_; |
124 } | 127 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 176 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
174 } | 177 } |
175 | 178 |
176 void DisplayListRecordingSource::Clear() { | 179 void DisplayListRecordingSource::Clear() { |
177 recorded_viewport_ = gfx::Rect(); | 180 recorded_viewport_ = gfx::Rect(); |
178 display_list_ = NULL; | 181 display_list_ = NULL; |
179 is_solid_color_ = false; | 182 is_solid_color_ = false; |
180 } | 183 } |
181 | 184 |
182 } // namespace cc | 185 } // namespace cc |
OLD | NEW |