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

Side by Side Diff: cc/resources/picture_pile.cc

Issue 660333004: cc cleanup: Update paths to geometry headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 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/resources/picture_pile.h ('k') | cc/resources/picture_pile_base.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 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/resources/picture_pile.h" 5 #include "cc/resources/picture_pile.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
11 #include "cc/base/region.h" 11 #include "cc/base/region.h"
12 #include "cc/debug/rendering_stats_instrumentation.h" 12 #include "cc/debug/rendering_stats_instrumentation.h"
13 #include "cc/resources/picture_pile_impl.h"
14 #include "cc/resources/raster_worker_pool.h" 13 #include "cc/resources/raster_worker_pool.h"
15 #include "cc/resources/tile_priority.h" 14 #include "skia/ext/analysis_canvas.h"
16 15
17 namespace { 16 namespace {
18 // Layout pixel buffer around the visible layer rect to record. Any base 17 // Layout pixel buffer around the visible layer rect to record. Any base
19 // picture that intersects the visible layer rect expanded by this distance 18 // picture that intersects the visible layer rect expanded by this distance
20 // will be recorded. 19 // will be recorded.
21 const int kPixelDistanceToRecord = 8000; 20 const int kPixelDistanceToRecord = 8000;
22 // We don't perform solid color analysis on images that have more than 10 skia 21 // We don't perform solid color analysis on images that have more than 10 skia
23 // operations. 22 // operations.
24 const int kOpCountThatIsOkToAnalyze = 10; 23 const int kOpCountThatIsOkToAnalyze = 10;
25 24
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 if (it->second.GetPicture() != picture) 569 if (it->second.GetPicture() != picture)
571 return; 570 return;
572 } 571 }
573 skia::AnalysisCanvas canvas(recorded_viewport_.width(), 572 skia::AnalysisCanvas canvas(recorded_viewport_.width(),
574 recorded_viewport_.height()); 573 recorded_viewport_.height());
575 picture->Raster(&canvas, NULL, Region(), 1.0f); 574 picture->Raster(&canvas, NULL, Region(), 1.0f);
576 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); 575 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_);
577 } 576 }
578 577
579 } // namespace cc 578 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile.h ('k') | cc/resources/picture_pile_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698