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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 void SetBackgoundColor(SkColor background_color) override; | 57 void SetBackgoundColor(SkColor background_color) override; |
58 void SetRequiresClear(bool requires_clear) override; | 58 void SetRequiresClear(bool requires_clear) override; |
59 bool ShouldAttemptToUseDistanceFieldText() const override; | 59 bool ShouldAttemptToUseDistanceFieldText() const override; |
60 gfx::Size GetSize() const override; | 60 gfx::Size GetSize() const override; |
61 bool IsSolidColor() const override; | 61 bool IsSolidColor() const override; |
62 SkColor GetSolidColor() const override; | 62 SkColor GetSolidColor() const override; |
63 bool HasRecordings() const override; | 63 bool HasRecordings() const override; |
| 64 bool CanUseLCDText() const override; |
64 | 65 |
65 // Tracing functionality. | 66 // Tracing functionality. |
66 void DidBeginTracing() override; | 67 void DidBeginTracing() override; |
67 void AsValueInto(base::debug::TracedValue* array) const override; | 68 void AsValueInto(base::debug::TracedValue* array) const override; |
68 skia::RefPtr<SkPicture> GetFlattenedPicture() override; | 69 skia::RefPtr<SkPicture> GetFlattenedPicture() override; |
69 | 70 |
70 // Iterator used to return SkPixelRefs from this picture pile. | 71 // Iterator used to return SkPixelRefs from this picture pile. |
71 // Public for testing. | 72 // Public for testing. |
72 class CC_EXPORT PixelRefIterator { | 73 class CC_EXPORT PixelRefIterator { |
73 public: | 74 public: |
(...skipping 29 matching lines...) Expand all Loading... |
103 PicturePileImpl(); | 104 PicturePileImpl(); |
104 explicit PicturePileImpl(const PicturePile* other); | 105 explicit PicturePileImpl(const PicturePile* other); |
105 ~PicturePileImpl() override; | 106 ~PicturePileImpl() override; |
106 | 107 |
107 int buffer_pixels() const { return tiling_.border_texels(); } | 108 int buffer_pixels() const { return tiling_.border_texels(); } |
108 | 109 |
109 PictureMap picture_map_; | 110 PictureMap picture_map_; |
110 TilingData tiling_; | 111 TilingData tiling_; |
111 SkColor background_color_; | 112 SkColor background_color_; |
112 bool requires_clear_; | 113 bool requires_clear_; |
| 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 clear_canvas_with_debug_color_; | 119 bool clear_canvas_with_debug_color_; |
118 float min_contents_scale_; | 120 float min_contents_scale_; |
119 int slow_down_raster_scale_factor_for_debug_; | 121 int slow_down_raster_scale_factor_for_debug_; |
120 | 122 |
121 private: | 123 private: |
122 typedef std::map<const Picture*, Region> PictureRegionMap; | 124 typedef std::map<const Picture*, Region> PictureRegionMap; |
(...skipping 23 matching lines...) Expand all Loading... |
146 gfx::Rect PaddedRect(const PictureMapKey& key) const; | 148 gfx::Rect PaddedRect(const PictureMapKey& key) const; |
147 | 149 |
148 bool should_attempt_to_use_distance_field_text_; | 150 bool should_attempt_to_use_distance_field_text_; |
149 | 151 |
150 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 152 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
151 }; | 153 }; |
152 | 154 |
153 } // namespace cc | 155 } // namespace cc |
154 | 156 |
155 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 157 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
OLD | NEW |