aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-07-18 10:53:52 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-18 10:53:52 -0700
commit54f30c13fc0a5d89797fc9be5f0fb1050d96b6f4 (patch)
tree484d25c1b668126bd51203cd1875d7c47f34a1bf /gm
parentbaaea531c249d3a13b0d04eca59b8bd0ee58d76b (diff)
Introduce GrColorSpaceXform, for gamut conversion on textures
GrTextureAccess optionally includes an instance, computed from the src and dst color spaces. In all common cases (no color space for either src or dst, or same color space for both), no object is allocated. This change is orthogonal to my attempts to get color space attached to render targets - regardless of how we choose to do that, this will give us the source color space at all points where we are connecting src to dst. There are many dangling injection points where I've been inserting nullptr, but I have a record of all of them. Additionally, there are now three places (the most common simple paths for bitmap/image rendering) where things are plumbed enough that I expect to have access to the dst color space (all marked with XFORMTODO). In addition to getting the dst color space, I need to inject shader code and uniform uploading for appendTextureLookup and friends. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154753003 Review-Url: https://codereview.chromium.org/2154753003
Diffstat (limited to 'gm')
-rw-r--r--gm/texdata.cpp2
-rw-r--r--gm/texturedomaineffect.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/gm/texdata.cpp b/gm/texdata.cpp
index 01eedec633..4cad11336e 100644
--- a/gm/texdata.cpp
+++ b/gm/texdata.cpp
@@ -98,7 +98,7 @@ DEF_SIMPLE_GM_BG(texdata, canvas, 2 * S, 2 * S, SK_ColorBLACK) {
SkMatrix tm;
tm = vm;
tm.postIDiv(2*S, 2*S);
- paint.addColorTextureProcessor(texture, tm);
+ paint.addColorTextureProcessor(texture, nullptr, tm);
drawContext->drawRect(clip, paint, vm, SkRect::MakeWH(2*S, 2*S));
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index 3680006cc5..ba574b6b09 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -115,7 +115,7 @@ protected:
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode));
sk_sp<GrFragmentProcessor> fp(
- GrTextureDomainEffect::Make(texture, textureMatrices[tm],
+ GrTextureDomainEffect::Make(texture, nullptr, textureMatrices[tm],
GrTextureDomain::MakeTexelDomain(texture,
texelDomains[d]),
mode, GrTextureParams::kNone_FilterMode));