| 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.h" | 5 #include "cc/render_pass.h" |
| 6 | 6 |
| 7 namespace cc { | 7 namespace cc { |
| 8 | 8 |
| 9 scoped_ptr<RenderPass> RenderPass::Create() { | 9 scoped_ptr<RenderPass> RenderPass::Create() { |
| 10 return make_scoped_ptr(new RenderPass); | 10 return make_scoped_ptr(new RenderPass); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 scoped_ptr<RenderPass> RenderPass::Copy(Id new_id) const { | 22 scoped_ptr<RenderPass> RenderPass::Copy(Id new_id) const { |
| 23 DCHECK(new_id != id); | 23 DCHECK(new_id != id); |
| 24 | 24 |
| 25 scoped_ptr<RenderPass> copy_pass(Create()); | 25 scoped_ptr<RenderPass> copy_pass(Create()); |
| 26 copy_pass->SetAll(new_id, | 26 copy_pass->SetAll(new_id, |
| 27 output_rect, | 27 output_rect, |
| 28 damage_rect, | 28 damage_rect, |
| 29 transform_to_root_target, | 29 transform_to_root_target, |
| 30 has_transparent_background, | 30 has_transparent_background, |
| 31 has_occlusion_from_outside_target_surface, | 31 has_occlusion_from_outside_target_surface); |
| 32 filters, | |
| 33 filter, | |
| 34 background_filters); | |
| 35 return copy_pass.Pass(); | 32 return copy_pass.Pass(); |
| 36 } | 33 } |
| 37 | 34 |
| 38 void RenderPass::SetNew(Id id, | 35 void RenderPass::SetNew(Id id, |
| 39 gfx::Rect output_rect, | 36 gfx::Rect output_rect, |
| 40 gfx::RectF damage_rect, | 37 gfx::RectF damage_rect, |
| 41 const gfx::Transform& transform_to_root_target) { | 38 const gfx::Transform& transform_to_root_target) { |
| 42 DCHECK_GT(id.layer_id, 0); | 39 DCHECK_GT(id.layer_id, 0); |
| 43 DCHECK_GE(id.index, 0); | 40 DCHECK_GE(id.index, 0); |
| 44 | 41 |
| 45 this->id = id; | 42 this->id = id; |
| 46 this->output_rect = output_rect; | 43 this->output_rect = output_rect; |
| 47 this->damage_rect = damage_rect; | 44 this->damage_rect = damage_rect; |
| 48 this->transform_to_root_target = transform_to_root_target; | 45 this->transform_to_root_target = transform_to_root_target; |
| 49 | 46 |
| 50 DCHECK(quad_list.isEmpty()); | 47 DCHECK(quad_list.isEmpty()); |
| 51 DCHECK(shared_quad_state_list.isEmpty()); | 48 DCHECK(shared_quad_state_list.isEmpty()); |
| 52 } | 49 } |
| 53 | 50 |
| 54 void RenderPass::SetAll(Id id, | 51 void RenderPass::SetAll(Id id, |
| 55 gfx::Rect output_rect, | 52 gfx::Rect output_rect, |
| 56 gfx::RectF damage_rect, | 53 gfx::RectF damage_rect, |
| 57 const gfx::Transform& transform_to_root_target, | 54 const gfx::Transform& transform_to_root_target, |
| 58 bool has_transparent_background, | 55 bool has_transparent_background, |
| 59 bool has_occlusion_from_outside_target_surface, | 56 bool has_occlusion_from_outside_target_surface) { |
| 60 const WebKit::WebFilterOperations& filters, | |
| 61 const skia::RefPtr<SkImageFilter>& filter, | |
| 62 const WebKit::WebFilterOperations& background_filters) { | |
| 63 DCHECK_GT(id.layer_id, 0); | 57 DCHECK_GT(id.layer_id, 0); |
| 64 DCHECK_GE(id.index, 0); | 58 DCHECK_GE(id.index, 0); |
| 65 | 59 |
| 66 this->id = id; | 60 this->id = id; |
| 67 this->output_rect = output_rect; | 61 this->output_rect = output_rect; |
| 68 this->damage_rect = damage_rect; | 62 this->damage_rect = damage_rect; |
| 69 this->transform_to_root_target = transform_to_root_target; | 63 this->transform_to_root_target = transform_to_root_target; |
| 70 this->has_transparent_background = has_transparent_background; | 64 this->has_transparent_background = has_transparent_background; |
| 71 this->has_occlusion_from_outside_target_surface = | 65 this->has_occlusion_from_outside_target_surface = |
| 72 has_occlusion_from_outside_target_surface; | 66 has_occlusion_from_outside_target_surface; |
| 73 this->filters = filters; | |
| 74 this->filter = filter; | |
| 75 this->background_filters = background_filters; | |
| 76 | 67 |
| 77 DCHECK(quad_list.isEmpty()); | 68 DCHECK(quad_list.isEmpty()); |
| 78 DCHECK(shared_quad_state_list.isEmpty()); | 69 DCHECK(shared_quad_state_list.isEmpty()); |
| 79 } | 70 } |
| 80 | 71 |
| 81 } // namespace cc | 72 } // namespace cc |
| OLD | NEW |