aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrTextUtils.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-10-24 12:52:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-24 20:43:02 +0000
commitf3569f0f6d312570c7344b345f8b3a03a892f751 (patch)
tree2da4cd0b0bac2b4b47d6ce91e7db53fa3b5dcad7 /src/gpu/text/GrTextUtils.h
parent6dd0d8a2659d5976fdd2b6528f787ac7f0b0005b (diff)
Add GrColorSpaceInfo and use in place of GrRenderTargetContext in paint conversion.
This moves us closer to making GrAtlasTextContext and related classes usable without a GrRenderTargetContext. Change-Id: Ife52d69a3f925e23da88043acb4d8dc9f672a025 Reviewed-on: https://skia-review.googlesource.com/63304 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/text/GrTextUtils.h')
-rw-r--r--src/gpu/text/GrTextUtils.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gpu/text/GrTextUtils.h b/src/gpu/text/GrTextUtils.h
index bbf3ca49a9..0a6b2ccbbf 100644
--- a/src/gpu/text/GrTextUtils.h
+++ b/src/gpu/text/GrTextUtils.h
@@ -9,6 +9,7 @@
#define GrTextUtils_DEFINED
#include "GrColor.h"
+#include "GrColorSpaceInfo.h"
#include "SkColorFilter.h"
#include "SkGr.h"
#include "SkPaint.h"
@@ -47,12 +48,10 @@ public:
*/
class Paint {
public:
- explicit Paint(const SkPaint* paint,
- SkColorSpace* dstColorSpace,
- GrColorSpaceXform* colorXformFromSRGB)
+ explicit Paint(const SkPaint* paint, const GrColorSpaceInfo& dstColorSpaceInfo)
: fPaint(paint)
- , fDstColorSpace(dstColorSpace)
- , fColorXformFromSRGB(colorXformFromSRGB) {
+ , fDstColorSpace(dstColorSpaceInfo.colorSpace())
+ , fColorXformFromSRGB(dstColorSpaceInfo.colorSpaceXformFromSRGB()) {
this->initFilteredColor();
}