OLD | NEW |
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 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 } | 142 } |
143 | 143 |
144 *record_rects = vertical_clustering; | 144 *record_rects = vertical_clustering; |
145 return vertical_density; | 145 return vertical_density; |
146 } | 146 } |
147 | 147 |
148 } // namespace | 148 } // namespace |
149 | 149 |
150 namespace cc { | 150 namespace cc { |
151 | 151 |
152 PicturePile::PicturePile() | 152 PicturePile::PicturePile() : is_suitable_for_gpu_rasterization_(true) { |
153 : is_suitable_for_gpu_rasterization_(true), | |
154 is_solid_color_(true), | |
155 solid_color_(SK_ColorTRANSPARENT) { | |
156 } | 153 } |
157 | 154 |
158 PicturePile::~PicturePile() { | 155 PicturePile::~PicturePile() { |
159 } | 156 } |
160 | 157 |
161 bool PicturePile::UpdateAndExpandInvalidation( | 158 bool PicturePile::UpdateAndExpandInvalidation( |
162 ContentLayerClient* painter, | 159 ContentLayerClient* painter, |
163 Region* invalidation, | 160 Region* invalidation, |
164 SkColor background_color, | 161 SkColor background_color, |
165 bool contents_opaque, | 162 bool contents_opaque, |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 if (it->second.GetPicture() != picture) | 554 if (it->second.GetPicture() != picture) |
558 return; | 555 return; |
559 } | 556 } |
560 skia::AnalysisCanvas canvas(recorded_viewport_.width(), | 557 skia::AnalysisCanvas canvas(recorded_viewport_.width(), |
561 recorded_viewport_.height()); | 558 recorded_viewport_.height()); |
562 picture->Raster(&canvas, NULL, Region(), 1.0f); | 559 picture->Raster(&canvas, NULL, Region(), 1.0f); |
563 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 560 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
564 } | 561 } |
565 | 562 |
566 } // namespace cc | 563 } // namespace cc |
OLD | NEW |