aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawingManager.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-21 07:56:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-21 11:59:58 +0000
commiteb35f4dfaa10b9d751abbc9a1406456eb3b1649d (patch)
treeac7930f842bf3d89e21d221929cd5843f8622b12 /src/gpu/GrDrawingManager.h
parent0db235bc0278887c344eb25b4681e9cca4cf892a (diff)
Add pre-Flush callback to GrDrawingManager (take 2)
This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases. Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating) Change-Id: I7ffc1b69defda625b6d4311e96776de4cf2abb87 Reviewed-on: https://skia-review.googlesource.com/9903 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrDrawingManager.h')
-rw-r--r--src/gpu/GrDrawingManager.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index 061e878793..d914b03a75 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -11,9 +11,10 @@
#include "GrOpFlushState.h"
#include "GrPathRenderer.h"
#include "GrPathRendererChain.h"
+#include "GrPreFlushResourceProvider.h"
#include "GrRenderTargetOpList.h"
#include "GrResourceCache.h"
-#include "SkTDArray.h"
+#include "SkTArray.h"
#include "text/GrAtlasTextContext.h"
class GrContext;
@@ -67,6 +68,8 @@ public:
void prepareSurfaceForExternalIO(GrSurface*);
+ void addPreFlushCallbackObject(sk_sp<GrPreFlushCallbackObject> preFlushCBObject);
+
private:
GrDrawingManager(GrContext* context,
const GrRenderTargetOpList::Options& optionsForOpLists,
@@ -92,6 +95,7 @@ private:
void internalFlush(GrResourceCache::FlushType);
friend class GrContext; // for access to: ctor, abandon, reset & flush
+ friend class GrPreFlushResourceProvider; // 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
@@ -115,6 +119,8 @@ private:
bool fFlushing;
bool fIsImmediateMode;
+
+ SkTArray<sk_sp<GrPreFlushCallbackObject>> fPreFlushCBObjects;
};
#endif