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

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

Issue 1115233002: Fix gpu memory accounting for auto-resolving MSAA. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix it in init() Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLRenderTarget.cpp
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp
index 3eb2ae09fea489802fe38faa77523be8c6c17fc9..f90689339b5494dbc2826bee3958aac5beb7eb84 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -43,7 +43,10 @@ void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
if (fTexFBOID != fRTFBOID) {
// If we own the resolve buffer then that is one more sample per pixel.
fColorValuesPerPixel += 1;
- }
+ } else if (fTexFBOID != 0) {
+ // For auto-resolving FBOs, the MSAA buffer is free.
+ fColorValuesPerPixel = 1;
bsalomon 2015/04/30 17:34:28 looks ok to me, but can we rename this to somethin
+ }
}
size_t GrGLRenderTarget::onGpuMemorySize() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698