summaryrefslogtreecommitdiffstats
path: root/cc/test/pixel_test_output_surface.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-09 17:24:32 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-09 17:24:32 +0000
commit573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e (patch)
treeddf1fa64341e23419bc37efe0904495d0edbe256 /cc/test/pixel_test_output_surface.cc
parent13b31b46110bb70a7dc9bbc8ebc4594442725dac (diff)
downloadchromium_src-573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e.zip
chromium_src-573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e.tar.gz
chromium_src-573e8e3e2d975af0be8bcdddef0bcc6487ec4a1e.tar.bz2
cc: Remove most methods from RendererClient.
This class is being used to pass data to the Renderer, but it's more clear if we just pass the data directly when we call DrawFrame. There are also some interesting round trips where OutputSurface sets data on the OutputSurfaceClient (LayerTreeHostImpl) which just stores the data. Then the data is accessed through the RendererClient or on the LTHI directly, but in places that could just query it from the OutputSurface directly. This patch unravels one of these loops with HasExternalStencilTest(). The remaining two getters on RendererClient are called in both DrawFrame and in SwapBuffers, so I'm not sure if we want to pass them directly to both functions (redundency is error-prone) or we have some other nice idea to get rid of them. R=enne BUG= Review URL: https://chromiumcodereview.appspot.com/23961003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/pixel_test_output_surface.cc')
-rw-r--r--cc/test/pixel_test_output_surface.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/cc/test/pixel_test_output_surface.cc b/cc/test/pixel_test_output_surface.cc
index ffc3d26c..8306cc8 100644
--- a/cc/test/pixel_test_output_surface.cc
+++ b/cc/test/pixel_test_output_surface.cc
@@ -9,6 +9,14 @@
namespace cc {
+PixelTestOutputSurface::PixelTestOutputSurface(
+ scoped_refptr<ContextProvider> context_provider)
+ : OutputSurface(context_provider), external_stencil_test_(false) {}
+
+PixelTestOutputSurface::PixelTestOutputSurface(
+ scoped_ptr<cc::SoftwareOutputDevice> software_device)
+ : OutputSurface(software_device.Pass()), external_stencil_test_(false) {}
+
void PixelTestOutputSurface::Reshape(gfx::Size size, float scale_factor) {
gfx::Size expanded_size(size.width() + surface_expansion_size_.width(),
size.height() + surface_expansion_size_.height());
@@ -22,4 +30,8 @@ void PixelTestOutputSurface::Reshape(gfx::Size size, float scale_factor) {
gfx::Transform(), offset_viewport, offset_clip, true);
}
+bool PixelTestOutputSurface::HasExternalStencilTest() const {
+ return external_stencil_test_;
+}
+
} // namespace cc