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

Unified Diff: src/image/SkImage_Gpu.h

Issue 1262923003: cache private readback for gpu-images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address items in #4 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/core/SkPixelRef.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Gpu.h
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index 4c7ebd6f7185aef5c4d36c5157ba18982c48943f..9481690714c9619b6b17369b549f6c1b580f21c5 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -8,6 +8,7 @@
#ifndef SkImage_Gpu_DEFINED
#define SkImage_Gpu_DEFINED
+#include "SkAtomics.h"
#include "GrTexture.h"
#include "GrGpuResourcePriv.h"
#include "SkBitmap.h"
@@ -17,14 +18,13 @@
class SkImage_Gpu : public SkImage_Base {
public:
-
-
/**
* An "image" can be a subset/window into a larger texture, so we explicit take the
* width and height.
*/
SkImage_Gpu(int w, int h, uint32_t uniqueID, SkAlphaType, GrTexture*,
int sampleCountForNewSurfaces, SkSurface::Budgeted);
+ ~SkImage_Gpu() override;
void applyBudgetDecision() const {
GrTexture* tex = this->getTexture();
@@ -47,10 +47,12 @@ public:
int srcX, int srcY) const override;
private:
- SkAutoTUnref<GrTexture> fTexture;
- const int fSampleCountForNewSurfaces; // 0 if we don't know
- const SkAlphaType fAlphaType;
- SkSurface::Budgeted fBudgeted;
+ SkAutoTUnref<GrTexture> fTexture;
+ const int fSampleCountForNewSurfaces; // 0 if we don't know
+ const SkAlphaType fAlphaType;
+ const SkSurface::Budgeted fBudgeted;
+ mutable SkAtomic<bool> fAddedRasterVersionToCache;
+
typedef SkImage_Base INHERITED;
};
« no previous file with comments | « src/core/SkPixelRef.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698