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

Unified Diff: include/gpu/GrContext.h

Issue 663583002: Remove AutoScratchTexture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix tabbing Created 6 years, 2 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 | « no previous file | src/gpu/GrClipMaskCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 536b17b9b8987fe2ce6588bdcf949d7303c541b4..ca5f62af720c849306af13d7f9c07ac75a9375ea 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -19,7 +19,6 @@
#include "SkTypes.h"
class GrAARectRenderer;
-class GrAutoScratchTexture;
class GrDrawState;
class GrDrawTarget;
class GrFontCache;
@@ -1049,65 +1048,4 @@ private:
typedef SkRefCnt INHERITED;
};
-/**
- * This is deprecated. Don't use it.
- */
-class SK_API GrAutoScratchTexture : public ::SkNoncopyable {
-public:
- GrAutoScratchTexture()
- : fContext(NULL)
- , fTexture(NULL) {
- }
-
- GrAutoScratchTexture(GrContext* context,
- const GrTextureDesc& desc,
- GrContext::ScratchTexMatch match = GrContext::kApprox_ScratchTexMatch,
- bool internalFlag = false)
- : fContext(NULL)
- , fTexture(NULL) {
- this->set(context, desc, match, internalFlag);
- }
-
- ~GrAutoScratchTexture() {
- this->reset();
- }
-
- void reset() {
- if (fContext && fTexture) {
- fTexture->unref();
- fTexture = NULL;
- }
- }
-
- GrTexture* detach() {
- GrTexture* texture = fTexture;
- fTexture = NULL;
- return texture;
- }
-
- GrTexture* set(GrContext* context,
- const GrTextureDesc& desc,
- GrContext::ScratchTexMatch match = GrContext::kApprox_ScratchTexMatch,
- bool internalFlag = 0) {
- this->reset();
-
- fContext = context;
- if (fContext) {
- fTexture = fContext->refScratchTexture(desc, match, internalFlag);
- if (NULL == fTexture) {
- fContext = NULL;
- }
- return fTexture;
- } else {
- return NULL;
- }
- }
-
- GrTexture* texture() { return fTexture; }
-
-private:
- GrContext* fContext;
- GrTexture* fTexture;
-};
-
#endif
« no previous file with comments | « no previous file | src/gpu/GrClipMaskCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698