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

Side by Side Diff: content/test/web_layer_tree_view_impl_for_testing.cc

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/web_layer_tree_view_impl_for_testing.h" 5 #include "content/test/web_layer_tree_view_impl_for_testing.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
11 #include "cc/blink/web_layer_impl.h" 11 #include "cc/blink/web_layer_impl.h"
12 #include "cc/input/input_handler.h" 12 #include "cc/input/input_handler.h"
13 #include "cc/layers/layer.h" 13 #include "cc/layers/layer.h"
14 #include "cc/scheduler/begin_frame_source.h"
14 #include "cc/test/pixel_test_output_surface.h" 15 #include "cc/test/pixel_test_output_surface.h"
15 #include "cc/test/test_context_provider.h" 16 #include "cc/test/test_context_provider.h"
16 #include "cc/trees/layer_tree_host.h" 17 #include "cc/trees/layer_tree_host.h"
17 #include "content/test/test_blink_web_unit_test_support.h" 18 #include "content/test/test_blink_web_unit_test_support.h"
18 #include "third_party/WebKit/public/platform/Platform.h" 19 #include "third_party/WebKit/public/platform/Platform.h"
19 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 20 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
20 #include "third_party/WebKit/public/platform/WebLayer.h" 21 #include "third_party/WebKit/public/platform/WebLayer.h"
21 #include "third_party/WebKit/public/platform/WebLayerTreeView.h" 22 #include "third_party/WebKit/public/platform/WebLayerTreeView.h"
22 #include "third_party/WebKit/public/platform/WebSize.h" 23 #include "third_party/WebKit/public/platform/WebSize.h"
23 #include "ui/gfx/frame_time.h" 24 #include "ui/gfx/frame_time.h"
(...skipping 12 matching lines...) Expand all
36 void WebLayerTreeViewImplForTesting::Initialize() { 37 void WebLayerTreeViewImplForTesting::Initialize() {
37 cc::LayerTreeSettings settings; 38 cc::LayerTreeSettings settings;
38 39
39 // For web contents, layer transforms should scale up the contents of layers 40 // For web contents, layer transforms should scale up the contents of layers
40 // to keep content always crisp when possible. 41 // to keep content always crisp when possible.
41 settings.layer_transforms_should_scale_layer_contents = true; 42 settings.layer_transforms_should_scale_layer_contents = true;
42 43
43 // Accelerated animations are enabled for unit tests. 44 // Accelerated animations are enabled for unit tests.
44 settings.accelerated_animation_enabled = true; 45 settings.accelerated_animation_enabled = true;
45 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded( 46 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(
46 this, this, NULL, NULL, settings, base::MessageLoopProxy::current()); 47 this,
48 this,
49 nullptr,
50 nullptr,
51 settings,
52 base::MessageLoopProxy::current(),
53 nullptr);
47 DCHECK(layer_tree_host_); 54 DCHECK(layer_tree_host_);
48 } 55 }
49 56
50 void WebLayerTreeViewImplForTesting::setSurfaceReady() { 57 void WebLayerTreeViewImplForTesting::setSurfaceReady() {
51 layer_tree_host_->SetLayerTreeHostClientReady(); 58 layer_tree_host_->SetLayerTreeHostClientReady();
52 } 59 }
53 60
54 void WebLayerTreeViewImplForTesting::setRootLayer( 61 void WebLayerTreeViewImplForTesting::setRootLayer(
55 const blink::WebLayer& root) { 62 const blink::WebLayer& root) {
56 layer_tree_host_->SetRootLayer( 63 layer_tree_host_->SetRootLayer(
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 186
180 void WebLayerTreeViewImplForTesting::registerSelection( 187 void WebLayerTreeViewImplForTesting::registerSelection(
181 const blink::WebSelectionBound& start, 188 const blink::WebSelectionBound& start,
182 const blink::WebSelectionBound& end) { 189 const blink::WebSelectionBound& end) {
183 } 190 }
184 191
185 void WebLayerTreeViewImplForTesting::clearSelection() { 192 void WebLayerTreeViewImplForTesting::clearSelection() {
186 } 193 }
187 194
188 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | mojo/services/html_viewer/weblayertreeview_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698