diff options
author | joshualitt <joshualitt@chromium.org> | 2014-08-01 06:44:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-01 06:44:53 -0700 |
commit | 5816233d237e5c214f14f1c92eda4a87c898ea11 (patch) | |
tree | a988f3570e1792eb020c1dff0db898b4581780ed /src/gpu/gl/GrGpuGL.cpp | |
parent | 3836dc80a6aebdfbe06c6a4dc7a8d742c61f49ba (diff) |
FBFetch refactor + arm support
BUG=skia:
R=krajcevski@google.com, bsalomon@google.com
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/433603002
Diffstat (limited to 'src/gpu/gl/GrGpuGL.cpp')
-rw-r--r-- | src/gpu/gl/GrGpuGL.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp index 404e7abdbd..8982785b3e 100644 --- a/src/gpu/gl/GrGpuGL.cpp +++ b/src/gpu/gl/GrGpuGL.cpp @@ -275,6 +275,13 @@ void GrGpuGL::onResetContext(uint32_t resetBits) { // currently part of our gl interface. There are probably others as // well. } + + if (kGLES_GrGLStandard == this->glStandard() && + fGLContext.hasExtension("GL_ARM_shader_framebuffer_fetch")) { + // The arm extension requires specifically enabling MSAA fetching per sample. + // On some devices this may have a perf hit. Also multiple render targets are disabled + GL_CALL(Enable(GR_GL_FETCH_PER_SAMPLE_ARM)); + } fHWWriteToColor = kUnknown_TriState; // we only ever use lines in hairline mode GL_CALL(LineWidth(1)); @@ -1490,7 +1497,7 @@ void GrGpuGL::discard(GrRenderTarget* renderTarget) { GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, glRT->renderFBOID())); } switch (this->glCaps().invalidateFBType()) { - case GrGLCaps::kNone_FBFetchType: + case GrGLCaps::kNone_InvalidateFBType: SkFAIL("Should never get here."); break; case GrGLCaps::kInvalidate_InvalidateFBType: |