| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 std::vector<SkPixelRef*>* pixel_refs) const override; | 47 std::vector<SkPixelRef*>* pixel_refs) const override; |
| 48 bool CoversRect(const gfx::Rect& content_rect, | 48 bool CoversRect(const gfx::Rect& content_rect, |
| 49 float contents_scale) const override; | 49 float contents_scale) const override; |
| 50 void SetShouldAttemptToUseDistanceFieldText() override; | 50 void SetShouldAttemptToUseDistanceFieldText() override; |
| 51 bool ShouldAttemptToUseDistanceFieldText() const override; | 51 bool ShouldAttemptToUseDistanceFieldText() const override; |
| 52 gfx::Size GetSize() const override; | 52 gfx::Size GetSize() const override; |
| 53 bool IsSolidColor() const override; | 53 bool IsSolidColor() const override; |
| 54 SkColor GetSolidColor() const override; | 54 SkColor GetSolidColor() const override; |
| 55 bool HasRecordings() const override; | 55 bool HasRecordings() const override; |
| 56 bool IsMask() const override; | 56 bool IsMask() const override; |
| 57 bool CanUseLcdText() const override; |
| 57 | 58 |
| 58 // Tracing functionality. | 59 // Tracing functionality. |
| 59 void DidBeginTracing() override; | 60 void DidBeginTracing() override; |
| 60 void AsValueInto(base::debug::TracedValue* array) const override; | 61 void AsValueInto(base::debug::TracedValue* array) const override; |
| 61 skia::RefPtr<SkPicture> GetFlattenedPicture() override; | 62 skia::RefPtr<SkPicture> GetFlattenedPicture() override; |
| 62 | 63 |
| 63 // Iterator used to return SkPixelRefs from this picture pile. | 64 // Iterator used to return SkPixelRefs from this picture pile. |
| 64 // Public for testing. | 65 // Public for testing. |
| 65 class CC_EXPORT PixelRefIterator { | 66 class CC_EXPORT PixelRefIterator { |
| 66 public: | 67 public: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 PictureMap picture_map_; | 104 PictureMap picture_map_; |
| 104 TilingData tiling_; | 105 TilingData tiling_; |
| 105 SkColor background_color_; | 106 SkColor background_color_; |
| 106 bool contents_opaque_; | 107 bool contents_opaque_; |
| 107 bool contents_fill_bounds_completely_; | 108 bool contents_fill_bounds_completely_; |
| 108 bool is_solid_color_; | 109 bool is_solid_color_; |
| 109 SkColor solid_color_; | 110 SkColor solid_color_; |
| 110 gfx::Rect recorded_viewport_; | 111 gfx::Rect recorded_viewport_; |
| 111 bool has_any_recordings_; | 112 bool has_any_recordings_; |
| 112 bool is_mask_; | 113 bool is_mask_; |
| 114 bool can_use_lcd_text_; |
| 113 bool clear_canvas_with_debug_color_; | 115 bool clear_canvas_with_debug_color_; |
| 114 float min_contents_scale_; | 116 float min_contents_scale_; |
| 115 int slow_down_raster_scale_factor_for_debug_; | 117 int slow_down_raster_scale_factor_for_debug_; |
| 116 | 118 |
| 117 private: | 119 private: |
| 118 typedef std::map<const Picture*, Region> PictureRegionMap; | 120 typedef std::map<const Picture*, Region> PictureRegionMap; |
| 119 | 121 |
| 120 // Called when analyzing a tile. We can use AnalysisCanvas as | 122 // Called when analyzing a tile. We can use AnalysisCanvas as |
| 121 // SkDrawPictureCallback, which allows us to early out from analysis. | 123 // SkDrawPictureCallback, which allows us to early out from analysis. |
| 122 void RasterForAnalysis(skia::AnalysisCanvas* canvas, | 124 void RasterForAnalysis(skia::AnalysisCanvas* canvas, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 142 gfx::Rect PaddedRect(const PictureMapKey& key) const; | 144 gfx::Rect PaddedRect(const PictureMapKey& key) const; |
| 143 | 145 |
| 144 bool should_attempt_to_use_distance_field_text_; | 146 bool should_attempt_to_use_distance_field_text_; |
| 145 | 147 |
| 146 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 148 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 } // namespace cc | 151 } // namespace cc |
| 150 | 152 |
| 151 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 153 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
| OLD | NEW |