Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: src/gpu/gl/GrGpuGL.cpp

Issue 26695005: separate state for msaa renderability (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: bool to int Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGpuGL.cpp
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index cdf9be9547ab91432e9115500ecef344c9305b14..05f6e0d8aabf59254ed12fe463824a62f4be480d 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -2398,8 +2398,8 @@ inline bool can_blit_framebuffer(const GrSurface* dst,
const GrSurface* src,
const GrGpuGL* gpu,
bool* wouldNeedTempFBO = NULL) {
- if (gpu->glCaps().isConfigRenderable(dst->config()) &&
- gpu->glCaps().isConfigRenderable(src->config()) &&
+ if (gpu->glCaps().isConfigRenderable(dst->config(), dst->desc().fSampleCnt > 0) &&
+ gpu->glCaps().isConfigRenderable(src->config(), src->desc().fSampleCnt > 0) &&
gpu->glCaps().usesMSAARenderBuffers()) {
// ES3 doesn't allow framebuffer blits when the src has MSAA and the configs don't match
// or the rects are not the same (not just the same size but have the same edges).
@@ -2439,8 +2439,10 @@ inline bool can_copy_texsubimage(const GrSurface* dst,
if (NULL != srcRT && srcRT->renderFBOID() != srcRT->textureFBOID()) {
return false;
}
- if (gpu->glCaps().isConfigRenderable(src->config()) && NULL != dst->asTexture() &&
- dst->origin() == src->origin() && kIndex_8_GrPixelConfig != src->config()) {
+ if (gpu->glCaps().isConfigRenderable(src->config(), src->desc().fSampleCnt > 0) &&
+ NULL != dst->asTexture() &&
+ dst->origin() == src->origin() &&
+ kIndex_8_GrPixelConfig != src->config()) {
if (NULL != wouldNeedTempFBO) {
*wouldNeedTempFBO = NULL == src->asRenderTarget();
}
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698