aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkSurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkSurface.h')
-rw-r--r--include/core/SkSurface.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index eaf55050b8..890532f983 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -15,7 +15,9 @@
#include "GrTypes.h"
class SkCanvas;
+class SkDeferredDisplayList;
class SkPaint;
+class SkSurfaceCharacterization;
class GrBackendRenderTarget;
class GrBackendSemaphore;
class GrContext;
@@ -335,6 +337,21 @@ public:
*/
bool wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores);
+ /**
+ * This creates a characterization of this SkSurface's properties that can
+ * be used to perform gpu-backend preprocessing in a separate thread (via
+ * the SkDeferredDisplayListRecorder).
+ * It will return false on failure (e.g., if the SkSurface is cpu-backed).
+ */
+ bool characterize(SkSurfaceCharacterization* characterization) const;
+
+ /**
+ * Draw a deferred display list (created via SkDeferredDisplayListRecorder).
+ * The draw will be skipped if the characterization stored in the display list
+ * isn't compatible with this surface.
+ */
+ void draw(SkDeferredDisplayList* deferredDisplayList);
+
protected:
SkSurface(int width, int height, const SkSurfaceProps*);
SkSurface(const SkImageInfo&, const SkSurfaceProps*);