Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: cc/blink/web_layer_impl_fixed_bounds.cc

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" 5 #include "cc/blink/web_layer_impl_fixed_bounds.h"
6 6
7 #include "cc/layers/layer.h" 7 #include "cc/layers/layer.h"
8 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 8 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
9 #include "third_party/WebKit/public/platform/WebSize.h" 9 #include "third_party/WebKit/public/platform/WebSize.h"
10 #include "third_party/skia/include/utils/SkMatrix44.h" 10 #include "third_party/skia/include/utils/SkMatrix44.h"
11 11
12 using cc::Layer; 12 using cc::Layer;
13 13
14 namespace content { 14 namespace cc_blink {
15 15
16 WebLayerImplFixedBounds::WebLayerImplFixedBounds() { 16 WebLayerImplFixedBounds::WebLayerImplFixedBounds() {
17 } 17 }
18 18
19 WebLayerImplFixedBounds::WebLayerImplFixedBounds(scoped_refptr<Layer> layer) 19 WebLayerImplFixedBounds::WebLayerImplFixedBounds(scoped_refptr<Layer> layer)
20 : WebLayerImpl(layer) { 20 : WebLayerImpl(layer) {
21 } 21 }
22 22
23 WebLayerImplFixedBounds::~WebLayerImplFixedBounds() { 23 WebLayerImplFixedBounds::~WebLayerImplFixedBounds() {
24 } 24 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Apply bounds scale (bounds/fixed_bounds) over original transform. 90 // Apply bounds scale (bounds/fixed_bounds) over original transform.
91 gfx::Transform transform_with_bounds_scale(original_transform_); 91 gfx::Transform transform_with_bounds_scale(original_transform_);
92 float bounds_scale_x = 92 float bounds_scale_x =
93 static_cast<float>(original_bounds_.width()) / fixed_bounds_.width(); 93 static_cast<float>(original_bounds_.width()) / fixed_bounds_.width();
94 float bounds_scale_y = 94 float bounds_scale_y =
95 static_cast<float>(original_bounds_.height()) / fixed_bounds_.height(); 95 static_cast<float>(original_bounds_.height()) / fixed_bounds_.height();
96 transform_with_bounds_scale.Scale(bounds_scale_x, bounds_scale_y); 96 transform_with_bounds_scale.Scale(bounds_scale_x, bounds_scale_y);
97 layer_->SetTransform(transform_with_bounds_scale); 97 layer_->SetTransform(transform_with_bounds_scale);
98 } 98 }
99 99
100 } // namespace content 100 } // namespace cc_blink
101
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl_fixed_bounds.h ('k') | cc/blink/web_layer_impl_fixed_bounds_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698