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

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

Issue 1177033008: cc: Turn impl_side_painting and use_one_copy on in LayerTreeSettings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: implon: fixwebkittests Created 5 years, 6 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
« no previous file with comments | « no previous file | cc/debug/frame_timing_tracker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 5 #include <vector>
6 #include "cc/blink/web_layer_impl_fixed_bounds.h" 6 #include "cc/blink/web_layer_impl_fixed_bounds.h"
7 #include "cc/layers/picture_image_layer.h" 7 #include "cc/layers/picture_image_layer.h"
8 #include "cc/test/fake_layer_tree_host.h" 8 #include "cc/test/fake_layer_tree_host.h"
9 #include "cc/test/geometry_test_utils.h" 9 #include "cc/test/geometry_test_utils.h"
10 #include "cc/test/test_task_graph_runner.h"
10 #include "cc/trees/layer_tree_host_common.h" 11 #include "cc/trees/layer_tree_host_common.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 13 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
13 #include "third_party/WebKit/public/platform/WebSize.h" 14 #include "third_party/WebKit/public/platform/WebSize.h"
14 #include "third_party/skia/include/utils/SkMatrix44.h" 15 #include "third_party/skia/include/utils/SkMatrix44.h"
15 #include "ui/gfx/geometry/point3_f.h" 16 #include "ui/gfx/geometry/point3_f.h"
16 17
17 using blink::WebFloatPoint; 18 using blink::WebFloatPoint;
18 using blink::WebSize; 19 using blink::WebSize;
19 20
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 99
99 WebLayerImpl* normal_layer( 100 WebLayerImpl* normal_layer(
100 new WebLayerImpl(cc::PictureImageLayer::Create(cc::LayerSettings()))); 101 new WebLayerImpl(cc::PictureImageLayer::Create(cc::LayerSettings())));
101 102
102 normal_layer->setBounds(bounds); 103 normal_layer->setBounds(bounds);
103 normal_layer->setTransform(transform.matrix()); 104 normal_layer->setTransform(transform.matrix());
104 normal_layer->setPosition(position); 105 normal_layer->setPosition(position);
105 root_layer->addChild(normal_layer); 106 root_layer->addChild(normal_layer);
106 107
107 cc::FakeLayerTreeHostClient client(cc::FakeLayerTreeHostClient::DIRECT_3D); 108 cc::FakeLayerTreeHostClient client(cc::FakeLayerTreeHostClient::DIRECT_3D);
109 cc::TestTaskGraphRunner task_graph_runner;
108 scoped_ptr<cc::FakeLayerTreeHost> host = 110 scoped_ptr<cc::FakeLayerTreeHost> host =
109 cc::FakeLayerTreeHost::Create(&client); 111 cc::FakeLayerTreeHost::Create(&client, &task_graph_runner);
110 host->SetRootLayer(root_layer->layer()); 112 host->SetRootLayer(root_layer->layer());
111 113
112 { 114 {
113 cc::RenderSurfaceLayerList render_surface_layer_list; 115 cc::RenderSurfaceLayerList render_surface_layer_list;
114 cc::LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs( 116 cc::LayerTreeHostCommon::CalcDrawPropsMainInputsForTesting inputs(
115 root_layer->layer(), kDeviceViewportSize, &render_surface_layer_list); 117 root_layer->layer(), kDeviceViewportSize, &render_surface_layer_list);
116 inputs.device_scale_factor = kDeviceScaleFactor; 118 inputs.device_scale_factor = kDeviceScaleFactor;
117 inputs.page_scale_factor = kPageScaleFactor; 119 inputs.page_scale_factor = kPageScaleFactor;
118 inputs.page_scale_layer = root_layer->layer(), 120 inputs.page_scale_layer = root_layer->layer(),
119 cc::LayerTreeHostCommon::CalculateDrawProperties(&inputs); 121 cc::LayerTreeHostCommon::CalculateDrawProperties(&inputs);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 172
171 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), transform); 173 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), transform);
172 174
173 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to 175 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to
174 // WebLayerImpl. 176 // WebLayerImpl.
175 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), transform); 177 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), transform);
176 } 178 }
177 179
178 } // namespace 180 } // namespace
179 } // namespace cc_blink 181 } // namespace cc_blink
OLDNEW
« no previous file with comments | « no previous file | cc/debug/frame_timing_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698