OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_base.h" | 5 #include "cc/resources/picture_pile_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <set> | 8 #include <set> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 PicturePileBase::PicturePileBase() | 41 PicturePileBase::PicturePileBase() |
42 : min_contents_scale_(0), | 42 : min_contents_scale_(0), |
43 background_color_(SkColorSetARGBInline(0, 0, 0, 0)), | 43 background_color_(SkColorSetARGBInline(0, 0, 0, 0)), |
44 slow_down_raster_scale_factor_for_debug_(0), | 44 slow_down_raster_scale_factor_for_debug_(0), |
45 contents_opaque_(false), | 45 contents_opaque_(false), |
46 contents_fill_bounds_completely_(false), | 46 contents_fill_bounds_completely_(false), |
47 show_debug_picture_borders_(false), | 47 show_debug_picture_borders_(false), |
48 clear_canvas_with_debug_color_(kDefaultClearCanvasSetting), | 48 clear_canvas_with_debug_color_(kDefaultClearCanvasSetting), |
49 has_any_recordings_(false), | 49 has_any_recordings_(false), |
50 is_mask_(false), | 50 is_mask_(false), |
| 51 can_use_lcd_text_(false), |
51 is_solid_color_(false), | 52 is_solid_color_(false), |
52 solid_color_(SK_ColorTRANSPARENT) { | 53 solid_color_(SK_ColorTRANSPARENT) { |
53 tiling_.SetMaxTextureSize(gfx::Size(kBasePictureSize, kBasePictureSize)); | 54 tiling_.SetMaxTextureSize(gfx::Size(kBasePictureSize, kBasePictureSize)); |
54 tile_grid_info_.fTileInterval.setEmpty(); | 55 tile_grid_info_.fTileInterval.setEmpty(); |
55 tile_grid_info_.fMargin.setEmpty(); | 56 tile_grid_info_.fMargin.setEmpty(); |
56 tile_grid_info_.fOffset.setZero(); | 57 tile_grid_info_.fOffset.setZero(); |
57 } | 58 } |
58 | 59 |
59 PicturePileBase::PicturePileBase(const PicturePileBase* other) | 60 PicturePileBase::PicturePileBase(const PicturePileBase* other) |
60 : picture_map_(other->picture_map_), | 61 : picture_map_(other->picture_map_), |
61 tiling_(other->tiling_), | 62 tiling_(other->tiling_), |
62 recorded_viewport_(other->recorded_viewport_), | 63 recorded_viewport_(other->recorded_viewport_), |
63 min_contents_scale_(other->min_contents_scale_), | 64 min_contents_scale_(other->min_contents_scale_), |
64 tile_grid_info_(other->tile_grid_info_), | 65 tile_grid_info_(other->tile_grid_info_), |
65 background_color_(other->background_color_), | 66 background_color_(other->background_color_), |
66 slow_down_raster_scale_factor_for_debug_( | 67 slow_down_raster_scale_factor_for_debug_( |
67 other->slow_down_raster_scale_factor_for_debug_), | 68 other->slow_down_raster_scale_factor_for_debug_), |
68 contents_opaque_(other->contents_opaque_), | 69 contents_opaque_(other->contents_opaque_), |
69 contents_fill_bounds_completely_(other->contents_fill_bounds_completely_), | 70 contents_fill_bounds_completely_(other->contents_fill_bounds_completely_), |
70 show_debug_picture_borders_(other->show_debug_picture_borders_), | 71 show_debug_picture_borders_(other->show_debug_picture_borders_), |
71 clear_canvas_with_debug_color_(other->clear_canvas_with_debug_color_), | 72 clear_canvas_with_debug_color_(other->clear_canvas_with_debug_color_), |
72 has_any_recordings_(other->has_any_recordings_), | 73 has_any_recordings_(other->has_any_recordings_), |
73 is_mask_(other->is_mask_), | 74 is_mask_(other->is_mask_), |
| 75 can_use_lcd_text_(other->can_use_lcd_text_), |
74 is_solid_color_(other->is_solid_color_), | 76 is_solid_color_(other->is_solid_color_), |
75 solid_color_(other->solid_color_) { | 77 solid_color_(other->solid_color_) { |
76 } | 78 } |
77 | 79 |
78 PicturePileBase::~PicturePileBase() { | 80 PicturePileBase::~PicturePileBase() { |
79 } | 81 } |
80 | 82 |
81 void PicturePileBase::SetMinContentsScale(float min_contents_scale) { | 83 void PicturePileBase::SetMinContentsScale(float min_contents_scale) { |
82 DCHECK(min_contents_scale); | 84 DCHECK(min_contents_scale); |
83 if (min_contents_scale_ == min_contents_scale) | 85 if (min_contents_scale_ == min_contents_scale) |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 const Picture* PicturePileBase::PictureInfo::GetPicture() const { | 198 const Picture* PicturePileBase::PictureInfo::GetPicture() const { |
197 return picture_.get(); | 199 return picture_.get(); |
198 } | 200 } |
199 | 201 |
200 float PicturePileBase::PictureInfo::GetInvalidationFrequency() const { | 202 float PicturePileBase::PictureInfo::GetInvalidationFrequency() const { |
201 return invalidation_history_.count() / | 203 return invalidation_history_.count() / |
202 static_cast<float>(INVALIDATION_FRAMES_TRACKED); | 204 static_cast<float>(INVALIDATION_FRAMES_TRACKED); |
203 } | 205 } |
204 | 206 |
205 } // namespace cc | 207 } // namespace cc |
OLD | NEW |