| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 DetermineIfSolidColor(); | 116 DetermineIfSolidColor(); |
| 117 display_list_->EmitTraceSnapshot(); | 117 display_list_->EmitTraceSnapshot(); |
| 118 | 118 |
| 119 display_list_->CreateAndCacheSkPicture(); | 119 display_list_->CreateAndCacheSkPicture(); |
| 120 if (gather_pixel_refs_) | 120 if (gather_pixel_refs_) |
| 121 display_list_->GatherPixelRefs(grid_cell_size_); | 121 display_list_->GatherPixelRefs(grid_cell_size_); |
| 122 | 122 |
| 123 return true; | 123 return true; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void DisplayListRecordingSource::DidMoveToNewCompositor() { | |
| 127 // No invalidation history to worry about here. | |
| 128 } | |
| 129 | |
| 130 gfx::Size DisplayListRecordingSource::GetSize() const { | 126 gfx::Size DisplayListRecordingSource::GetSize() const { |
| 131 return size_; | 127 return size_; |
| 132 } | 128 } |
| 133 | 129 |
| 134 void DisplayListRecordingSource::SetEmptyBounds() { | 130 void DisplayListRecordingSource::SetEmptyBounds() { |
| 135 size_ = gfx::Size(); | 131 size_ = gfx::Size(); |
| 136 Clear(); | 132 Clear(); |
| 137 } | 133 } |
| 138 | 134 |
| 139 void DisplayListRecordingSource::SetSlowdownRasterScaleFactor(int factor) { | 135 void DisplayListRecordingSource::SetSlowdownRasterScaleFactor(int factor) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 181 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
| 186 } | 182 } |
| 187 | 183 |
| 188 void DisplayListRecordingSource::Clear() { | 184 void DisplayListRecordingSource::Clear() { |
| 189 recorded_viewport_ = gfx::Rect(); | 185 recorded_viewport_ = gfx::Rect(); |
| 190 display_list_ = NULL; | 186 display_list_ = NULL; |
| 191 is_solid_color_ = false; | 187 is_solid_color_ = false; |
| 192 } | 188 } |
| 193 | 189 |
| 194 } // namespace cc | 190 } // namespace cc |
| OLD | NEW |