diff options
author | 2017-04-11 08:46:01 -0400 | |
---|---|---|
committer | 2017-04-11 13:28:29 +0000 | |
commit | 31f99ce7d2f3c2b61742d07ab92b6dac6a928ef9 (patch) | |
tree | f1b2fdef9687f3fadc017e600ebc1c772aa3e5a5 /include | |
parent | 934292170bade335f972a050a2f64d2cca9ca299 (diff) |
SkCanvas constructor with legacy flag for Android framework
Bug: skia:
Change-Id: I5b268ad03dde075f2710196d5ad2bd19249557f7
Reviewed-on: https://skia-review.googlesource.com/11788
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkCanvas.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index c44965e110..d73ceb7578 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -112,6 +112,19 @@ public: */ explicit SkCanvas(const SkBitmap& bitmap); +#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK + enum class ColorBehavior { + kLegacy, + }; + + /** + * Android framework only constructor. + * Allows the creation of a legacy SkCanvas even though the |bitmap| + * and its pixel ref may have an SkColorSpace. + */ + SkCanvas(const SkBitmap& bitmap, ColorBehavior); +#endif + /** Construct a canvas with the specified bitmap to draw into. @param bitmap Specifies a bitmap for the canvas to draw into. Its structure are copied to the canvas. |