summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-06 05:26:08 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-06 05:26:08 +0000
commit199e9257d7e6da23084e5ce1d971612bf8ad4c5a (patch)
treeee93ee2ebb2cb3e5b4d329246c2a953183d30776 /cc/test
parent1de414e56ef482f10f3e37ec39d0812960065614 (diff)
downloadchromium_src-199e9257d7e6da23084e5ce1d971612bf8ad4c5a.zip
chromium_src-199e9257d7e6da23084e5ce1d971612bf8ad4c5a.tar.gz
chromium_src-199e9257d7e6da23084e5ce1d971612bf8ad4c5a.tar.bz2
Revert 171403
cc_unittests is failing. Looks like something conflicted with this. > cc: Finish the rename from cc::GraphicsContext to cc::OutputSurface > > It is far too confusing to deal with OutputSurface code when half the time it is > called a GraphicsContext in correctly. Cleaning this up so I can think about the > code properly as I upstream the Ubercomp CL. > > NOTRY=true > R=jamesr,piman > BUG=146080 > > > Review URL: https://chromiumcodereview.appspot.com/11450019 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/11439026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/fake_graphics_context.h22
-rw-r--r--cc/test/fake_output_surface.h22
-rw-r--r--cc/test/fake_proxy.cc4
-rw-r--r--cc/test/fake_proxy.h6
-rw-r--r--cc/test/fake_web_graphics_context_3d_unittest.cc31
5 files changed, 27 insertions, 58 deletions
diff --git a/cc/test/fake_graphics_context.h b/cc/test/fake_graphics_context.h
new file mode 100644
index 0000000..aecfcc4
--- /dev/null
+++ b/cc/test/fake_graphics_context.h
@@ -0,0 +1,22 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TEST_FAKE_GRAPHICS_CONTEXT_H_
+#define CC_TEST_FAKE_GRAPHICS_CONTEXT_H_
+
+#include "cc/graphics_context.h"
+#include "cc/test/compositor_fake_web_graphics_context_3d.h"
+#include "cc/test/fake_web_compositor_output_surface.h"
+#include <public/WebCompositorOutputSurface.h>
+
+namespace WebKit {
+
+static inline scoped_ptr<cc::GraphicsContext> createFakeGraphicsContext()
+{
+ return FakeWebCompositorOutputSurface::create(CompositorFakeWebGraphicsContext3D::create(WebGraphicsContext3D::Attributes()).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::GraphicsContext>();
+}
+
+} // namespace WebKit
+
+#endif // CC_TEST_FAKE_GRAPHICS_CONTEXT_H_
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
deleted file mode 100644
index 69bce19..0000000
--- a/cc/test/fake_output_surface.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
-#define CC_TEST_FAKE_OUTPUT_SURFACE_H_
-
-#include "cc/output_surface.h"
-#include "cc/test/compositor_fake_web_graphics_context_3d.h"
-#include "cc/test/fake_web_compositor_output_surface.h"
-#include <public/WebCompositorOutputSurface.h>
-
-namespace cc {
-
-static inline scoped_ptr<cc::OutputSurface> createFakeOutputSurface()
-{
- return WebKit::FakeWebCompositorOutputSurface::create(WebKit::CompositorFakeWebGraphicsContext3D::create(WebKit::WebGraphicsContext3D::Attributes()).PassAs<WebKit::WebGraphicsContext3D>()).PassAs<cc::OutputSurface>();
-}
-
-} // namespace WebKit
-
-#endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
diff --git a/cc/test/fake_proxy.cc b/cc/test/fake_proxy.cc
index df2c072..d485056 100644
--- a/cc/test/fake_proxy.cc
+++ b/cc/test/fake_proxy.cc
@@ -16,7 +16,7 @@ bool FakeProxy::isStarted() const
return true;
}
-bool FakeProxy::initializeOutputSurface()
+bool FakeProxy::initializeContext()
{
return true;
}
@@ -26,7 +26,7 @@ bool FakeProxy::initializeRenderer()
return true;
}
-bool FakeProxy::recreateOutputSurface()
+bool FakeProxy::recreateContext()
{
return true;
}
diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h
index c89f120..3bbacb5 100644
--- a/cc/test/fake_proxy.h
+++ b/cc/test/fake_proxy.h
@@ -19,11 +19,11 @@ public:
virtual void startPageScaleAnimation(gfx::Vector2d targetPosition, bool useAnchor, float scale, base::TimeDelta duration) OVERRIDE { }
virtual void finishAllRendering() OVERRIDE { }
virtual bool isStarted() const OVERRIDE;
- virtual bool initializeOutputSurface() OVERRIDE;
+ virtual bool initializeContext() OVERRIDE;
virtual void setSurfaceReady() OVERRIDE { }
virtual void setVisible(bool) OVERRIDE { }
virtual bool initializeRenderer() OVERRIDE;
- virtual bool recreateOutputSurface() OVERRIDE;
+ virtual bool recreateContext() OVERRIDE;
virtual void renderingStats(RenderingStats*) OVERRIDE { }
virtual const RendererCapabilities& rendererCapabilities() const OVERRIDE;
virtual void setNeedsAnimate() OVERRIDE { }
@@ -37,7 +37,7 @@ public:
virtual void forceSerializeOnSwapBuffers() OVERRIDE { }
virtual size_t maxPartialTextureUpdates() const OVERRIDE;
virtual void acquireLayerTextures() OVERRIDE { }
- virtual void loseOutputSurface() OVERRIDE { }
+ virtual void loseContext() OVERRIDE { }
virtual RendererCapabilities& rendererCapabilities();
void setMaxPartialTextureUpdates(size_t);
diff --git a/cc/test/fake_web_graphics_context_3d_unittest.cc b/cc/test/fake_web_graphics_context_3d_unittest.cc
deleted file mode 100644
index ade749f..0000000
--- a/cc/test/fake_web_graphics_context_3d_unittest.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/compiler_specific.h"
-#include "base/memory/scoped_ptr.h"
-#include "cc/test/fake_web_graphics_context_3d.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class ContextThatCountsMakeCurrents : public WebKit::FakeWebGraphicsContext3D {
-public:
- ContextThatCountsMakeCurrents() : m_makeCurrentCount(0) { }
- virtual bool makeContextCurrent() OVERRIDE
- {
- m_makeCurrentCount++;
- return true;
- }
- int makeCurrentCount() const { return m_makeCurrentCount; }
-
-private:
- int m_makeCurrentCount;
-};
-
-
-TEST(FakeWebGraphicsContext3DTest, CreationShouldNotMakeCurrent)
-{
- scoped_ptr<ContextThatCountsMakeCurrents> context(new ContextThatCountsMakeCurrents);
- EXPECT_TRUE(context.get());
- EXPECT_EQ(0, context->makeCurrentCount());
-}