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 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 5 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 std::vector<SkPixelRef*>* pixel_refs) const override; | 53 std::vector<SkPixelRef*>* pixel_refs) const override; |
54 bool CoversRect(const gfx::Rect& content_rect, | 54 bool CoversRect(const gfx::Rect& content_rect, |
55 float contents_scale) const override; | 55 float contents_scale) const override; |
56 void SetShouldAttemptToUseDistanceFieldText() override; | 56 void SetShouldAttemptToUseDistanceFieldText() override; |
57 bool ShouldAttemptToUseDistanceFieldText() const override; | 57 bool ShouldAttemptToUseDistanceFieldText() const override; |
58 gfx::Size GetSize() const override; | 58 gfx::Size GetSize() const override; |
59 bool IsSolidColor() const override; | 59 bool IsSolidColor() const override; |
60 SkColor GetSolidColor() const override; | 60 SkColor GetSolidColor() const override; |
61 bool HasRecordings() const override; | 61 bool HasRecordings() const override; |
62 bool IsMask() const override; | 62 bool IsMask() const override; |
| 63 bool CanUseLcdText() const override; |
63 | 64 |
64 // Tracing functionality. | 65 // Tracing functionality. |
65 void DidBeginTracing() override; | 66 void DidBeginTracing() override; |
66 void AsValueInto(base::debug::TracedValue* array) const override; | 67 void AsValueInto(base::debug::TracedValue* array) const override; |
67 skia::RefPtr<SkPicture> GetFlattenedPicture() override; | 68 skia::RefPtr<SkPicture> GetFlattenedPicture() override; |
68 | 69 |
69 // Iterator used to return SkPixelRefs from this picture pile. | 70 // Iterator used to return SkPixelRefs from this picture pile. |
70 // Public for testing. | 71 // Public for testing. |
71 class CC_EXPORT PixelRefIterator { | 72 class CC_EXPORT PixelRefIterator { |
72 public: | 73 public: |
(...skipping 30 matching lines...) Expand all Loading... |
103 explicit PicturePileImpl(const PicturePile* other); | 104 explicit PicturePileImpl(const PicturePile* other); |
104 ~PicturePileImpl() override; | 105 ~PicturePileImpl() override; |
105 | 106 |
106 int buffer_pixels() const { return tiling_.border_texels(); } | 107 int buffer_pixels() const { return tiling_.border_texels(); } |
107 | 108 |
108 PictureMap picture_map_; | 109 PictureMap picture_map_; |
109 TilingData tiling_; | 110 TilingData tiling_; |
110 SkColor background_color_; | 111 SkColor background_color_; |
111 bool contents_opaque_; | 112 bool contents_opaque_; |
112 bool contents_fill_bounds_completely_; | 113 bool contents_fill_bounds_completely_; |
| 114 bool can_use_lcd_text_; |
113 bool is_solid_color_; | 115 bool is_solid_color_; |
114 SkColor solid_color_; | 116 SkColor solid_color_; |
115 gfx::Rect recorded_viewport_; | 117 gfx::Rect recorded_viewport_; |
116 bool has_any_recordings_; | 118 bool has_any_recordings_; |
117 bool is_mask_; | 119 bool is_mask_; |
118 bool clear_canvas_with_debug_color_; | 120 bool clear_canvas_with_debug_color_; |
119 float min_contents_scale_; | 121 float min_contents_scale_; |
120 int slow_down_raster_scale_factor_for_debug_; | 122 int slow_down_raster_scale_factor_for_debug_; |
121 | 123 |
122 private: | 124 private: |
(...skipping 24 matching lines...) Expand all Loading... |
147 gfx::Rect PaddedRect(const PictureMapKey& key) const; | 149 gfx::Rect PaddedRect(const PictureMapKey& key) const; |
148 | 150 |
149 bool should_attempt_to_use_distance_field_text_; | 151 bool should_attempt_to_use_distance_field_text_; |
150 | 152 |
151 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 153 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
152 }; | 154 }; |
153 | 155 |
154 } // namespace cc | 156 } // namespace cc |
155 | 157 |
156 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 158 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
OLD | NEW |