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 796163002: Adding a custom data field to GrGpuResource (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: ref Created 6 years 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 | « include/gpu/GrGpuResource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResource.cpp
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
index cc24335184c2b98662e5f9133c4459d179ac3a76..2a5718aefad38a14bd012a16082674ef5e600faa 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -56,6 +56,12 @@ void GrGpuResource::abandon() {
fGpuMemorySize = 0;
}
+const SkData* GrGpuResource::setCustomData(const SkData* data) {
+ SkSafeRef(data);
+ fData.reset(data);
+ return data;
+}
+
const GrContext* GrGpuResource::getContext() const {
if (fGpu) {
return fGpu->getContext();
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698