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

Side by Side Diff: cc/test/layer_tree_test_common.cc

Issue 11348371: cc: Move WebCompositorOutputSurface and related classes into cc/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forlanding6 Created 8 years 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
« no previous file with comments | « cc/test/layer_tree_test_common.h ('k') | cc/test/pixel_test_output_surface.h » ('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 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/test/layer_tree_test_common.h" 5 #include "cc/test/layer_tree_test_common.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "cc/active_animation.h" 8 #include "cc/active_animation.h"
9 #include "cc/content_layer.h" 9 #include "cc/content_layer.h"
10 #include "cc/font_atlas.h" 10 #include "cc/font_atlas.h"
11 #include "cc/input_handler.h" 11 #include "cc/input_handler.h"
12 #include "cc/layer.h" 12 #include "cc/layer.h"
13 #include "cc/layer_animation_controller.h" 13 #include "cc/layer_animation_controller.h"
14 #include "cc/layer_impl.h" 14 #include "cc/layer_impl.h"
15 #include "cc/layer_tree_host_impl.h" 15 #include "cc/layer_tree_host_impl.h"
16 #include "cc/scoped_thread_proxy.h" 16 #include "cc/scoped_thread_proxy.h"
17 #include "cc/single_thread_proxy.h" 17 #include "cc/single_thread_proxy.h"
18 #include "cc/thread_impl.h" 18 #include "cc/thread_impl.h"
19 #include "cc/test/animation_test_common.h" 19 #include "cc/test/animation_test_common.h"
20 #include "cc/test/fake_web_compositor_output_surface.h" 20 #include "cc/test/fake_output_surface.h"
21 #include "cc/test/fake_web_graphics_context_3d.h" 21 #include "cc/test/fake_web_graphics_context_3d.h"
22 #include "cc/test/occlusion_tracker_test_common.h" 22 #include "cc/test/occlusion_tracker_test_common.h"
23 #include "cc/test/tiled_layer_test_common.h" 23 #include "cc/test/tiled_layer_test_common.h"
24 #include "cc/timing_function.h" 24 #include "cc/timing_function.h"
25 #include "testing/gmock/include/gmock/gmock.h" 25 #include "testing/gmock/include/gmock/gmock.h"
26 #include <public/WebFilterOperation.h> 26 #include <public/WebFilterOperation.h>
27 #include <public/WebFilterOperations.h> 27 #include <public/WebFilterOperations.h>
28 28
29 using cc::FontAtlas;
30 using cc::InputHandler;
31 using cc::Layer;
32 using cc::LayerTreeHostImplClient;
33 using cc::LayerTreeSettings;
34 using cc::Proxy;
35 using cc::ScopedThreadProxy;
36
37 using namespace WebKit; 29 using namespace WebKit;
38 30
39 namespace WebKitTests { 31 namespace cc {
40 32
41 scoped_ptr<CompositorFakeWebGraphicsContext3DWithTextureTracking> CompositorFake WebGraphicsContext3DWithTextureTracking::create(Attributes attrs) 33 scoped_ptr<CompositorFakeWebGraphicsContext3DWithTextureTracking> CompositorFake WebGraphicsContext3DWithTextureTracking::create(Attributes attrs)
42 { 34 {
43 return make_scoped_ptr(new CompositorFakeWebGraphicsContext3DWithTextureTrac king(attrs)); 35 return make_scoped_ptr(new CompositorFakeWebGraphicsContext3DWithTextureTrac king(attrs));
44 } 36 }
45 37
46 WebGLId CompositorFakeWebGraphicsContext3DWithTextureTracking::createTexture() 38 WebGLId CompositorFakeWebGraphicsContext3DWithTextureTracking::createTexture()
47 { 39 {
48 WebGLId texture = m_textures.size() + 1; 40 WebGLId texture = m_textures.size() + 1;
49 m_textures.push_back(texture); 41 m_textures.push_back(texture);
(...skipping 30 matching lines...) Expand all
80 72
81 CompositorFakeWebGraphicsContext3DWithTextureTracking::~CompositorFakeWebGraphic sContext3DWithTextureTracking() 73 CompositorFakeWebGraphicsContext3DWithTextureTracking::~CompositorFakeWebGraphic sContext3DWithTextureTracking()
82 { 74 {
83 } 75 }
84 76
85 bool TestHooks::prepareToDrawOnThread(cc::LayerTreeHostImpl*) 77 bool TestHooks::prepareToDrawOnThread(cc::LayerTreeHostImpl*)
86 { 78 {
87 return true; 79 return true;
88 } 80 }
89 81
90 scoped_ptr<WebCompositorOutputSurface> TestHooks::createOutputSurface() 82 scoped_ptr<OutputSurface> TestHooks::createOutputSurface()
91 { 83 {
92 return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsConte xt3DWithTextureTracking::create(WebGraphicsContext3D::Attributes()).PassAs<WebKi t::WebGraphicsContext3D>()).PassAs<WebKit::WebCompositorOutputSurface>(); 84 return FakeOutputSurface::Create3d(CompositorFakeWebGraphicsContext3DWithTex tureTracking::create(WebGraphicsContext3D::Attributes()).PassAs<WebKit::WebGraph icsContext3D>()).PassAs<OutputSurface>();
93 } 85 }
94 86
95 scoped_ptr<MockLayerTreeHostImpl> MockLayerTreeHostImpl::create(TestHooks* testH ooks, const LayerTreeSettings& settings, LayerTreeHostImplClient* client, Proxy* proxy) 87 scoped_ptr<MockLayerTreeHostImpl> MockLayerTreeHostImpl::create(TestHooks* testH ooks, const LayerTreeSettings& settings, LayerTreeHostImplClient* client, Proxy* proxy)
96 { 88 {
97 return make_scoped_ptr(new MockLayerTreeHostImpl(testHooks, settings, client , proxy)); 89 return make_scoped_ptr(new MockLayerTreeHostImpl(testHooks, settings, client , proxy));
98 } 90 }
99 91
100 void MockLayerTreeHostImpl::beginCommit() 92 void MockLayerTreeHostImpl::beginCommit()
101 { 93 {
102 LayerTreeHostImpl::beginCommit(); 94 LayerTreeHostImpl::beginCommit();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 virtual void layout() OVERRIDE 212 virtual void layout() OVERRIDE
221 { 213 {
222 m_testHooks->layout(); 214 m_testHooks->layout();
223 } 215 }
224 216
225 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float scale) OVERR IDE 217 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, float scale) OVERR IDE
226 { 218 {
227 m_testHooks->applyScrollAndScale(scrollDelta, scale); 219 m_testHooks->applyScrollAndScale(scrollDelta, scale);
228 } 220 }
229 221
230 virtual scoped_ptr<WebCompositorOutputSurface> createOutputSurface() OVERRID E 222 virtual scoped_ptr<OutputSurface> createOutputSurface() OVERRIDE
231 { 223 {
232 return m_testHooks->createOutputSurface(); 224 return m_testHooks->createOutputSurface();
233 } 225 }
234 226
235 virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE 227 virtual void didRecreateOutputSurface(bool succeeded) OVERRIDE
236 { 228 {
237 m_testHooks->didRecreateOutputSurface(succeeded); 229 m_testHooks->didRecreateOutputSurface(succeeded);
238 } 230 }
239 231
240 virtual scoped_ptr<InputHandler> createInputHandler() OVERRIDE 232 virtual scoped_ptr<InputHandler> createInputHandler() OVERRIDE
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 488
497 ASSERT_FALSE(m_layerTreeHost.get()); 489 ASSERT_FALSE(m_layerTreeHost.get());
498 m_client.reset(); 490 m_client.reset();
499 if (m_timedOut) { 491 if (m_timedOut) {
500 FAIL() << "Test timed out"; 492 FAIL() << "Test timed out";
501 return; 493 return;
502 } 494 }
503 afterTest(); 495 afterTest();
504 } 496 }
505 497
506 } // namespace WebKitTests 498 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test_common.h ('k') | cc/test/pixel_test_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698