diff options
author | brianosman <brianosman@google.com> | 2016-04-06 07:38:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-06 07:38:23 -0700 |
commit | 898235c4864df66aa7f6d32bc2a8b8551040ce1e (patch) | |
tree | 5fb30f04825c59a970a208cabadd4bad0be283b3 /include/core/SkDevice.h | |
parent | 1817d282cda17cb8c2db0ac6fdc937743c026016 (diff) |
SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's propagated in a few places so that the backend can do the right thing for L32 vs S32 mode.
Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering.
Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007
Review URL: https://codereview.chromium.org/1845283003
Diffstat (limited to 'include/core/SkDevice.h')
-rw-r--r-- | include/core/SkDevice.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index 55b08a762c..c15aeccf82 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -41,6 +41,13 @@ public: virtual SkImageInfo imageInfo() const; /** + * Return SurfaceProps for this device. + */ + const SkSurfaceProps& surfaceProps() const { + return fSurfaceProps; + } + + /** * Return the bounds of the device in the coordinate space of the root * canvas. The root device will have its top-left at 0,0, but other devices * such as those associated with saveLayer may have a non-zero origin. @@ -317,10 +324,6 @@ protected: virtual bool onAccessPixels(SkPixmap*) { return false; } - const SkSurfaceProps& surfaceProps() const { - return fSurfaceProps; - } - /** * PRIVATE / EXPERIMENTAL -- do not call * This entry point gives the backend an opportunity to take over the rendering |