summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/fake_output_surface.h4
-rw-r--r--cc/test/layer_tree_test.cc5
-rw-r--r--cc/test/layer_tree_test.h7
3 files changed, 6 insertions, 10 deletions
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index c458dc6..1c91338 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -153,10 +153,6 @@ class FakeOutputSurface : public OutputSurface {
scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
};
-static inline scoped_ptr<OutputSurface> CreateFakeOutputSurface() {
- return FakeOutputSurface::Create3d().PassAs<OutputSurface>();
-}
-
} // namespace cc
#endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 333814d..986d20b 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -676,13 +676,12 @@ void LayerTreeTest::RunTestWithImplSidePainting() {
scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface(bool fallback) {
scoped_ptr<FakeOutputSurface> output_surface =
- CreateFakeOutputSurfaceForTest(fallback);
-
+ CreateFakeOutputSurface(fallback);
output_surface_ = output_surface.get();
return output_surface.PassAs<OutputSurface>();
}
-scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurfaceForTest(
+scoped_ptr<FakeOutputSurface> LayerTreeTest::CreateFakeOutputSurface(
bool fallback) {
if (delegating_renderer_)
return FakeOutputSurface::CreateDelegating3d();
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h
index 0a047fa..c1ee380 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -185,11 +185,12 @@ class LayerTreeTest : public testing::Test, public TestHooks {
FakeOutputSurface* output_surface() { return output_surface_; }
int LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl) const;
+ // Override this for pixel tests, where you need a real output surface.
virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) OVERRIDE;
- virtual scoped_refptr<ContextProvider> OffscreenContextProvider() OVERRIDE;
+ // Override this for unit tests, which should not produce pixel output.
+ virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurface(bool fallback);
- virtual scoped_ptr<FakeOutputSurface> CreateFakeOutputSurfaceForTest(
- bool fallback);
+ virtual scoped_refptr<ContextProvider> OffscreenContextProvider() OVERRIDE;
TestWebGraphicsContext3D* TestContext();