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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 owning_layer_->sorting_context_id()); | 170 owning_layer_->sorting_context_id()); |
171 | 171 |
172 if (owning_layer_->ShowDebugBorders()) { | 172 if (owning_layer_->ShowDebugBorders()) { |
173 DebugBorderDrawQuad* debug_border_quad = | 173 DebugBorderDrawQuad* debug_border_quad = |
174 render_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>(); | 174 render_pass->CreateAndAppendDrawQuad<DebugBorderDrawQuad>(); |
175 debug_border_quad->SetNew(shared_quad_state, content_rect_, | 175 debug_border_quad->SetNew(shared_quad_state, content_rect_, |
176 visible_content_rect, debug_border_color, | 176 visible_content_rect, debug_border_color, |
177 debug_border_width); | 177 debug_border_width); |
178 } | 178 } |
179 | 179 |
180 ResourceProvider::ResourceId mask_resource_id = 0; | 180 ResourceId mask_resource_id = 0; |
181 gfx::Size mask_texture_size; | 181 gfx::Size mask_texture_size; |
182 gfx::Vector2dF mask_uv_scale; | 182 gfx::Vector2dF mask_uv_scale; |
183 if (mask_layer && mask_layer->DrawsContent() && | 183 if (mask_layer && mask_layer->DrawsContent() && |
184 !mask_layer->bounds().IsEmpty()) { | 184 !mask_layer->bounds().IsEmpty()) { |
185 mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size); | 185 mask_layer->GetContentsResourceId(&mask_resource_id, &mask_texture_size); |
186 gfx::Vector2dF owning_layer_draw_scale = | 186 gfx::Vector2dF owning_layer_draw_scale = |
187 MathUtil::ComputeTransform2dScaleComponents( | 187 MathUtil::ComputeTransform2dScaleComponents( |
188 owning_layer_->draw_transform(), 1.f); | 188 owning_layer_->draw_transform(), 1.f); |
189 gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize( | 189 gfx::SizeF unclipped_mask_target_size = gfx::ScaleSize( |
190 owning_layer_->content_bounds(), | 190 owning_layer_->content_bounds(), |
(...skipping 18 matching lines...) Expand all Loading... |
209 render_pass_id, | 209 render_pass_id, |
210 mask_resource_id, | 210 mask_resource_id, |
211 mask_uv_scale, | 211 mask_uv_scale, |
212 mask_texture_size, | 212 mask_texture_size, |
213 owning_layer_->filters(), | 213 owning_layer_->filters(), |
214 owning_layer_to_target_scale, | 214 owning_layer_to_target_scale, |
215 owning_layer_->background_filters()); | 215 owning_layer_->background_filters()); |
216 } | 216 } |
217 | 217 |
218 } // namespace cc | 218 } // namespace cc |
OLD | NEW |