| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 PicturePile::~PicturePile() { | 155 PicturePile::~PicturePile() { |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool PicturePile::UpdateAndExpandInvalidation( | 158 bool PicturePile::UpdateAndExpandInvalidation( |
| 159 ContentLayerClient* painter, | 159 ContentLayerClient* painter, |
| 160 Region* invalidation, | 160 Region* invalidation, |
| 161 SkColor background_color, | 161 SkColor background_color, |
| 162 bool contents_opaque, | 162 bool contents_opaque, |
| 163 bool contents_fill_bounds_completely, | 163 bool contents_fill_bounds_completely, |
| 164 bool can_use_lcd_text, |
| 164 const gfx::Size& layer_size, | 165 const gfx::Size& layer_size, |
| 165 const gfx::Rect& visible_layer_rect, | 166 const gfx::Rect& visible_layer_rect, |
| 166 int frame_number, | 167 int frame_number, |
| 167 Picture::RecordingMode recording_mode) { | 168 Picture::RecordingMode recording_mode) { |
| 168 background_color_ = background_color; | 169 background_color_ = background_color; |
| 169 contents_opaque_ = contents_opaque; | 170 contents_opaque_ = contents_opaque; |
| 170 contents_fill_bounds_completely_ = contents_fill_bounds_completely; | 171 contents_fill_bounds_completely_ = contents_fill_bounds_completely; |
| 172 can_use_lcd_text_ = can_use_lcd_text; |
| 171 | 173 |
| 172 bool updated = false; | 174 bool updated = false; |
| 173 | 175 |
| 174 Region resize_invalidation; | 176 Region resize_invalidation; |
| 175 gfx::Size old_tiling_size = tiling_size(); | 177 gfx::Size old_tiling_size = tiling_size(); |
| 176 if (old_tiling_size != layer_size) { | 178 if (old_tiling_size != layer_size) { |
| 177 tiling_.SetTilingSize(layer_size); | 179 tiling_.SetTilingSize(layer_size); |
| 178 updated = true; | 180 updated = true; |
| 179 } | 181 } |
| 180 | 182 |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 return; | 572 return; |
| 571 } | 573 } |
| 572 skia::AnalysisCanvas canvas(recorded_viewport_.width(), | 574 skia::AnalysisCanvas canvas(recorded_viewport_.width(), |
| 573 recorded_viewport_.height()); | 575 recorded_viewport_.height()); |
| 574 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y()); | 576 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y()); |
| 575 picture->Raster(&canvas, nullptr, Region(), 1.0f); | 577 picture->Raster(&canvas, nullptr, Region(), 1.0f); |
| 576 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); | 578 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); |
| 577 } | 579 } |
| 578 | 580 |
| 579 } // namespace cc | 581 } // namespace cc |
| OLD | NEW |