| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 uv_scale_y * content_rect_.y() / content_rect_.height(), | 217 uv_scale_y * content_rect_.y() / content_rect_.height(), |
| 218 uv_scale_x, | 218 uv_scale_x, |
| 219 uv_scale_y); | 219 uv_scale_y); |
| 220 } | 220 } |
| 221 | 221 |
| 222 ResourceProvider::ResourceId mask_resource_id = | 222 ResourceProvider::ResourceId mask_resource_id = |
| 223 mask_layer ? mask_layer->ContentsResourceId() : 0; | 223 mask_layer ? mask_layer->ContentsResourceId() : 0; |
| 224 gfx::Rect contents_changed_since_last_frame = | 224 gfx::Rect contents_changed_since_last_frame = |
| 225 ContentsChanged() ? content_rect_ : gfx::Rect(); | 225 ContentsChanged() ? content_rect_ : gfx::Rect(); |
| 226 | 226 |
| 227 DCHECK(owning_layer_->draw_properties().target_space_transform.IsScale2d()); |
| 228 gfx::Vector2dF owning_layer_to_target_scale = |
| 229 owning_layer_->draw_properties().target_space_transform.Scale2d(); |
| 230 owning_layer_to_target_scale.Scale(owning_layer_->contents_scale_x(), |
| 231 owning_layer_->contents_scale_y()); |
| 232 |
| 227 RenderPassDrawQuad* quad = | 233 RenderPassDrawQuad* quad = |
| 228 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); | 234 render_pass->CreateAndAppendDrawQuad<RenderPassDrawQuad>(); |
| 229 quad->SetNew(shared_quad_state, | 235 quad->SetNew(shared_quad_state, |
| 230 content_rect_, | 236 content_rect_, |
| 231 visible_content_rect, | 237 visible_content_rect, |
| 232 render_pass_id, | 238 render_pass_id, |
| 233 for_replica, | 239 for_replica, |
| 234 mask_resource_id, | 240 mask_resource_id, |
| 235 contents_changed_since_last_frame, | 241 contents_changed_since_last_frame, |
| 236 mask_uv_rect, | 242 mask_uv_rect, |
| 237 owning_layer_->filters(), | 243 owning_layer_->filters(), |
| 244 owning_layer_to_target_scale, |
| 238 owning_layer_->background_filters()); | 245 owning_layer_->background_filters()); |
| 239 } | 246 } |
| 240 | 247 |
| 241 } // namespace cc | 248 } // namespace cc |
| OLD | NEW |