diff options
author | Brian Osman <brianosman@google.com> | 2017-09-11 13:38:55 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-11 17:58:00 +0000 |
commit | 5d034744ab749d37a0b4c889271160236ec8be4e (patch) | |
tree | 733dea50e748bbfe1f49b0da5bc330268890ad19 /src/gpu/GrOpList.cpp | |
parent | 3b67faa561db3283def904d2458a5b5b12ee4ba6 (diff) |
Do software clip mask generation with worker threads
Also refactor the prepare callback stuff to share logic
between software path rendering and clip mask generation.
Bug: skia:
Change-Id: I0c56c6df8703eb59d2d49a4c3985bd4f5ef20f01
Reviewed-on: https://skia-review.googlesource.com/44421
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOpList.cpp')
-rw-r--r-- | src/gpu/GrOpList.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrOpList.cpp b/src/gpu/GrOpList.cpp index c87d520aec..521beea743 100644 --- a/src/gpu/GrOpList.cpp +++ b/src/gpu/GrOpList.cpp @@ -8,6 +8,7 @@ #include "GrOpList.h" #include "GrContext.h" +#include "GrPrepareCallback.h" #include "GrSurfaceProxy.h" #include "SkAtomics.h" @@ -58,6 +59,10 @@ void GrOpList::reset() { fAuditTrail = nullptr; } +void GrOpList::addPrepareCallback(std::unique_ptr<GrPrepareCallback> callback) { + fPrepareCallbacks.push_back(std::move(callback)); +} + void GrOpList::prepare(GrOpFlushState* flushState) { for (int i = 0; i < fPrepareCallbacks.count(); ++i) { (*fPrepareCallbacks[i])(flushState); |