OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_SKPICTURE_CONTENT_LAYER_UPDATER_H_ | 5 #ifndef CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ |
6 #define CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ | 6 #define CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ |
7 | 7 |
8 #include "cc/resources/content_layer_updater.h" | 8 #include "cc/resources/content_layer_updater.h" |
9 #include "third_party/skia/include/core/SkPicture.h" | 9 #include "third_party/skia/include/core/SkPicture.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 SkPictureContentLayerUpdater( | 27 SkPictureContentLayerUpdater( |
28 scoped_ptr<LayerPainter> painter, | 28 scoped_ptr<LayerPainter> painter, |
29 RenderingStatsInstrumentation* stats_instrumentation, | 29 RenderingStatsInstrumentation* stats_instrumentation, |
30 int layer_id); | 30 int layer_id); |
31 virtual ~SkPictureContentLayerUpdater(); | 31 virtual ~SkPictureContentLayerUpdater(); |
32 | 32 |
33 virtual void PrepareToUpdate(gfx::Rect content_rect, | 33 virtual void PrepareToUpdate(gfx::Rect content_rect, |
34 gfx::Size tile_size, | 34 gfx::Size tile_size, |
35 float contents_width_scale, | 35 float contents_width_scale, |
36 float contents_height_scale, | 36 float contents_height_scale, |
37 gfx::Rect* resulting_opaque_rect, | 37 gfx::Rect* resulting_opaque_rect) OVERRIDE; |
38 RenderingStats* stats) OVERRIDE; | |
39 void DrawPicture(SkCanvas* canvas); | 38 void DrawPicture(SkCanvas* canvas); |
40 | 39 |
41 bool layer_is_opaque() const { return layer_is_opaque_; } | 40 bool layer_is_opaque() const { return layer_is_opaque_; } |
42 | 41 |
43 private: | 42 private: |
44 // Recording canvas. | 43 // Recording canvas. |
45 SkPicture picture_; | 44 SkPicture picture_; |
46 // True when it is known that all output pixels will be opaque. | 45 // True when it is known that all output pixels will be opaque. |
47 bool layer_is_opaque_; | 46 bool layer_is_opaque_; |
48 | 47 |
49 DISALLOW_COPY_AND_ASSIGN(SkPictureContentLayerUpdater); | 48 DISALLOW_COPY_AND_ASSIGN(SkPictureContentLayerUpdater); |
50 }; | 49 }; |
51 | 50 |
52 } // namespace cc | 51 } // namespace cc |
53 | 52 |
54 #endif // CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ | 53 #endif // CC_RESOURCES_SKPICTURE_CONTENT_LAYER_UPDATER_H_ |
OLD | NEW |