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/playback/display_list_recording_source.h" | 5 #include "cc/playback/display_list_recording_source.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "cc/base/histograms.h" | 9 #include "cc/base/histograms.h" |
10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void DisplayListRecordingSource::DetermineIfSolidColor() { | 186 void DisplayListRecordingSource::DetermineIfSolidColor() { |
187 DCHECK(display_list_.get()); | 187 DCHECK(display_list_.get()); |
188 is_solid_color_ = false; | 188 is_solid_color_ = false; |
189 solid_color_ = SK_ColorTRANSPARENT; | 189 solid_color_ = SK_ColorTRANSPARENT; |
190 | 190 |
191 if (display_list_->ApproximateOpCount() > kOpCountThatIsOkToAnalyze) | 191 if (display_list_->ApproximateOpCount() > kOpCountThatIsOkToAnalyze) |
192 return; | 192 return; |
193 | 193 |
194 gfx::Size layer_size = GetSize(); | 194 gfx::Size layer_size = GetSize(); |
195 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height()); | 195 skia::AnalysisCanvas canvas(layer_size.width(), layer_size.height()); |
196 display_list_->Raster(&canvas, nullptr, 1.f); | 196 display_list_->Raster(&canvas, nullptr, gfx::Rect(), 1.f); |
197 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 197 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
198 } | 198 } |
199 | 199 |
200 void DisplayListRecordingSource::Clear() { | 200 void DisplayListRecordingSource::Clear() { |
201 recorded_viewport_ = gfx::Rect(); | 201 recorded_viewport_ = gfx::Rect(); |
202 display_list_ = NULL; | 202 display_list_ = NULL; |
203 is_solid_color_ = false; | 203 is_solid_color_ = false; |
204 } | 204 } |
205 | 205 |
206 } // namespace cc | 206 } // namespace cc |
OLD | NEW |