Remove unused enum value and member of GrGpuObject
authorbsalomon <bsalomon@google.com>
Tue, 22 Jul 2014 18:17:14 +0000 (11:17 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 22 Jul 2014 18:17:14 +0000 (11:17 -0700)
R=robertphillips@google.com
TBR=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/413523002

include/gpu/GrGpuObject.h
src/gpu/GrGpuObject.cpp

index 859b8b0..0347d44 100644 (file)
@@ -73,7 +73,6 @@ protected:
     virtual void onAbandon() {};
 
     bool isWrapped() const { return kWrapped_FlagBit & fFlags; }
-    bool needsDeferredUnref() const { return SkToBool(kDeferredUnref_FlagBit & fFlags); }
 
 private:
 #ifdef SK_DEBUG
@@ -86,8 +85,6 @@ private:
     GrGpu*              fGpu;               // not reffed. The GrGpu can be deleted while there
                                             // are still live GrGpuObjects. It will call
                                             // release() on all such objects in its destructor.
-    mutable int         fDeferredRefCount;  // How many references in deferred drawing buffers.
-
     enum Flags {
         /**
          * This object wraps a GPU object given to us by the user.
@@ -95,14 +92,6 @@ private:
          * free it).
          */
         kWrapped_FlagBit         = 0x1,
-
-        /**
-         * This texture should be de-refed when the deferred ref count goes
-         * to zero. An object gets into this state when the resource cache
-         * is holding a ref-of-obligation (i.e., someone needs to own it but
-         * no one else wants to) but doesn't really want to keep it around.
-         */
-        kDeferredUnref_FlagBit  = 0x2,
     };
     uint32_t         fFlags;
 
index 43a86f2..fff2a2f 100644 (file)
@@ -12,7 +12,6 @@
 
 GrGpuObject::GrGpuObject(GrGpu* gpu, bool isWrapped) {
     fGpu              = gpu;
-    fDeferredRefCount = 0;
     if (isWrapped) {
         fFlags = kWrapped_FlagBit;
     } else {
@@ -23,7 +22,6 @@ GrGpuObject::GrGpuObject(GrGpu* gpu, bool isWrapped) {
 
 GrGpuObject::~GrGpuObject() {
     // subclass should have released this.
-    SkASSERT(0 == fDeferredRefCount);
     SkASSERT(this->wasDestroyed());
 }