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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Called when analyzing a tile. We can use AnalysisCanvas as | 51 // Called when analyzing a tile. We can use AnalysisCanvas as |
52 // SkDrawPictureCallback, which allows us to early out from analysis. | 52 // SkDrawPictureCallback, which allows us to early out from analysis. |
53 void RasterForAnalysis( | 53 void RasterForAnalysis( |
54 skia::AnalysisCanvas* canvas, | 54 skia::AnalysisCanvas* canvas, |
55 const gfx::Rect& canvas_rect, | 55 const gfx::Rect& canvas_rect, |
56 float contents_scale, | 56 float contents_scale, |
57 RenderingStatsInstrumentation* stats_instrumentation) const; | 57 RenderingStatsInstrumentation* stats_instrumentation) const; |
58 | 58 |
59 skia::RefPtr<SkPicture> GetFlattenedPicture(); | 59 skia::RefPtr<SkPicture> GetFlattenedPicture(); |
60 | 60 |
| 61 // If the layer had ever animated, this will be set to true. |
| 62 bool will_be_used_for_transform_animation() const { |
| 63 return will_be_used_for_transform_animation_; |
| 64 } |
| 65 void set_will_be_used_for_transform_animation( |
| 66 bool will_be_used_for_transform_animation) { |
| 67 will_be_used_for_transform_animation_ = |
| 68 will_be_used_for_transform_animation; |
| 69 } |
| 70 |
61 struct CC_EXPORT Analysis { | 71 struct CC_EXPORT Analysis { |
62 Analysis(); | 72 Analysis(); |
63 ~Analysis(); | 73 ~Analysis(); |
64 | 74 |
65 bool is_solid_color; | 75 bool is_solid_color; |
66 SkColor solid_color; | 76 SkColor solid_color; |
67 }; | 77 }; |
68 | 78 |
69 void AnalyzeInRect(const gfx::Rect& content_rect, | 79 void AnalyzeInRect(const gfx::Rect& content_rect, |
70 float contents_scale, | 80 float contents_scale, |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 PictureRegionMap* result) const; | 127 PictureRegionMap* result) const; |
118 | 128 |
119 void RasterCommon( | 129 void RasterCommon( |
120 SkCanvas* canvas, | 130 SkCanvas* canvas, |
121 SkDrawPictureCallback* callback, | 131 SkDrawPictureCallback* callback, |
122 const gfx::Rect& canvas_rect, | 132 const gfx::Rect& canvas_rect, |
123 float contents_scale, | 133 float contents_scale, |
124 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 134 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
125 bool is_analysis) const; | 135 bool is_analysis) const; |
126 | 136 |
| 137 bool will_be_used_for_transform_animation_; |
| 138 |
127 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 139 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
128 }; | 140 }; |
129 | 141 |
130 } // namespace cc | 142 } // namespace cc |
131 | 143 |
132 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 144 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
OLD | NEW |