diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-05-05 11:26:15 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-05 15:53:36 +0000 |
commit | fe199b7d512a7cfc56deaaa134260e1d47a1e7e0 (patch) | |
tree | 24fc11a386071faf994735e193c8f37095a589d4 /src/gpu/GrDrawingManager.h | |
parent | 9d687dfa3e341bc4bae7806b6e3262ae3d441889 (diff) |
Add postFlush call to GrOnFlushCallbackObject
Adds a new postFlush method and renames the class to
GrOnFlushCallbackObject. Also removes the ref counting in favor of
making the callback object a purely virtual interface. ref/unref on the
callback interface would conflict with existing ref/unref methods on the
subclass. It is now the caller’s responsibility to ensure the lifetime
of the callback is tied to that of the context.
Bug: skia:
Change-Id: I2fc1f98c700032e296a36f3a9a09c0753ab47aea
Reviewed-on: https://skia-review.googlesource.com/15463
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrDrawingManager.h')
-rw-r--r-- | src/gpu/GrDrawingManager.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h index 1990f9d923..85a29df420 100644 --- a/src/gpu/GrDrawingManager.h +++ b/src/gpu/GrDrawingManager.h @@ -11,7 +11,7 @@ #include "GrOpFlushState.h" #include "GrPathRenderer.h" #include "GrPathRendererChain.h" -#include "GrPreFlushResourceProvider.h" +#include "GrOnFlushResourceProvider.h" #include "GrRenderTargetOpList.h" #include "GrResourceCache.h" #include "SkTArray.h" @@ -71,7 +71,8 @@ public: void prepareSurfaceForExternalIO(GrSurfaceProxy*); - void addPreFlushCallbackObject(sk_sp<GrPreFlushCallbackObject> preFlushCBObject); + void addOnFlushCallbackObject(GrOnFlushCallbackObject*); + void testingOnly_removeOnFlushCallbackObject(GrOnFlushCallbackObject*); private: GrDrawingManager(GrContext* context, @@ -99,7 +100,7 @@ private: friend class GrContext; // for access to: ctor, abandon, reset & flush friend class GrContextPriv; // access to: flush - friend class GrPreFlushResourceProvider; // this is just a shallow wrapper around this class + friend class GrOnFlushResourceProvider; // this is just a shallow wrapper around this class static const int kNumPixelGeometries = 5; // The different pixel geometries static const int kNumDFTOptions = 2; // DFT or no DFT @@ -123,7 +124,7 @@ private: bool fIsImmediateMode; - SkTArray<sk_sp<GrPreFlushCallbackObject>> fPreFlushCBObjects; + SkTArray<GrOnFlushCallbackObject*> fOnFlushCBObjects; // Lazily allocated std::unique_ptr<gr_instanced::OpAllocator> fInstancingAllocator; |