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.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 WebKit::WebTransformationMatrix; |
| 10 | 10 |
| (...skipping 26 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 WebKit::WebTransformationMatrix& transform_to_root _target, |
| 48 SkImageFilter* filter) { | |
| 48 DCHECK_GT(id.layer_id, 0); | 49 DCHECK_GT(id.layer_id, 0); |
| 49 DCHECK_GE(id.index, 0); | 50 DCHECK_GE(id.index, 0); |
| 50 | 51 |
| 51 this->id = id; | 52 this->id = id; |
| 52 this->output_rect = output_rect; | 53 this->output_rect = output_rect; |
| 53 this->damage_rect = damage_rect; | 54 this->damage_rect = damage_rect; |
| 54 this->transform_to_root_target = transform_to_root_target; | 55 this->transform_to_root_target = transform_to_root_target; |
| 56 SkRefCnt_SafeAssign(this->filter, filter); | |
|
enne (OOO)
2012/11/21 16:52:02
What about just making filter an SkRefPtr<SkImageF
| |
| 55 | 57 |
| 56 DCHECK(quad_list.isEmpty()); | 58 DCHECK(quad_list.isEmpty()); |
| 57 DCHECK(shared_quad_state_list.isEmpty()); | 59 DCHECK(shared_quad_state_list.isEmpty()); |
| 58 } | 60 } |
| 59 | 61 |
| 60 void RenderPass::SetAll(Id id, | 62 void RenderPass::SetAll(Id id, |
| 61 gfx::Rect output_rect, | 63 gfx::Rect output_rect, |
| 62 gfx::RectF damage_rect, | 64 gfx::RectF damage_rect, |
| 63 const WebKit::WebTransformationMatrix& transform_to_root _target, | 65 const WebKit::WebTransformationMatrix& transform_to_root _target, |
| 64 bool has_transparent_background, | 66 bool has_transparent_background, |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 78 has_occlusion_from_outside_target_surface; | 80 has_occlusion_from_outside_target_surface; |
| 79 this->filters = filters; | 81 this->filters = filters; |
| 80 SkRefCnt_SafeAssign(this->filter, filter); | 82 SkRefCnt_SafeAssign(this->filter, filter); |
| 81 this->background_filters = background_filters; | 83 this->background_filters = background_filters; |
| 82 | 84 |
| 83 DCHECK(quad_list.isEmpty()); | 85 DCHECK(quad_list.isEmpty()); |
| 84 DCHECK(shared_quad_state_list.isEmpty()); | 86 DCHECK(shared_quad_state_list.isEmpty()); |
| 85 } | 87 } |
| 86 | 88 |
| 87 } // namespace cc | 89 } // namespace cc |
| OLD | NEW |