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

Side by Side Diff: src/gpu/gl/GrGLRenderTarget.h

Issue 1115233002: Fix gpu memory accounting for auto-resolving MSAA. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cache the total computed vram size, not the color values per pixel Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef GrGLRenderTarget_DEFINED 9 #ifndef GrGLRenderTarget_DEFINED
10 #define GrGLRenderTarget_DEFINED 10 #define GrGLRenderTarget_DEFINED
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // We track this separately from GrGpuResource because this may be both a te xture and a render 80 // We track this separately from GrGpuResource because this may be both a te xture and a render
81 // target, and the texture may be wrapped while the render target is not. 81 // target, and the texture may be wrapped while the render target is not.
82 bool fIsWrapped; 82 bool fIsWrapped;
83 83
84 // when we switch to this render target we want to set the viewport to 84 // when we switch to this render target we want to set the viewport to
85 // only render to content area (as opposed to the whole allocation) and 85 // only render to content area (as opposed to the whole allocation) and
86 // we want the rendering to be at top left (GL has origin in bottom left) 86 // we want the rendering to be at top left (GL has origin in bottom left)
87 GrGLIRect fViewport; 87 GrGLIRect fViewport;
88 88
89 // onGpuMemorySize() needs to know what how many color values are owned per pixel. However, 89 // onGpuMemorySize() needs to know the VRAM footprint of the FBO(s). However , abandon and
90 // abandon and release zero out the IDs and the cache needs to know the size even after those 90 // release zero out the IDs and the cache needs to know the size even after those actions.
91 // actions. 91 size_t fGpuMemorySize;
92 uint8_t fColorValuesPerPixel;
93 92
94 typedef GrRenderTarget INHERITED; 93 typedef GrRenderTarget INHERITED;
95 }; 94 };
96 95
97 #endif 96 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698