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

Unified Diff: src/gpu/GrGpuResource.cpp

Issue 848903004: Require budget decision when creating a RenderTarget SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make compatible with chrome Created 5 years, 11 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
Index: src/gpu/GrGpuResource.cpp
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
index a2df7e13e8cd388922b840a6b8fbadf34e5e3509..2f267a41970609990bb2fae4f5ce07a83ed01715 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -6,7 +6,6 @@
* found in the LICENSE file.
*/
-
#include "GrGpuResource.h"
#include "GrResourceCache2.h"
#include "GrGpu.h"
@@ -134,6 +133,13 @@ void GrGpuResource::removeScratchKey() {
}
}
+void GrGpuResource::makeBudgeted() {
robertphillips 2015/01/15 20:48:17 Should we add an assert that we're not trying to m
bsalomon 2015/01/15 21:14:05 Seems ok to just ignore the request to me...
+ if (GrGpuResource::kUncached_LifeCycle == fLifeCycle) {
+ fLifeCycle = kCached_LifeCycle;
+ get_resource_cache2(fGpu)->resourceAccess().didChangeBudgetStatus(this);
+ }
+}
+
uint32_t GrGpuResource::CreateUniqueID() {
static int32_t gUniqueID = SK_InvalidUniqueID;
uint32_t id;

Powered by Google App Engine
This is Rietveld 408576698