diff options
author | Derek Sollenberger <djsollen@google.com> | 2017-08-04 08:35:10 -0400 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2017-08-07 08:43:23 -0400 |
commit | fa3e340431cc8168d960e719a596bca31dcccb38 (patch) | |
tree | f1c3b3e15872057aeb971b1ffa79e0a465c418cd /libs/hwui/SkiaCanvas.h | |
parent | 0041c043c9a15b3ba1eb19f23db5d55bb9598d1b (diff) |
Use colorFilters when rendering to an sRGB bitmap.
Bug: 62347704
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases, hwui_unit_tests
Change-Id: I3e237b64cd92217b02d4995bdd695a28d3f393ee
Diffstat (limited to 'libs/hwui/SkiaCanvas.h')
-rw-r--r-- | libs/hwui/SkiaCanvas.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libs/hwui/SkiaCanvas.h b/libs/hwui/SkiaCanvas.h index af2c23e4a2b7..6a01f964873b 100644 --- a/libs/hwui/SkiaCanvas.h +++ b/libs/hwui/SkiaCanvas.h @@ -37,12 +37,8 @@ public: * @param canvas SkCanvas to handle calls made to this SkiaCanvas. Must * not be NULL. This constructor does not take ownership, so the caller * must guarantee that it remains valid while the SkiaCanvas is valid. - * @param xformToSRGB Indicates if bitmaps should be xformed to the sRGB - * color space before drawing. This makes sense for software rendering. - * For the picture case, it may make more sense to leave bitmaps as is, - * and handle the xform when replaying the picture. */ - explicit SkiaCanvas(SkCanvas* canvas, XformToSRGB xformToSRGB); + explicit SkiaCanvas(SkCanvas* canvas); virtual ~SkiaCanvas(); @@ -182,6 +178,9 @@ private: void drawPoints(const float* points, int count, const SkPaint& paint, SkCanvas::PointMode mode); + const SkPaint* addFilter(const SkPaint* origPaint, SkPaint* tmpPaint, + sk_sp<SkColorFilter> colorSpaceFilter); + class Clip; std::unique_ptr<SkCanvas> mCanvasWrapper; // might own a wrapper on the canvas |