From c571c001cee4e0dfacd7bd17d5cd0a2900a853a9 Mon Sep 17 00:00:00 2001 From: brianosman Date: Thu, 17 Mar 2016 13:01:26 -0700 Subject: 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 --- src/core/SkSpecialImage.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/SkSpecialImage.cpp') diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp index b59bb41405..b17d5d4147 100644 --- a/src/core/SkSpecialImage.cpp +++ b/src/core/SkSpecialImage.cpp @@ -10,8 +10,6 @@ #include "SkSpecialImage.h" #include "SkSpecialSurface.h" -#include "GrContext.h" - /////////////////////////////////////////////////////////////////////////////// class SkSpecialImage_Base : public SkSpecialImage { public: @@ -168,7 +166,7 @@ public: #if SK_SUPPORT_GPU GrTexture* texture = as_IB(fImage.get())->peekTexture(); if (texture) { - GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *texture->getContext()->caps()); + GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info); desc.fFlags = kRenderTarget_GrSurfaceFlag; return SkSpecialSurface::NewRenderTarget(this->proxy(), texture->getContext(), desc); @@ -386,7 +384,7 @@ public: } SkSpecialSurface* onNewSurface(const SkImageInfo& info) const override { - GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info, *fTexture->getContext()->caps()); + GrSurfaceDesc desc = GrImageInfoToSurfaceDesc(info); desc.fFlags = kRenderTarget_GrSurfaceFlag; return SkSpecialSurface::NewRenderTarget(this->proxy(), fTexture->getContext(), desc); -- cgit v1.2.3