* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrTextureProxyPriv_DEFINED
#define GrTextureProxyPriv_DEFINED
#include "src/gpu/GrTextureProxy.h"
class GrDeferredProxyUploader;
class GrOpFlushState;
* This class hides the more specialized capabilities of GrTextureProxy.
*/
class GrTextureProxyPriv {
public:
void setDeferredUploader(std::unique_ptr<GrDeferredProxyUploader>);
bool isDeferred() const { return SkToBool(fTextureProxy->fDeferredUploader.get()); }
void scheduleUpload(GrOpFlushState*);
void resetDeferredUploader();
private:
explicit GrTextureProxyPriv(GrTextureProxy* textureProxy) : fTextureProxy(textureProxy) {}
GrTextureProxyPriv(const GrTextureProxyPriv&) {}
GrTextureProxyPriv& operator=(const GrTextureProxyPriv&);
const GrTextureProxyPriv* operator&() const;
GrTextureProxyPriv* operator&();
GrTextureProxy* fTextureProxy;
friend class GrTextureProxy;
};
inline GrTextureProxyPriv GrTextureProxy::texPriv() { return GrTextureProxyPriv(this); }
inline const GrTextureProxyPriv GrTextureProxy::texPriv() const {
return GrTextureProxyPriv(const_cast<GrTextureProxy*>(this));
}
#endif