diff options
author | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-21 17:08:36 +0000 |
---|---|---|
committer | enne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-21 17:08:36 +0000 |
commit | f74945f8bdf328cedf72542ab94a9e87137a2155 (patch) | |
tree | 83fe1ef45dd3cbb94fc4b6e267cd66a328041ab4 /cc | |
parent | 014ec9d0321b87b884e258e6c0681008afcebfb5 (diff) | |
download | chromium_src-f74945f8bdf328cedf72542ab94a9e87137a2155.zip chromium_src-f74945f8bdf328cedf72542ab94a9e87137a2155.tar.gz chromium_src-f74945f8bdf328cedf72542ab94a9e87137a2155.tar.bz2 |
cc: Chromify FakeOutputSurface
NOTRY=true
R=danakj@chromium.org
BUG=none
Review URL: https://chromiumcodereview.appspot.com/12731017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/layers/delegated_renderer_layer_impl_unittest.cc | 2 | ||||
-rw-r--r-- | cc/layers/layer_impl_unittest.cc | 4 | ||||
-rw-r--r-- | cc/layers/nine_patch_layer_unittest.cc | 2 | ||||
-rw-r--r-- | cc/layers/picture_layer_impl_unittest.cc | 2 | ||||
-rw-r--r-- | cc/layers/texture_layer_unittest.cc | 2 | ||||
-rw-r--r-- | cc/layers/tiled_layer_unittest.cc | 2 | ||||
-rw-r--r-- | cc/resources/prioritized_resource_unittest.cc | 2 | ||||
-rw-r--r-- | cc/resources/scoped_resource_unittest.cc | 8 | ||||
-rw-r--r-- | cc/test/fake_output_surface.h | 14 | ||||
-rw-r--r-- | cc/test/layer_tree_test.cc | 2 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl_unittest.cc | 2 |
11 files changed, 20 insertions, 22 deletions
diff --git a/cc/layers/delegated_renderer_layer_impl_unittest.cc b/cc/layers/delegated_renderer_layer_impl_unittest.cc index 3a40b4eb..6fa07c9 100644 --- a/cc/layers/delegated_renderer_layer_impl_unittest.cc +++ b/cc/layers/delegated_renderer_layer_impl_unittest.cc @@ -42,7 +42,7 @@ class DelegatedRendererLayerImplTest : public testing::Test { &client_, &proxy_, &stats_instrumentation_); - host_impl_->InitializeRenderer(createFakeOutputSurface()); + host_impl_->InitializeRenderer(CreateFakeOutputSurface()); host_impl_->SetViewportSize(gfx::Size(10, 10), gfx::Size(10, 10)); } diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc index 6ff279a..e67a66e 100644 --- a/cc/layers/layer_impl_unittest.cc +++ b/cc/layers/layer_impl_unittest.cc @@ -77,7 +77,7 @@ TEST(LayerImplTest, verifyLayerChangesAreTrackedProperly) // Create a simple LayerImpl tree: FakeImplProxy proxy; FakeLayerTreeHostImpl hostImpl(&proxy); - EXPECT_TRUE(hostImpl.InitializeRenderer(createFakeOutputSurface())); + EXPECT_TRUE(hostImpl.InitializeRenderer(CreateFakeOutputSurface())); scoped_ptr<LayerImpl> root = LayerImpl::Create(hostImpl.active_tree(), 1); root->AddChild(LayerImpl::Create(hostImpl.active_tree(), 2)); LayerImpl* child = root->children()[0]; @@ -174,7 +174,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) { FakeImplProxy proxy; FakeLayerTreeHostImpl hostImpl(&proxy); - EXPECT_TRUE(hostImpl.InitializeRenderer(createFakeOutputSurface())); + EXPECT_TRUE(hostImpl.InitializeRenderer(CreateFakeOutputSurface())); scoped_ptr<LayerImpl> root = LayerImpl::Create(hostImpl.active_tree(), 1); gfx::PointF arbitraryPointF = gfx::PointF(0.125f, 0.25f); diff --git a/cc/layers/nine_patch_layer_unittest.cc b/cc/layers/nine_patch_layer_unittest.cc index 2c57d26..9e8cfad 100644 --- a/cc/layers/nine_patch_layer_unittest.cc +++ b/cc/layers/nine_patch_layer_unittest.cc @@ -108,7 +108,7 @@ TEST_F(NinePatchLayerTest, triggerFullUploadOnceWhenChangingBitmap) { DebugScopedSetImplThread implThread(proxy()); DebugScopedSetMainThreadBlocked mainThreadBlocked(proxy()); - outputSurface = createFakeOutputSurface(); + outputSurface = CreateFakeOutputSurface(); resourceProvider = ResourceProvider::Create(outputSurface.get()); params.texture->AcquireBackingTexture(resourceProvider.get()); ASSERT_TRUE(params.texture->have_backing_texture()); diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc index 3bf3ce6..49ef660a3 100644 --- a/cc/layers/picture_layer_impl_unittest.cc +++ b/cc/layers/picture_layer_impl_unittest.cc @@ -149,7 +149,7 @@ class PictureLayerImplTest : public testing::Test { PictureLayerImplTest() : host_impl_(ImplSidePaintingSettings(), &proxy_), id_(7) { - host_impl_.InitializeRenderer(createFakeOutputSurface()); + host_impl_.InitializeRenderer(CreateFakeOutputSurface()); } virtual ~PictureLayerImplTest() { diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc index d88ca61..f42c87a 100644 --- a/cc/layers/texture_layer_unittest.cc +++ b/cc/layers/texture_layer_unittest.cc @@ -385,7 +385,7 @@ class TextureLayerImplWithMailboxTest : public TextureLayerTest { virtual void SetUp() { TextureLayerTest::SetUp(); layer_tree_host_.reset(new MockLayerTreeHost(&fake_client_)); - EXPECT_TRUE(host_impl_.InitializeRenderer(createFakeOutputSurface())); + EXPECT_TRUE(host_impl_.InitializeRenderer(CreateFakeOutputSurface())); } CommonMailboxObjects test_data_; diff --git a/cc/layers/tiled_layer_unittest.cc b/cc/layers/tiled_layer_unittest.cc index f9a4739..2c355e6 100644 --- a/cc/layers/tiled_layer_unittest.cc +++ b/cc/layers/tiled_layer_unittest.cc @@ -47,7 +47,7 @@ class TiledLayerTest : public testing::Test { public: TiledLayerTest() : proxy_(NULL) - , m_outputSurface(createFakeOutputSurface()) + , m_outputSurface(CreateFakeOutputSurface()) , m_queue(make_scoped_ptr(new ResourceUpdateQueue)) , m_fakeLayerImplTreeHostClient(FakeLayerTreeHostClient::DIRECT_3D) , m_occlusion(0) diff --git a/cc/resources/prioritized_resource_unittest.cc b/cc/resources/prioritized_resource_unittest.cc index 17dd746..7b10d72 100644 --- a/cc/resources/prioritized_resource_unittest.cc +++ b/cc/resources/prioritized_resource_unittest.cc @@ -20,7 +20,7 @@ class PrioritizedResourceTest : public testing::Test { : proxy_(scoped_ptr<Thread>(NULL)), texture_size_(256, 256), texture_format_(GL_RGBA), - output_surface_(createFakeOutputSurface()) { + output_surface_(CreateFakeOutputSurface()) { DebugScopedSetImplThread impl_thread(&proxy_); resource_provider_ = cc::ResourceProvider::Create(output_surface_.get()); } diff --git a/cc/resources/scoped_resource_unittest.cc b/cc/resources/scoped_resource_unittest.cc index 3e11658b..4a425bf 100644 --- a/cc/resources/scoped_resource_unittest.cc +++ b/cc/resources/scoped_resource_unittest.cc @@ -17,7 +17,7 @@ namespace { TEST(ScopedResourceTest, NewScopedResource) { - scoped_ptr<OutputSurface> context(createFakeOutputSurface()); + scoped_ptr<OutputSurface> context(CreateFakeOutputSurface()); scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::Create(context.get())); scoped_ptr<ScopedResource> texture = ScopedResource::create(resourceProvider.get()); @@ -31,7 +31,7 @@ TEST(ScopedResourceTest, NewScopedResource) TEST(ScopedResourceTest, CreateScopedResource) { - scoped_ptr<OutputSurface> context(createFakeOutputSurface()); + scoped_ptr<OutputSurface> context(CreateFakeOutputSurface()); scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::Create(context.get())); scoped_ptr<ScopedResource> texture = ScopedResource::create(resourceProvider.get()); texture->Allocate(gfx::Size(30, 30), GL_RGBA, ResourceProvider::TextureUsageAny); @@ -47,7 +47,7 @@ TEST(ScopedResourceTest, CreateScopedResource) TEST(ScopedResourceTest, ScopedResourceIsDeleted) { - scoped_ptr<OutputSurface> context(createFakeOutputSurface()); + scoped_ptr<OutputSurface> context(CreateFakeOutputSurface()); scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::Create(context.get())); { @@ -74,7 +74,7 @@ TEST(ScopedResourceTest, ScopedResourceIsDeleted) TEST(ScopedResourceTest, LeakScopedResource) { - scoped_ptr<OutputSurface> context(createFakeOutputSurface()); + scoped_ptr<OutputSurface> context(CreateFakeOutputSurface()); scoped_ptr<ResourceProvider> resourceProvider(ResourceProvider::Create(context.get())); { diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h index 1b5036e..64c99ae 100644 --- a/cc/test/fake_output_surface.h +++ b/cc/test/fake_output_surface.h @@ -61,7 +61,7 @@ class FakeOutputSurface : public OutputSurface { CompositorFrame& last_sent_frame() { return last_sent_frame_; } size_t num_sent_frames() { return num_sent_frames_; } -private: + private: FakeOutputSurface( scoped_ptr<WebKit::WebGraphicsContext3D> context3d, bool has_parent); @@ -74,13 +74,11 @@ private: size_t num_sent_frames_; }; -static inline scoped_ptr<cc::OutputSurface> createFakeOutputSurface() -{ - return FakeOutputSurface::Create3d( - TestWebGraphicsContext3D::Create( - WebKit::WebGraphicsContext3D::Attributes()) - .PassAs<WebKit::WebGraphicsContext3D>()) - .PassAs<cc::OutputSurface>(); +static inline scoped_ptr<cc::OutputSurface> CreateFakeOutputSurface() { + return FakeOutputSurface::Create3d( + TestWebGraphicsContext3D::Create( + WebKit::WebGraphicsContext3D::Attributes()) + .PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::OutputSurface>(); } } // namespace cc diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index f4f421d..9f6a0d6 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -47,7 +47,7 @@ bool TestHooks::CanActivatePendingTree() { } scoped_ptr<OutputSurface> TestHooks::CreateOutputSurface() { - return createFakeOutputSurface(); + return CreateFakeOutputSurface(); } scoped_refptr<cc::ContextProvider> TestHooks:: diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index 814260f..e25dbc7 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -212,7 +212,7 @@ public: void pinchZoomPanViewportAndScrollBoundaryTest(const float deviceScaleFactor); protected: - virtual scoped_ptr<OutputSurface> createOutputSurface() { return createFakeOutputSurface(); } + virtual scoped_ptr<OutputSurface> createOutputSurface() { return CreateFakeOutputSurface(); } void drawOneFrame() { LayerTreeHostImpl::FrameData frameData; |