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/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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 uv_scale_y); | 212 uv_scale_y); |
| 213 } | 213 } |
| 214 | 214 |
| 215 gfx::Rect visible_content_rect(content_rect_); | 215 gfx::Rect visible_content_rect(content_rect_); |
| 216 ResourceProvider::ResourceId mask_resource_id = | 216 ResourceProvider::ResourceId mask_resource_id = |
| 217 mask_layer ? mask_layer->ContentsResourceId() : 0; | 217 mask_layer ? mask_layer->ContentsResourceId() : 0; |
| 218 gfx::Rect contents_changed_since_last_frame = | 218 gfx::Rect contents_changed_since_last_frame = |
| 219 ContentsChanged() ? content_rect_ : gfx::Rect(); | 219 ContentsChanged() ? content_rect_ : gfx::Rect(); |
| 220 | 220 |
| 221 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); | 221 scoped_ptr<RenderPassDrawQuad> quad = RenderPassDrawQuad::Create(); |
| 222 gfx::Transform scaleTransform; | |
|
danakj
2014/03/07 20:54:05
owning_layer_to_target_transform
Stephen White
2014/03/07 21:54:14
I'm gonna try just pulling out the Scale2D compone
danakj
2014/03/07 22:04:17
Yep sounds good, and we'll have to defer that to G
| |
| 223 scaleTransform.Scale(owning_layer_->contents_scale_x(), | |
| 224 owning_layer_->contents_scale_y()); | |
| 225 scaleTransform.PreconcatTransform( | |
| 226 owning_layer_->draw_properties().target_space_transform); | |
| 227 DCHECK(scaleTransform.IsScale2d()); | |
| 222 quad->SetNew(shared_quad_state, | 228 quad->SetNew(shared_quad_state, |
| 223 content_rect_, | 229 content_rect_, |
| 224 visible_content_rect, | 230 visible_content_rect, |
| 225 render_pass_id, | 231 render_pass_id, |
| 226 for_replica, | 232 for_replica, |
| 227 mask_resource_id, | 233 mask_resource_id, |
| 228 contents_changed_since_last_frame, | 234 contents_changed_since_last_frame, |
| 229 mask_uv_rect, | 235 mask_uv_rect, |
| 230 owning_layer_->filters(), | 236 owning_layer_->filters(), |
| 231 owning_layer_->background_filters()); | 237 owning_layer_->background_filters(), |
| 238 scaleTransform.Scale2d()); | |
| 232 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); | 239 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); |
| 233 } | 240 } |
| 234 | 241 |
| 235 } // namespace cc | 242 } // namespace cc |
| OLD | NEW |