Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Side by Side Diff: cc/playback/display_list_recording_source.cc

Issue 1158553004: cc: Cull DrawingDisplayItems outside of the raster playback rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cull: . Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/playback/display_list_raster_source.cc ('k') | cc/playback/drawing_display_item.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « cc/playback/display_list_raster_source.cc ('k') | cc/playback/drawing_display_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698