diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-14 16:01:52 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-14 16:01:52 +0000 |
commit | 361123eaed6f0393ce79dcbc5ecc12e8e976d0ea (patch) | |
tree | df22d1f1e863d3983dd5a4c45ad57342b3aad5b5 /gpu/command_buffer/service/framebuffer_manager.h | |
parent | 9300c488510c9d5bf77a92dac984a2447c29171d (diff) | |
download | chromium_src-361123eaed6f0393ce79dcbc5ecc12e8e976d0ea.zip chromium_src-361123eaed6f0393ce79dcbc5ecc12e8e976d0ea.tar.gz chromium_src-361123eaed6f0393ce79dcbc5ecc12e8e976d0ea.tar.bz2 |
Enforce RGB even on buggy drivers.
Also STENCIL and DEPTH.
This might not be a complete solution. It assumes
that if we ask for an RGB backbuffer or renderbuffer
and the driver gives us RGBA that we can still clear
that RGBA to 1,1,1,1. After that it sets the masks
so that alpha can never be rendered to.
Similarly for DEPTH and STENCILS.
It's possible we should just always ask for RGBA, at
least for Renderbuffers.
TEST=unit tests, ran OpenGL ES 2.0 conformance test and WebGL conformance tests.
BUG=85385
R=apatrick@chromium.org
Review URL: http://codereview.chromium.org/7099007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/framebuffer_manager.h')
-rw-r--r-- | gpu/command_buffer/service/framebuffer_manager.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/framebuffer_manager.h b/gpu/command_buffer/service/framebuffer_manager.h index 362e0b8..0641c35 100644 --- a/gpu/command_buffer/service/framebuffer_manager.h +++ b/gpu/command_buffer/service/framebuffer_manager.h @@ -36,6 +36,7 @@ class FramebufferManager { virtual GLsizei samples() const = 0; virtual bool cleared() const = 0; virtual void set_cleared() = 0; + virtual bool IsTexture(TextureManager::TextureInfo* texture) const = 0; }; explicit FramebufferInfo(GLuint service_id); @@ -72,8 +73,12 @@ class FramebufferManager { return has_been_bound_ && !IsDeleted(); } + bool HasDepthAttachment() const; + bool HasStencilAttachment() const; + GLenum GetColorAttachmentFormat() const; + // We can't know if the frame buffer is complete since that is - // implementation dependent and we'd have to check after every glTexImage + // implementation dependent and we'd have to check after every glTexImage // call but we can know in certain cases that it's NOT complete which we // need to enforce the OpenGL ES 2.0 spec on top of DesktopGL. bool IsNotComplete() const; |