| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 PicturePile::~PicturePile() { | 156 PicturePile::~PicturePile() { |
| 157 } | 157 } |
| 158 | 158 |
| 159 bool PicturePile::UpdateAndExpandInvalidation( | 159 bool PicturePile::UpdateAndExpandInvalidation( |
| 160 ContentLayerClient* painter, | 160 ContentLayerClient* painter, |
| 161 Region* invalidation, | 161 Region* invalidation, |
| 162 SkColor background_color, | 162 SkColor background_color, |
| 163 bool contents_opaque, | 163 bool contents_opaque, |
| 164 bool contents_fill_bounds_completely, | 164 bool contents_fill_bounds_completely, |
| 165 bool can_use_lcd_text, |
| 165 const gfx::Size& layer_size, | 166 const gfx::Size& layer_size, |
| 166 const gfx::Rect& visible_layer_rect, | 167 const gfx::Rect& visible_layer_rect, |
| 167 int frame_number, | 168 int frame_number, |
| 168 Picture::RecordingMode recording_mode) { | 169 Picture::RecordingMode recording_mode) { |
| 169 background_color_ = background_color; | 170 background_color_ = background_color; |
| 170 contents_opaque_ = contents_opaque; | 171 contents_opaque_ = contents_opaque; |
| 171 contents_fill_bounds_completely_ = contents_fill_bounds_completely; | 172 contents_fill_bounds_completely_ = contents_fill_bounds_completely; |
| 173 can_use_lcd_text_ = can_use_lcd_text; |
| 172 | 174 |
| 173 bool updated = false; | 175 bool updated = false; |
| 174 | 176 |
| 175 Region resize_invalidation; | 177 Region resize_invalidation; |
| 176 gfx::Size old_tiling_size = tiling_size(); | 178 gfx::Size old_tiling_size = tiling_size(); |
| 177 if (old_tiling_size != layer_size) { | 179 if (old_tiling_size != layer_size) { |
| 178 tiling_.SetTilingSize(layer_size); | 180 tiling_.SetTilingSize(layer_size); |
| 179 updated = true; | 181 updated = true; |
| 180 } | 182 } |
| 181 | 183 |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 return; | 624 return; |
| 623 } | 625 } |
| 624 skia::AnalysisCanvas canvas(recorded_viewport_.width(), | 626 skia::AnalysisCanvas canvas(recorded_viewport_.width(), |
| 625 recorded_viewport_.height()); | 627 recorded_viewport_.height()); |
| 626 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y()); | 628 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y()); |
| 627 picture->Raster(&canvas, nullptr, Region(), 1.0f); | 629 picture->Raster(&canvas, nullptr, Region(), 1.0f); |
| 628 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 630 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
| 629 } | 631 } |
| 630 | 632 |
| 631 } // namespace cc | 633 } // namespace cc |
| OLD | NEW |