| 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
|
|
|