| 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 #include "cc/render_pass_draw_quad.h" | 5 #include "cc/render_pass_draw_quad.h" |
| 6 | 6 |
| 7 namespace cc { | 7 namespace cc { |
| 8 | 8 |
| 9 RenderPassDrawQuad::RenderPassDrawQuad() | 9 RenderPassDrawQuad::RenderPassDrawQuad() |
| 10 : render_pass_id(RenderPass::Id(-1, -1)), | 10 : render_pass_id(RenderPass::Id(-1, -1)), |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 void RenderPassDrawQuad::SetNew(const SharedQuadState* shared_quad_state, | 32 void RenderPassDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
| 33 gfx::Rect rect, | 33 gfx::Rect rect, |
| 34 RenderPass::Id render_pass_id, | 34 RenderPass::Id render_pass_id, |
| 35 bool is_replica, | 35 bool is_replica, |
| 36 ResourceProvider::ResourceId mask_resource_id, | 36 ResourceProvider::ResourceId mask_resource_id, |
| 37 gfx::Rect contents_changed_since_last_frame, | 37 gfx::Rect contents_changed_since_last_frame, |
| 38 float mask_tex_coord_scale_x, | 38 float mask_tex_coord_scale_x, |
| 39 float mask_tex_coord_scale_y, | 39 float mask_tex_coord_scale_y, |
| 40 float mask_tex_coord_offset_x, | 40 float mask_tex_coord_offset_x, |
| 41 float mask_tex_coord_offset_y) { | 41 float mask_tex_coord_offset_y) { |
| 42 DCHECK(render_pass_id.layerId > 0); | 42 DCHECK(render_pass_id.layer_id > 0); |
| 43 DCHECK(render_pass_id.index >= 0); | 43 DCHECK(render_pass_id.index >= 0); |
| 44 | 44 |
| 45 gfx::Rect opaque_rect; | 45 gfx::Rect opaque_rect; |
| 46 gfx::Rect visible_rect = rect; | 46 gfx::Rect visible_rect = rect; |
| 47 bool needs_blending = false; | 47 bool needs_blending = false; |
| 48 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, | 48 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, |
| 49 visible_rect, needs_blending); | 49 visible_rect, needs_blending); |
| 50 this->render_pass_id = render_pass_id; | 50 this->render_pass_id = render_pass_id; |
| 51 this->is_replica = is_replica; | 51 this->is_replica = is_replica; |
| 52 this->mask_resource_id = mask_resource_id; | 52 this->mask_resource_id = mask_resource_id; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 63 gfx::Rect visible_rect, | 63 gfx::Rect visible_rect, |
| 64 bool needs_blending, | 64 bool needs_blending, |
| 65 RenderPass::Id render_pass_id, | 65 RenderPass::Id render_pass_id, |
| 66 bool is_replica, | 66 bool is_replica, |
| 67 ResourceProvider::ResourceId mask_resource_id, | 67 ResourceProvider::ResourceId mask_resource_id, |
| 68 gfx::Rect contents_changed_since_last_frame, | 68 gfx::Rect contents_changed_since_last_frame, |
| 69 float mask_tex_coord_scale_x, | 69 float mask_tex_coord_scale_x, |
| 70 float mask_tex_coord_scale_y, | 70 float mask_tex_coord_scale_y, |
| 71 float mask_tex_coord_offset_x, | 71 float mask_tex_coord_offset_x, |
| 72 float mask_tex_coord_offset_y) { | 72 float mask_tex_coord_offset_y) { |
| 73 DCHECK(render_pass_id.layerId > 0); | 73 DCHECK(render_pass_id.layer_id > 0); |
| 74 DCHECK(render_pass_id.index >= 0); | 74 DCHECK(render_pass_id.index >= 0); |
| 75 | 75 |
| 76 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, | 76 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, |
| 77 visible_rect, needs_blending); | 77 visible_rect, needs_blending); |
| 78 this->render_pass_id = render_pass_id; | 78 this->render_pass_id = render_pass_id; |
| 79 this->is_replica = is_replica; | 79 this->is_replica = is_replica; |
| 80 this->mask_resource_id = mask_resource_id; | 80 this->mask_resource_id = mask_resource_id; |
| 81 this->contents_changed_since_last_frame = contents_changed_since_last_frame; | 81 this->contents_changed_since_last_frame = contents_changed_since_last_frame; |
| 82 this->mask_tex_coord_scale_x = mask_tex_coord_scale_x; | 82 this->mask_tex_coord_scale_x = mask_tex_coord_scale_x; |
| 83 this->mask_tex_coord_scale_y = mask_tex_coord_scale_y; | 83 this->mask_tex_coord_scale_y = mask_tex_coord_scale_y; |
| 84 this->mask_tex_coord_offset_x = mask_tex_coord_offset_x; | 84 this->mask_tex_coord_offset_x = mask_tex_coord_offset_x; |
| 85 this->mask_tex_coord_offset_y = mask_tex_coord_offset_y; | 85 this->mask_tex_coord_offset_y = mask_tex_coord_offset_y; |
| 86 } | 86 } |
| 87 | 87 |
| 88 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast( | 88 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast( |
| 89 const DrawQuad* quad) { | 89 const DrawQuad* quad) { |
| 90 DCHECK(quad->material == DrawQuad::RENDER_PASS); | 90 DCHECK(quad->material == DrawQuad::RENDER_PASS); |
| 91 return static_cast<const RenderPassDrawQuad*>(quad); | 91 return static_cast<const RenderPassDrawQuad*>(quad); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace cc | 94 } // namespace cc |
| OLD | NEW |