diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-19 21:24:25 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-19 21:24:25 +0000 |
commit | eb9547c1d6a7bcc02778a7d26b7d05283c4074fa (patch) | |
tree | 4b98e9f156f1fa82f66a6802318da79eec89cb7d | |
parent | e14792d99fc7a1a314ef5e2ca5b269239468355a (diff) |
stub for ganesh veto
BUG=skia:
R=bsalomon@google.com, nduca@chromium.org
Author: humper@google.com
Review URL: https://codereview.chromium.org/197803002
git-svn-id: http://skia.googlecode.com/svn/trunk@13866 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | include/core/SkPicture.h | 11 | ||||
-rw-r--r-- | src/core/SkPicture.cpp | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index 37489e5a72..ba316ff66b 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -14,6 +14,10 @@ #include "SkImageDecoder.h" #include "SkRefCnt.h" +#if SK_SUPPORT_GPU +class GrContext; +#endif + class SkBBoxHierarchy; class SkCanvas; class SkDrawPictureCallback; @@ -260,6 +264,13 @@ public: */ void internalOnly_EnableOpts(bool enableOpts); + /** Return true if the picture is suitable for rendering on the GPU. + */ + +#if SK_SUPPORT_GPU + bool suitableForGpuRasterization(GrContext*) const; +#endif + protected: // V2 : adds SkPixelRef's generation ID. // V3 : PictInfo tag at beginning, and EOF tag at the end diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index b3dd6a4f07..de04c2a28f 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -26,6 +26,10 @@ #include "SkRTree.h" #include "SkBBoxHierarchyRecord.h" +#if SK_SUPPORT_GPU +#include "GrContext.h" +#endif + #define DUMP_BUFFER_SIZE 65536 //#define ENABLE_TIME_DRAW // dumps milliseconds for each draw @@ -447,6 +451,11 @@ void SkPicture::flatten(SkWriteBuffer& buffer) const { } } +bool SkPicture::suitableForGpuRasterization(GrContext* context) const { + // Stub for now; never veto GPu rasterization. + return true; +} + bool SkPicture::willPlayBackBitmaps() const { if (!fPlayback) { return false; |