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_PLAYBACK_PICTURE_PILE_IMPL_H_ | 5 #ifndef CC_PLAYBACK_PICTURE_PILE_IMPL_H_ |
6 #define CC_PLAYBACK_PICTURE_PILE_IMPL_H_ | 6 #define CC_PLAYBACK_PICTURE_PILE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 const gfx::Rect& canvas_playback_rect, | 43 const gfx::Rect& canvas_playback_rect, |
44 float contents_scale) const override; | 44 float contents_scale) const override; |
45 void PlaybackToSharedCanvas(SkCanvas* canvas, | 45 void PlaybackToSharedCanvas(SkCanvas* canvas, |
46 const gfx::Rect& canvas_rect, | 46 const gfx::Rect& canvas_rect, |
47 float contents_scale) const override; | 47 float contents_scale) const override; |
48 void PerformSolidColorAnalysis( | 48 void PerformSolidColorAnalysis( |
49 const gfx::Rect& content_rect, | 49 const gfx::Rect& content_rect, |
50 float contents_scale, | 50 float contents_scale, |
51 RasterSource::SolidColorAnalysis* analysis) const override; | 51 RasterSource::SolidColorAnalysis* analysis) const override; |
52 void GatherPixelRefs( | 52 void GatherPixelRefs( |
53 const gfx::Rect& content_rect, | 53 const gfx::Rect& layer_rect, |
54 float contents_scale, | |
55 std::vector<skia::PositionPixelRef>* pixel_refs) const override; | 54 std::vector<skia::PositionPixelRef>* pixel_refs) const override; |
56 bool CoversRect(const gfx::Rect& content_rect, | 55 bool CoversRect(const gfx::Rect& layer_rect) const override; |
57 float contents_scale) const override; | |
58 void SetShouldAttemptToUseDistanceFieldText() override; | 56 void SetShouldAttemptToUseDistanceFieldText() override; |
59 bool ShouldAttemptToUseDistanceFieldText() const override; | 57 bool ShouldAttemptToUseDistanceFieldText() const override; |
60 gfx::Size GetSize() const override; | 58 gfx::Size GetSize() const override; |
61 bool IsSolidColor() const override; | 59 bool IsSolidColor() const override; |
62 SkColor GetSolidColor() const override; | 60 SkColor GetSolidColor() const override; |
63 bool HasRecordings() const override; | 61 bool HasRecordings() const override; |
64 bool CanUseLCDText() const override; | 62 bool CanUseLCDText() const override; |
65 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const override; | 63 scoped_refptr<RasterSource> CreateCloneWithoutLCDText() const override; |
66 | 64 |
67 // Tracing functionality. | 65 // Tracing functionality. |
68 void DidBeginTracing() override; | 66 void DidBeginTracing() override; |
69 void AsValueInto(base::trace_event::TracedValue* array) const override; | 67 void AsValueInto(base::trace_event::TracedValue* array) const override; |
70 skia::RefPtr<SkPicture> GetFlattenedPicture() override; | 68 skia::RefPtr<SkPicture> GetFlattenedPicture() override; |
71 size_t GetPictureMemoryUsage() const override; | 69 size_t GetPictureMemoryUsage() const override; |
72 | 70 |
73 // Iterator used to return SkPixelRefs from this picture pile. | 71 // Iterator used to return SkPixelRefs from this picture pile. |
74 // Public for testing. | 72 // Public for testing. |
75 class CC_EXPORT PixelRefIterator { | 73 class CC_EXPORT PixelRefIterator { |
76 public: | 74 public: |
77 PixelRefIterator(const gfx::Rect& content_rect, | 75 PixelRefIterator(const gfx::Rect& layer_rect, |
78 float contents_scale, | |
79 const PicturePileImpl* picture_pile); | 76 const PicturePileImpl* picture_pile); |
80 ~PixelRefIterator(); | 77 ~PixelRefIterator(); |
81 | 78 |
82 const skia::PositionPixelRef* operator->() const { | 79 const skia::PositionPixelRef* operator->() const { |
83 return &(*pixel_ref_iterator_); | 80 return &(*pixel_ref_iterator_); |
84 } | 81 } |
85 const skia::PositionPixelRef& operator*() const { | 82 const skia::PositionPixelRef& operator*() const { |
86 return *pixel_ref_iterator_; | 83 return *pixel_ref_iterator_; |
87 } | 84 } |
88 PixelRefIterator& operator++(); | 85 PixelRefIterator& operator++(); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; | 153 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; |
157 | 154 |
158 gfx::Rect PaddedRect(const PictureMapKey& key) const; | 155 gfx::Rect PaddedRect(const PictureMapKey& key) const; |
159 | 156 |
160 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 157 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
161 }; | 158 }; |
162 | 159 |
163 } // namespace cc | 160 } // namespace cc |
164 | 161 |
165 #endif // CC_PLAYBACK_PICTURE_PILE_IMPL_H_ | 162 #endif // CC_PLAYBACK_PICTURE_PILE_IMPL_H_ |
OLD | NEW |