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_QUADS_RENDER_PASS_H_ | 5 #ifndef CC_QUADS_RENDER_PASS_H_ |
6 #define CC_QUADS_RENDER_PASS_H_ | 6 #define CC_QUADS_RENDER_PASS_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" |
| 13 #include "base/hash_tables.h" |
12 #include "cc/base/cc_export.h" | 14 #include "cc/base/cc_export.h" |
13 #include "cc/base/hash_pair.h" | 15 #include "cc/base/hash_pair.h" |
14 #include "cc/base/scoped_ptr_hash_map.h" | 16 #include "cc/base/scoped_ptr_hash_map.h" |
15 #include "cc/base/scoped_ptr_vector.h" | 17 #include "cc/base/scoped_ptr_vector.h" |
16 #include "skia/ext/refptr.h" | 18 #include "skia/ext/refptr.h" |
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations
.h" |
18 #include "third_party/skia/include/core/SkColor.h" | 20 #include "third_party/skia/include/core/SkColor.h" |
19 #include "third_party/skia/include/core/SkImageFilter.h" | 21 #include "third_party/skia/include/core/SkImageFilter.h" |
20 #include "ui/gfx/rect.h" | 22 #include "ui/gfx/rect.h" |
21 #include "ui/gfx/rect_f.h" | 23 #include "ui/gfx/rect_f.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // render pass' |output_rect|. | 92 // render pass' |output_rect|. |
91 gfx::Transform transform_to_root_target; | 93 gfx::Transform transform_to_root_target; |
92 | 94 |
93 // If false, the pixels in the render pass' texture are all opaque. | 95 // If false, the pixels in the render pass' texture are all opaque. |
94 bool has_transparent_background; | 96 bool has_transparent_background; |
95 | 97 |
96 // If true, then there may be pixels in the render pass' texture that are not | 98 // If true, then there may be pixels in the render pass' texture that are not |
97 // complete, since they are occluded. | 99 // complete, since they are occluded. |
98 bool has_occlusion_from_outside_target_surface; | 100 bool has_occlusion_from_outside_target_surface; |
99 | 101 |
| 102 // If non-empty, the renderer should produce a copy of the render pass' |
| 103 // contents as a bitmap, and give a copy of the bitmap to each callback in |
| 104 // this list. This property should not be serialized between compositors, as |
| 105 // it only makes sense in the root compositor. |
| 106 typedef base::Callback<void(scoped_ptr<SkBitmap>)> |
| 107 RequestCopyAsBitmapCallback; |
| 108 std::vector<RequestCopyAsBitmapCallback> copy_callbacks; |
| 109 |
100 QuadList quad_list; | 110 QuadList quad_list; |
101 SharedQuadStateList shared_quad_state_list; | 111 SharedQuadStateList shared_quad_state_list; |
102 | 112 |
103 protected: | 113 protected: |
104 RenderPass(); | 114 RenderPass(); |
105 | 115 |
106 DISALLOW_COPY_AND_ASSIGN(RenderPass); | 116 DISALLOW_COPY_AND_ASSIGN(RenderPass); |
107 }; | 117 }; |
108 | 118 |
109 } // namespace cc | 119 } // namespace cc |
(...skipping 17 matching lines...) Expand all Loading... |
127 #error define a hash function for your compiler | 137 #error define a hash function for your compiler |
128 #endif // COMPILER | 138 #endif // COMPILER |
129 } | 139 } |
130 | 140 |
131 namespace cc { | 141 namespace cc { |
132 typedef ScopedPtrVector<RenderPass> RenderPassList; | 142 typedef ScopedPtrVector<RenderPass> RenderPassList; |
133 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; | 143 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; |
134 } // namespace cc | 144 } // namespace cc |
135 | 145 |
136 #endif // CC_QUADS_RENDER_PASS_H_ | 146 #endif // CC_QUADS_RENDER_PASS_H_ |
OLD | NEW |