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

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

Issue 1286203002: Defer flushes if kPreferNoIO is specified (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use explicit size in test Created 5 years, 4 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/GrTextureProvider.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | 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 e93c5c100be2a206756e107c675acd10d4bfe072..26c8d4665836ff4063ac4c66e08ba1afc0f0def0 100644
--- a/src/gpu/gl/GrGLRenderTarget.cpp
+++ b/src/gpu/gl/GrGLRenderTarget.cpp
@@ -52,6 +52,8 @@ void GrGLRenderTarget::init(const GrSurfaceDesc& desc, const IDDesc& idDesc) {
size_t colorBytes = GrBytesPerPixel(fDesc.fConfig);
SkASSERT(colorBytes > 0);
fGpuMemorySize = colorValuesPerPixel * fDesc.fWidth * fDesc.fHeight * colorBytes;
+
+ SkASSERT(fGpuMemorySize <= WorseCaseSize(desc));
}
size_t GrGLRenderTarget::onGpuMemorySize() const {
« no previous file with comments | « src/gpu/GrTextureProvider.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698