diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-10-13 13:24:50 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-10-14 10:57:25 +0000 |
commit | af3d4809763ef308f08ced947a73b624729ac7ea (patch) | |
tree | 4402b911e30383f6c6dace1e8cf3b8e85355db3a /chromium/third_party/angle/src/libANGLE/renderer/gl/TextureGL.h | |
parent | 0e8ff63a407fe323e215bb1a2c423c09a4747c8a (diff) |
BASELINE: Update Chromium to 47.0.2526.14
Also adding in sources needed for spellchecking.
Change-Id: Idd44170fa1616f26315188970a8d5ba7d472b18a
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/third_party/angle/src/libANGLE/renderer/gl/TextureGL.h')
-rw-r--r-- | chromium/third_party/angle/src/libANGLE/renderer/gl/TextureGL.h | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/chromium/third_party/angle/src/libANGLE/renderer/gl/TextureGL.h b/chromium/third_party/angle/src/libANGLE/renderer/gl/TextureGL.h index bf243da46e8..6d64d9d1f36 100644 --- a/chromium/third_party/angle/src/libANGLE/renderer/gl/TextureGL.h +++ b/chromium/third_party/angle/src/libANGLE/renderer/gl/TextureGL.h @@ -15,13 +15,47 @@ namespace rx { +class BlitGL; class FunctionsGL; class StateManagerGL; +struct WorkaroundsGL; + +struct LUMAWorkaroundGL +{ + bool enabled; + GLenum workaroundFormat; + + LUMAWorkaroundGL(); + LUMAWorkaroundGL(bool enabled, GLenum workaroundFormat); +}; + +// Structure containing information about format and workarounds for each mip level of the +// TextureGL. +struct LevelInfoGL +{ + // Format of the data used in this mip level. + GLenum sourceFormat; + + // If this mip level requires sampler-state re-writing so that only a red channel is exposed. + bool depthStencilWorkaround; + + // Information about luminance alpha texture workarounds in the core profile. + LUMAWorkaroundGL lumaWorkaround; + + LevelInfoGL(); + LevelInfoGL(GLenum sourceFormat, + bool depthStencilWorkaround, + const LUMAWorkaroundGL &lumaWorkaround); +}; class TextureGL : public TextureImpl { public: - TextureGL(GLenum type, const FunctionsGL *functions, StateManagerGL *stateManager); + TextureGL(GLenum type, + const FunctionsGL *functions, + const WorkaroundsGL &workarounds, + StateManagerGL *stateManager, + BlitGL *blitter); ~TextureGL() override; void setUsage(GLenum usage) override; @@ -43,12 +77,14 @@ class TextureGL : public TextureImpl gl::Error setStorage(GLenum target, size_t levels, GLenum internalFormat, const gl::Extents &size) override; - gl::Error generateMipmaps(const gl::SamplerState &samplerState) override; + gl::Error generateMipmaps(const gl::TextureState &textureState) override; void bindTexImage(egl::Surface *surface) override; void releaseTexImage() override; - void syncSamplerState(const gl::SamplerState &samplerState) const; + gl::Error setEGLImageTarget(GLenum target, egl::Image *image) override; + + void syncState(size_t textureUnit, const gl::TextureState &textureState) const; GLuint getTextureID() const; gl::Error getAttachmentRenderTarget(const gl::FramebufferAttachment::Target &target, @@ -61,9 +97,13 @@ class TextureGL : public TextureImpl GLenum mTextureType; const FunctionsGL *mFunctions; + const WorkaroundsGL &mWorkarounds; StateManagerGL *mStateManager; + BlitGL *mBlitter; + + std::vector<LevelInfoGL> mLevelInfo; - mutable gl::SamplerState mAppliedSamplerState; + mutable gl::TextureState mAppliedTextureState; GLuint mTextureID; }; |