| 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_RENDER_PASS_DRAW_QUAD_H_ | 5 #ifndef CC_RENDER_PASS_DRAW_QUAD_H_ |
| 6 #define CC_RENDER_PASS_DRAW_QUAD_H_ | 6 #define CC_RENDER_PASS_DRAW_QUAD_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/cc_export.h" | 10 #include "cc/cc_export.h" |
| 11 #include "cc/draw_quad.h" | 11 #include "cc/draw_quad.h" |
| 12 #include "cc/render_pass.h" | 12 #include "cc/render_pass.h" |
| 13 #include "cc/resource_provider.h" | 13 #include "cc/resource_provider.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 class CC_EXPORT RenderPassDrawQuad : public DrawQuad { | 17 class CC_EXPORT RenderPassDrawQuad : public DrawQuad { |
| 18 public: | 18 public: |
| 19 static scoped_ptr<RenderPassDrawQuad> Create(); | 19 static scoped_ptr<RenderPassDrawQuad> Create(); |
| 20 | 20 |
| 21 void SetNew(const SharedQuadState* shared_quad_state, | 21 void SetNew(const SharedQuadState* shared_quad_state, |
| 22 gfx::Rect rect, | 22 gfx::Rect rect, |
| 23 RenderPass::Id render_pass_id, | 23 RenderPass::Id render_pass_id, |
| 24 bool is_replica, | 24 bool is_replica, |
| 25 ResourceProvider::ResourceId mask_resource_id, | 25 ResourceProvider::ResourceId mask_resource_id, |
| 26 gfx::Rect contents_changed_since_last_frame, | 26 gfx::Rect contents_changed_since_last_frame, |
| 27 float mask_tex_coord_scale_x, | 27 gfx::RectF mask_uv_rect); |
| 28 float mask_tex_coord_scale_y, | |
| 29 float mask_tex_coord_offset_x, | |
| 30 float mask_tex_coord_offset_y); | |
| 31 | 28 |
| 32 void SetAll(const SharedQuadState* shared_quad_state, | 29 void SetAll(const SharedQuadState* shared_quad_state, |
| 33 gfx::Rect rect, | 30 gfx::Rect rect, |
| 34 gfx::Rect opaque_rect, | 31 gfx::Rect opaque_rect, |
| 35 gfx::Rect visible_rect, | 32 gfx::Rect visible_rect, |
| 36 bool needs_blending, | 33 bool needs_blending, |
| 37 RenderPass::Id render_pass_id, | 34 RenderPass::Id render_pass_id, |
| 38 bool is_replica, | 35 bool is_replica, |
| 39 ResourceProvider::ResourceId mask_resource_id, | 36 ResourceProvider::ResourceId mask_resource_id, |
| 40 gfx::Rect contents_changed_since_last_frame, | 37 gfx::Rect contents_changed_since_last_frame, |
| 41 float mask_tex_coord_scale_x, | 38 gfx::RectF mask_uv_rect); |
| 42 float mask_tex_coord_scale_y, | |
| 43 float mask_tex_coord_offset_x, | |
| 44 float mask_tex_coord_offset_y); | |
| 45 | 39 |
| 46 scoped_ptr<RenderPassDrawQuad> Copy( | 40 scoped_ptr<RenderPassDrawQuad> Copy( |
| 47 const SharedQuadState* copied_shared_quad_state, | 41 const SharedQuadState* copied_shared_quad_state, |
| 48 RenderPass::Id copied_render_pass_id) const; | 42 RenderPass::Id copied_render_pass_id) const; |
| 49 | 43 |
| 50 RenderPass::Id render_pass_id; | 44 RenderPass::Id render_pass_id; |
| 51 bool is_replica; | 45 bool is_replica; |
| 52 ResourceProvider::ResourceId mask_resource_id; | 46 ResourceProvider::ResourceId mask_resource_id; |
| 53 gfx::Rect contents_changed_since_last_frame; | 47 gfx::Rect contents_changed_since_last_frame; |
| 54 // TODO(danakj): Make these a tex_coord_rect like TileDrawQuad. | 48 gfx::RectF mask_uv_rect; |
| 55 float mask_tex_coord_scale_x; | |
| 56 float mask_tex_coord_scale_y; | |
| 57 float mask_tex_coord_offset_x; | |
| 58 float mask_tex_coord_offset_y; | |
| 59 | 49 |
| 60 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); | 50 static const RenderPassDrawQuad* MaterialCast(const DrawQuad*); |
| 61 private: | 51 private: |
| 62 RenderPassDrawQuad(); | 52 RenderPassDrawQuad(); |
| 63 }; | 53 }; |
| 64 | 54 |
| 65 } | 55 } |
| 66 | 56 |
| 67 #endif // CC_RENDER_PASS_DRAW_QUAD_H_ | 57 #endif // CC_RENDER_PASS_DRAW_QUAD_H_ |
| OLD | NEW |