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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 nearest_occlusion_immune_ancestor_(nullptr), | 34 nearest_occlusion_immune_ancestor_(nullptr), |
35 target_render_surface_layer_index_history_(0), | 35 target_render_surface_layer_index_history_(0), |
36 current_layer_index_history_(0) { | 36 current_layer_index_history_(0) { |
37 damage_tracker_ = DamageTracker::Create(); | 37 damage_tracker_ = DamageTracker::Create(); |
38 } | 38 } |
39 | 39 |
40 RenderSurfaceImpl::~RenderSurfaceImpl() {} | 40 RenderSurfaceImpl::~RenderSurfaceImpl() {} |
41 | 41 |
42 gfx::RectF RenderSurfaceImpl::DrawableContentRect() const { | 42 gfx::RectF RenderSurfaceImpl::DrawableContentRect() const { |
43 gfx::RectF drawable_content_rect = | 43 gfx::RectF drawable_content_rect = |
44 MathUtil::MapClippedRect(draw_transform_, content_rect_); | 44 MathUtil::MapClippedRect(draw_transform_, gfx::RectF(content_rect_)); |
45 if (owning_layer_->has_replica()) { | 45 if (owning_layer_->has_replica()) { |
46 drawable_content_rect.Union( | 46 drawable_content_rect.Union(MathUtil::MapClippedRect( |
47 MathUtil::MapClippedRect(replica_draw_transform_, content_rect_)); | 47 replica_draw_transform_, gfx::RectF(content_rect_))); |
48 } | 48 } |
49 | 49 |
50 return drawable_content_rect; | 50 return drawable_content_rect; |
51 } | 51 } |
52 | 52 |
53 SkColor RenderSurfaceImpl::GetDebugBorderColor() const { | 53 SkColor RenderSurfaceImpl::GetDebugBorderColor() const { |
54 return DebugColors::SurfaceBorderColor(); | 54 return DebugColors::SurfaceBorderColor(); |
55 } | 55 } |
56 | 56 |
57 SkColor RenderSurfaceImpl::GetReplicaDebugBorderColor() const { | 57 SkColor RenderSurfaceImpl::GetReplicaDebugBorderColor() const { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 RenderPassDrawQuad* quad = | 237 RenderPassDrawQuad* quad = |
238 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 238 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
239 quad->SetNew(shared_quad_state, content_rect_, visible_layer_rect, | 239 quad->SetNew(shared_quad_state, content_rect_, visible_layer_rect, |
240 render_pass_id, mask_resource_id, mask_uv_scale, | 240 render_pass_id, mask_resource_id, mask_uv_scale, |
241 mask_texture_size, owning_layer_->filters(), | 241 mask_texture_size, owning_layer_->filters(), |
242 owning_layer_to_target_scale, | 242 owning_layer_to_target_scale, |
243 owning_layer_->background_filters()); | 243 owning_layer_->background_filters()); |
244 } | 244 } |
245 | 245 |
246 } // namespace cc | 246 } // namespace cc |
OLD | NEW |