diff options
author | 2016-12-09 14:51:59 -0500 | |
---|---|---|
committer | 2016-12-09 20:31:23 +0000 | |
commit | 61624f0c716b576706659750d87b6956f4c15722 (patch) | |
tree | 00122b478cf21327b70364fefc5f3f9a6169377e /src/core/SkDevice.cpp | |
parent | 073285c0595d46205d1482cc19af2d7d891bfeae (diff) |
Plumb dst color space in many places, rather than "mode"
This is less to type in most cases, and gives us more information
(for things like picture-backed images, where we need to know all
about the destination surface).
Additionally, strip out the plumbing entirely for bitmap sources,
where we don't need to know anything.
BUG=skia:
Change-Id: I4deff6c7c345fcf62eb08b2aff0560adae4313da
Reviewed-on: https://skia-review.googlesource.com/5748
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/core/SkDevice.cpp')
-rw-r--r-- | src/core/SkDevice.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 741273bde3..ff99a09ccd 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -234,11 +234,8 @@ void SkBaseDevice::drawImage(const SkDraw& draw, const SkImage* image, SkScalar return; } - SkDestinationSurfaceColorMode colorMode = this->imageInfo().colorSpace() - ? SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware - : SkDestinationSurfaceColorMode::kLegacy; SkBitmap bm; - if (as_IB(image)->getROPixels(&bm, colorMode)) { + if (as_IB(image)->getROPixels(&bm, this->imageInfo().colorSpace())) { this->drawBitmap(draw, bm, SkMatrix::MakeTrans(x, y), paint); } } @@ -251,11 +248,8 @@ void SkBaseDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const return; } - SkDestinationSurfaceColorMode colorMode = this->imageInfo().colorSpace() - ? SkDestinationSurfaceColorMode::kGammaAndColorSpaceAware - : SkDestinationSurfaceColorMode::kLegacy; SkBitmap bm; - if (as_IB(image)->getROPixels(&bm, colorMode)) { + if (as_IB(image)->getROPixels(&bm, this->imageInfo().colorSpace())) { this->drawBitmapRect(draw, bm, src, dst, paint, constraint); } } |