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/layers/render_surface_impl.h" | 5 #include "cc/layers/render_surface_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // functions (for example, gfx::ToEnclosedRect) that are called on this rect. | 97 // functions (for example, gfx::ToEnclosedRect) that are called on this rect. |
98 if (std::isnan(drawable_content_rect.x()) || | 98 if (std::isnan(drawable_content_rect.x()) || |
99 std::isnan(drawable_content_rect.y()) || | 99 std::isnan(drawable_content_rect.y()) || |
100 std::isnan(drawable_content_rect.right()) || | 100 std::isnan(drawable_content_rect.right()) || |
101 std::isnan(drawable_content_rect.bottom())) | 101 std::isnan(drawable_content_rect.bottom())) |
102 return gfx::RectF(); | 102 return gfx::RectF(); |
103 | 103 |
104 return drawable_content_rect; | 104 return drawable_content_rect; |
105 } | 105 } |
106 | 106 |
107 SkXfermode::Mode RenderSurfaceImpl::BlendMode() const { | 107 SkBlendMode RenderSurfaceImpl::BlendMode() const { |
108 return OwningEffectNode()->blend_mode; | 108 return OwningEffectNode()->blend_mode; |
109 } | 109 } |
110 | 110 |
111 bool RenderSurfaceImpl::UsesDefaultBlendMode() const { | 111 bool RenderSurfaceImpl::UsesDefaultBlendMode() const { |
112 return BlendMode() == SkXfermode::kSrcOver_Mode; | 112 return BlendMode() == SkBlendMode::kSrcOver; |
113 } | 113 } |
114 | 114 |
115 SkColor RenderSurfaceImpl::GetDebugBorderColor() const { | 115 SkColor RenderSurfaceImpl::GetDebugBorderColor() const { |
116 return DebugColors::SurfaceBorderColor(); | 116 return DebugColors::SurfaceBorderColor(); |
117 } | 117 } |
118 | 118 |
119 float RenderSurfaceImpl::GetDebugBorderWidth() const { | 119 float RenderSurfaceImpl::GetDebugBorderWidth() const { |
120 return DebugColors::SurfaceBorderWidth(owning_layer_->layer_tree_impl()); | 120 return DebugColors::SurfaceBorderWidth(owning_layer_->layer_tree_impl()); |
121 } | 121 } |
122 | 122 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 RenderPassDrawQuad* quad = | 405 RenderPassDrawQuad* quad = |
406 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 406 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
407 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect, | 407 quad->SetNew(shared_quad_state, content_rect(), visible_layer_rect, |
408 render_pass_id, mask_resource_id, mask_uv_scale, | 408 render_pass_id, mask_resource_id, mask_uv_scale, |
409 mask_texture_size, Filters(), owning_layer_to_target_scale, | 409 mask_texture_size, Filters(), owning_layer_to_target_scale, |
410 FiltersOrigin(), BackgroundFilters()); | 410 FiltersOrigin(), BackgroundFilters()); |
411 } | 411 } |
412 | 412 |
413 } // namespace cc | 413 } // namespace cc |
OLD | NEW |