| 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 #include "third_party/skia/include/core/SkImageFilter.h" | 7 #include "third_party/skia/include/core/SkImageFilter.h" |
| 8 | 8 |
| 9 using WebKit::WebTransformationMatrix; | 9 using gfx::Transform; |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 scoped_ptr<RenderPass> RenderPass::Create() { | 13 scoped_ptr<RenderPass> RenderPass::Create() { |
| 14 return make_scoped_ptr(new RenderPass); | 14 return make_scoped_ptr(new RenderPass); |
| 15 } | 15 } |
| 16 | 16 |
| 17 RenderPass::RenderPass() | 17 RenderPass::RenderPass() |
| 18 : id(Id(-1, -1)), | 18 : id(Id(-1, -1)), |
| 19 has_transparent_background(true), | 19 has_transparent_background(true), |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 has_occlusion_from_outside_target_surface, | 37 has_occlusion_from_outside_target_surface, |
| 38 filters, | 38 filters, |
| 39 filter, | 39 filter, |
| 40 background_filters); | 40 background_filters); |
| 41 return copy_pass.Pass(); | 41 return copy_pass.Pass(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void RenderPass::SetNew(Id id, | 44 void RenderPass::SetNew(Id id, |
| 45 gfx::Rect output_rect, | 45 gfx::Rect output_rect, |
| 46 gfx::RectF damage_rect, | 46 gfx::RectF damage_rect, |
| 47 const WebKit::WebTransformationMatrix& transform_to_root
_target) { | 47 const gfx::Transform& transform_to_root_target) { |
| 48 DCHECK_GT(id.layer_id, 0); | 48 DCHECK_GT(id.layer_id, 0); |
| 49 DCHECK_GE(id.index, 0); | 49 DCHECK_GE(id.index, 0); |
| 50 | 50 |
| 51 this->id = id; | 51 this->id = id; |
| 52 this->output_rect = output_rect; | 52 this->output_rect = output_rect; |
| 53 this->damage_rect = damage_rect; | 53 this->damage_rect = damage_rect; |
| 54 this->transform_to_root_target = transform_to_root_target; | 54 this->transform_to_root_target = transform_to_root_target; |
| 55 | 55 |
| 56 DCHECK(quad_list.isEmpty()); | 56 DCHECK(quad_list.isEmpty()); |
| 57 DCHECK(shared_quad_state_list.isEmpty()); | 57 DCHECK(shared_quad_state_list.isEmpty()); |
| 58 } | 58 } |
| 59 | 59 |
| 60 void RenderPass::SetAll(Id id, | 60 void RenderPass::SetAll(Id id, |
| 61 gfx::Rect output_rect, | 61 gfx::Rect output_rect, |
| 62 gfx::RectF damage_rect, | 62 gfx::RectF damage_rect, |
| 63 const WebKit::WebTransformationMatrix& transform_to_root
_target, | 63 const gfx::Transform& transform_to_root_target, |
| 64 bool has_transparent_background, | 64 bool has_transparent_background, |
| 65 bool has_occlusion_from_outside_target_surface, | 65 bool has_occlusion_from_outside_target_surface, |
| 66 const WebKit::WebFilterOperations& filters, | 66 const WebKit::WebFilterOperations& filters, |
| 67 SkImageFilter* filter, | 67 SkImageFilter* filter, |
| 68 const WebKit::WebFilterOperations& background_filters) { | 68 const WebKit::WebFilterOperations& background_filters) { |
| 69 DCHECK_GT(id.layer_id, 0); | 69 DCHECK_GT(id.layer_id, 0); |
| 70 DCHECK_GE(id.index, 0); | 70 DCHECK_GE(id.index, 0); |
| 71 | 71 |
| 72 this->id = id; | 72 this->id = id; |
| 73 this->output_rect = output_rect; | 73 this->output_rect = output_rect; |
| 74 this->damage_rect = damage_rect; | 74 this->damage_rect = damage_rect; |
| 75 this->transform_to_root_target = transform_to_root_target; | 75 this->transform_to_root_target = transform_to_root_target; |
| 76 this->has_transparent_background = has_transparent_background; | 76 this->has_transparent_background = has_transparent_background; |
| 77 this->has_occlusion_from_outside_target_surface = | 77 this->has_occlusion_from_outside_target_surface = |
| 78 has_occlusion_from_outside_target_surface; | 78 has_occlusion_from_outside_target_surface; |
| 79 this->filters = filters; | 79 this->filters = filters; |
| 80 SkRefCnt_SafeAssign(this->filter, filter); | 80 SkRefCnt_SafeAssign(this->filter, filter); |
| 81 this->background_filters = background_filters; | 81 this->background_filters = background_filters; |
| 82 | 82 |
| 83 DCHECK(quad_list.isEmpty()); | 83 DCHECK(quad_list.isEmpty()); |
| 84 DCHECK(shared_quad_state_list.isEmpty()); | 84 DCHECK(shared_quad_state_list.isEmpty()); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace cc | 87 } // namespace cc |
| OLD | NEW |