diff options
author | brianosman <brianosman@google.com> | 2016-03-17 13:01:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-17 13:01:26 -0700 |
commit | c571c001cee4e0dfacd7bd17d5cd0a2900a853a9 (patch) | |
tree | b677d3cb745b52dd7f74507de78709c8437b3ecd /src/effects | |
parent | b893a4c569d0719a395abffb266d1d61af847e2f (diff) |
Revert of sRGB support in Ganesh. Several pieces: (patchset #12 id:220001 of https://codereview.chromium.org/1789663002/ )
Reason for revert:
We're getting sRGB non-8888 configs?
Original issue's description:
> sRGB support in Ganesh. Several pieces:
>
> sRGB support now also requires GL_EXT_texture_sRGB_decode, which allows
> us to disable sRGB -> Linear conversion when reading textures. This gives
> us an easy way to support "legacy" L32 mode. We disable decoding based on
> the pixel config of the render target. Textures can override that behavior
> (specifically for format-conversion draws where we want that behavior).
>
> Added sBGRA pixel config, which is not-really-a-format. It's just sRGBA
> internally, and the external format is BGR order, so TexImage calls will
> swizzle correctly. This lets us interact with sRGB raster surfaces on BGR
> platforms.
>
> Devices without sRGB support behave like they always have: conversion from
> color type and profile type ignores sRGB and always returns linear pixel
> configs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1789663002
>
> Committed: https://skia.googlesource.com/skia/+/9e3f1bf4e5cd8fc59554f986f36d6b034e99f9eb
TBR=reed@google.com,bsalomon@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1814533003
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkTableColorFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/gradients/SkGradientShader.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index f49043f512..3a6c070fab 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -7,7 +7,6 @@ #include "SkTableColorFilter.h" -#include "GrContext.h" #include "SkBitmap.h" #include "SkColorPriv.h" #include "SkReadBuffer.h" @@ -467,7 +466,7 @@ const GrFragmentProcessor* ColorTableEffect::Create(GrContext* context, SkBitmap desc.fHeight = 128; desc.fRowHeight = bitmap.height(); desc.fContext = context; - desc.fConfig = SkImageInfo2GrPixelConfig(bitmap.info(), *context->caps()); + desc.fConfig = SkImageInfo2GrPixelConfig(bitmap.info()); GrTextureStripAtlas* atlas = GrTextureStripAtlas::GetAtlas(desc); int row = atlas->lockRow(bitmap); SkAutoTUnref<GrTexture> texture; diff --git a/src/effects/gradients/SkGradientShader.cpp b/src/effects/gradients/SkGradientShader.cpp index 6a8befd81d..9fe6c91a01 100644 --- a/src/effects/gradients/SkGradientShader.cpp +++ b/src/effects/gradients/SkGradientShader.cpp @@ -12,8 +12,6 @@ #include "SkTwoPointConicalGradient.h" #include "SkSweepGradient.h" -#include "GrContext.h" - void SkGradientShaderBase::Descriptor::flatten(SkWriteBuffer& buffer) const { buffer.writeColorArray(fColors, fCount); if (fPos) { @@ -1119,7 +1117,7 @@ GrGradientEffect::GrGradientEffect(GrContext* ctx, desc.fHeight = 32; desc.fRowHeight = bitmap.height(); desc.fContext = ctx; - desc.fConfig = SkImageInfo2GrPixelConfig(bitmap.info(), *ctx->caps()); + desc.fConfig = SkImageInfo2GrPixelConfig(bitmap.info()); fAtlas = GrTextureStripAtlas::GetAtlas(desc); SkASSERT(fAtlas); |