summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_output_surface.h
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-11 15:39:02 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-11 15:39:02 +0000
commitd49c540249dee66b6aff4b1663e2f8be38e13e71 (patch)
tree9264ba0fefe6813ecf91b1046142280f3c3aa38f /cc/test/fake_output_surface.h
parent18262f4feb15c98c58a9b26bd57d4d8e8e2f9577 (diff)
downloadchromium_src-d49c540249dee66b6aff4b1663e2f8be38e13e71.zip
chromium_src-d49c540249dee66b6aff4b1663e2f8be38e13e71.tar.gz
chromium_src-d49c540249dee66b6aff4b1663e2f8be38e13e71.tar.bz2
cc: Invalidate appropriate FBO attachment for offscreen rendering
The glInvalidateFramebuffer() uses different attachment names for the default framebuffer and offscreen framebuffers. In the first case we should use GL_COLOR_EXT, whereas offscreen framebuffers expect GL_COLOR_ATTACHMENTn. This patch adds code to keep track of whether GLRenderer is drawing to the default framebuffer or an offscreen one. This information is used to pass the right attachment name when clearing and invalidating the framebuffer. BUG=288635 Review URL: https://chromiumcodereview.appspot.com/24089004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222568 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_output_surface.h')
-rw-r--r--cc/test/fake_output_surface.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index ab91089..79b0f39 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -80,6 +80,14 @@ class FakeOutputSurface : public OutputSurface {
return surface.Pass();
}
+ static scoped_ptr<FakeOutputSurface> CreateOffscreen(
+ scoped_ptr<TestWebGraphicsContext3D> context) {
+ scoped_ptr<FakeOutputSurface> surface(new FakeOutputSurface(
+ TestContextProvider::Create(context.Pass()), false));
+ surface->capabilities_.uses_default_gl_framebuffer = false;
+ return surface.Pass();
+ }
+
CompositorFrame& last_sent_frame() { return last_sent_frame_; }
size_t num_sent_frames() { return num_sent_frames_; }