| 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
| 14 #include "cc/base/scoped_ptr_vector.h" | 14 #include "cc/base/scoped_ptr_vector.h" |
| 15 #include "skia/ext/refptr.h" | 15 #include "skia/ext/refptr.h" |
| 16 #include "ui/gfx/rect.h" | 16 #include "ui/gfx/rect.h" |
| 17 #include "ui/gfx/rect_f.h" | 17 #include "ui/gfx/rect_f.h" |
| 18 #include "ui/gfx/transform.h" | 18 #include "ui/gfx/transform.h" |
| 19 | 19 |
| 20 namespace base { | 20 namespace base { |
| 21 namespace debug { | |
| 22 class TracedValue; | |
| 23 } | |
| 24 class Value; | 21 class Value; |
| 25 }; | 22 }; |
| 26 | 23 |
| 27 namespace cc { | 24 namespace cc { |
| 28 | 25 |
| 29 class DrawQuad; | 26 class DrawQuad; |
| 30 class RenderPassDrawQuad; | 27 class RenderPassDrawQuad; |
| 31 class CopyOutputRequest; | 28 class CopyOutputRequest; |
| 32 class SharedQuadState; | 29 class SharedQuadState; |
| 33 | 30 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 const gfx::Rect& output_rect, | 80 const gfx::Rect& output_rect, |
| 84 const gfx::Rect& damage_rect, | 81 const gfx::Rect& damage_rect, |
| 85 const gfx::Transform& transform_to_root_target); | 82 const gfx::Transform& transform_to_root_target); |
| 86 | 83 |
| 87 void SetAll(Id id, | 84 void SetAll(Id id, |
| 88 const gfx::Rect& output_rect, | 85 const gfx::Rect& output_rect, |
| 89 const gfx::Rect& damage_rect, | 86 const gfx::Rect& damage_rect, |
| 90 const gfx::Transform& transform_to_root_target, | 87 const gfx::Transform& transform_to_root_target, |
| 91 bool has_transparent_background); | 88 bool has_transparent_background); |
| 92 | 89 |
| 93 void AsValueInto(base::debug::TracedValue* dict) const; | 90 scoped_ptr<base::Value> AsValue() const; |
| 94 | 91 |
| 95 SharedQuadState* CreateAndAppendSharedQuadState(); | 92 SharedQuadState* CreateAndAppendSharedQuadState(); |
| 96 template <typename DrawQuadType> | 93 template <typename DrawQuadType> |
| 97 DrawQuadType* CreateAndAppendDrawQuad() { | 94 DrawQuadType* CreateAndAppendDrawQuad() { |
| 98 scoped_ptr<DrawQuadType> draw_quad = make_scoped_ptr(new DrawQuadType); | 95 scoped_ptr<DrawQuadType> draw_quad = make_scoped_ptr(new DrawQuadType); |
| 99 quad_list.push_back(draw_quad.template PassAs<DrawQuad>()); | 96 quad_list.push_back(draw_quad.template PassAs<DrawQuad>()); |
| 100 return static_cast<DrawQuadType*>(quad_list.back()); | 97 return static_cast<DrawQuadType*>(quad_list.back()); |
| 101 } | 98 } |
| 102 | 99 |
| 103 RenderPassDrawQuad* CopyFromAndAppendRenderPassDrawQuad( | 100 RenderPassDrawQuad* CopyFromAndAppendRenderPassDrawQuad( |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 #error define a hash function for your compiler | 161 #error define a hash function for your compiler |
| 165 #endif // COMPILER | 162 #endif // COMPILER |
| 166 } // namespace BASE_HASH_NAMESPACE | 163 } // namespace BASE_HASH_NAMESPACE |
| 167 | 164 |
| 168 namespace cc { | 165 namespace cc { |
| 169 typedef ScopedPtrVector<RenderPass> RenderPassList; | 166 typedef ScopedPtrVector<RenderPass> RenderPassList; |
| 170 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; | 167 typedef base::hash_map<RenderPass::Id, RenderPass*> RenderPassIdHashMap; |
| 171 } // namespace cc | 168 } // namespace cc |
| 172 | 169 |
| 173 #endif // CC_QUADS_RENDER_PASS_H_ | 170 #endif // CC_QUADS_RENDER_PASS_H_ |
| OLD | NEW |