Chromium Code Reviews| 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 13 matching lines...) Expand all Loading... | |
| 24 copy_quad->render_pass_id = copied_render_pass_id; | 24 copy_quad->render_pass_id = copied_render_pass_id; |
| 25 return copy_quad.Pass(); | 25 return copy_quad.Pass(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void RenderPassDrawQuad::SetNew(const SharedQuadState* shared_quad_state, | 28 void RenderPassDrawQuad::SetNew(const SharedQuadState* shared_quad_state, |
| 29 gfx::Rect rect, | 29 gfx::Rect rect, |
| 30 RenderPass::Id render_pass_id, | 30 RenderPass::Id render_pass_id, |
| 31 bool is_replica, | 31 bool is_replica, |
| 32 ResourceProvider::ResourceId mask_resource_id, | 32 ResourceProvider::ResourceId mask_resource_id, |
| 33 gfx::Rect contents_changed_since_last_frame, | 33 gfx::Rect contents_changed_since_last_frame, |
| 34 gfx::RectF mask_uv_rect) { | 34 gfx::RectF mask_uv_rect, |
| 35 const WebKit::WebFilterOperations& filters, | |
| 36 skia::RefPtr<SkImageFilter> filter, | |
| 37 const WebKit::WebFilterOperations& background_fi lters) { | |
|
danakj
2012/12/19 21:22:52
80 cols, i guess wrap at the SetNew(\n
piman
2012/12/19 21:50:00
Done.
| |
| 35 DCHECK(render_pass_id.layer_id > 0); | 38 DCHECK(render_pass_id.layer_id > 0); |
| 36 DCHECK(render_pass_id.index >= 0); | 39 DCHECK(render_pass_id.index >= 0); |
| 37 | 40 |
| 38 gfx::Rect opaque_rect; | 41 gfx::Rect opaque_rect; |
| 39 gfx::Rect visible_rect = rect; | 42 gfx::Rect visible_rect = rect; |
| 40 bool needs_blending = false; | 43 bool needs_blending = false; |
| 41 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, | 44 SetAll(shared_quad_state, rect, opaque_rect, visible_rect, needs_blending, |
| 42 visible_rect, needs_blending); | 45 render_pass_id, is_replica, mask_resource_id, |
| 43 this->render_pass_id = render_pass_id; | 46 contents_changed_since_last_frame, mask_uv_rect, filters, filter, |
| 44 this->is_replica = is_replica; | 47 background_filters); |
| 45 this->mask_resource_id = mask_resource_id; | |
| 46 this->contents_changed_since_last_frame = contents_changed_since_last_frame; | |
| 47 this->mask_uv_rect = mask_uv_rect; | |
| 48 } | 48 } |
| 49 | 49 |
| 50 void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state, | 50 void RenderPassDrawQuad::SetAll(const SharedQuadState* shared_quad_state, |
| 51 gfx::Rect rect, | 51 gfx::Rect rect, |
| 52 gfx::Rect opaque_rect, | 52 gfx::Rect opaque_rect, |
| 53 gfx::Rect visible_rect, | 53 gfx::Rect visible_rect, |
| 54 bool needs_blending, | 54 bool needs_blending, |
| 55 RenderPass::Id render_pass_id, | 55 RenderPass::Id render_pass_id, |
| 56 bool is_replica, | 56 bool is_replica, |
| 57 ResourceProvider::ResourceId mask_resource_id, | 57 ResourceProvider::ResourceId mask_resource_id, |
| 58 gfx::Rect contents_changed_since_last_frame, | 58 gfx::Rect contents_changed_since_last_frame, |
| 59 gfx::RectF mask_uv_rect) { | 59 gfx::RectF mask_uv_rect, |
| 60 const WebKit::WebFilterOperations& filters, | |
| 61 skia::RefPtr<SkImageFilter> filter, | |
| 62 const WebKit::WebFilterOperations& background_fi lters) { | |
|
danakj
2012/12/19 21:22:52
80 cols here too
piman
2012/12/19 21:50:00
Done.
| |
| 60 DCHECK(render_pass_id.layer_id > 0); | 63 DCHECK(render_pass_id.layer_id > 0); |
| 61 DCHECK(render_pass_id.index >= 0); | 64 DCHECK(render_pass_id.index >= 0); |
| 62 | 65 |
| 63 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, | 66 DrawQuad::SetAll(shared_quad_state, DrawQuad::RENDER_PASS, rect, opaque_rect, |
| 64 visible_rect, needs_blending); | 67 visible_rect, needs_blending); |
| 65 this->render_pass_id = render_pass_id; | 68 this->render_pass_id = render_pass_id; |
| 66 this->is_replica = is_replica; | 69 this->is_replica = is_replica; |
| 67 this->mask_resource_id = mask_resource_id; | 70 this->mask_resource_id = mask_resource_id; |
| 68 this->contents_changed_since_last_frame = contents_changed_since_last_frame; | 71 this->contents_changed_since_last_frame = contents_changed_since_last_frame; |
| 69 this->mask_uv_rect = mask_uv_rect; | 72 this->mask_uv_rect = mask_uv_rect; |
| 73 this->filters = filters; | |
| 74 this->filter = filter; | |
| 75 this->background_filters = background_filters; | |
| 70 } | 76 } |
| 71 | 77 |
| 72 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast( | 78 const RenderPassDrawQuad* RenderPassDrawQuad::MaterialCast( |
| 73 const DrawQuad* quad) { | 79 const DrawQuad* quad) { |
| 74 DCHECK(quad->material == DrawQuad::RENDER_PASS); | 80 DCHECK(quad->material == DrawQuad::RENDER_PASS); |
| 75 return static_cast<const RenderPassDrawQuad*>(quad); | 81 return static_cast<const RenderPassDrawQuad*>(quad); |
| 76 } | 82 } |
| 77 | 83 |
| 78 } // namespace cc | 84 } // namespace cc |
| OLD | NEW |