Go to file
Mike Klein 1478f74aa2 Revert "treat SkPMColor as sRGB in SkPM4f::FromPMColor()"
This reverts commit a4f3e14d89.

Reason for revert: affecting 565 in ways I didn't expect

Original change's description:
> treat SkPMColor as sRGB in SkPM4f::FromPMColor()
> 
> We made the wrong call in SkPM4f::FromPMColor().  SkPM4f::FromPMColor()
> is only used by the color correct drawing pipeline, not legacy.  That
> means it makes a lot more sense to treat SkPMColors as premul sRGB than
> premul linear.
> 
> You can see the effect very clearly in any code path using the fallback
> SkShader::Context::shadeSpan4f().  We shade legacy 8888, then
> "linearize" to float by calling SkPM4f::FromPMColor().  At head we're
> not really linearizing, which means everything ends up too bright in the
> end.  Things get double sRGB-encoded, etc.
> 
> It is expected that this CL will make many color correct images look
> darker and a lot more like legacy mode.  It may be jarring... we've
> gotten used to seeing this bug and thinking brighter == fixed.
> 
> The only GM that changes in actual legacy 8888 is gamut, which
> explicitly creates non-legacy 8888 images... the diff there is expected.
> 
> Change-Id: I77ac6cfe8f7ffb15e90f4aad798dbe8f9d3aafbd
> Reviewed-on: https://skia-review.googlesource.com/15227
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=mtklein@chromium.org,herb@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I80d852cbb618e94744f786bc82a4648128e99c71
Reviewed-on: https://skia-review.googlesource.com/15300
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-03 22:47:43 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
bin bin/fetch-clang-format 2017-03-08 16:43:49 +00:00
debugger Get Debugger app compiling again 2017-01-06 16:18:27 +00:00
dm Revert "Revert "Delete copyTo(Allocator), hide copyTo() behind flag"" 2017-04-28 15:49:04 +00:00
example Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia"" 2017-05-01 14:14:50 +00:00
experimental Move the ability to access textures, buffers, and image storages out from GrProcessor. 2017-04-04 15:27:44 +00:00
fuzz add drawString helper to canvas 2017-04-28 20:41:04 +00:00
gm Add a GM to exercise some complex gradient constructs 2017-05-03 19:43:12 +00:00
gn Revert "Revert "Add a new non-AA rect op that does not inherit from GrLegacyMeshDrawOp."" 2017-05-03 21:41:38 +00:00
include Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
infra Roll recipe dependencies (trivial). 2017-05-03 21:28:33 +00:00
platform_tools Enable ios on Raspberry Pi 2017-04-25 16:56:41 +00:00
resources SkPngCodec: Do not return kInvalidConversion on corrupt png 2017-04-26 17:43:38 +00:00
samplecode Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
site Documentation: site/user/api/canvas updated 2017-04-21 14:57:41 +00:00
src Revert "treat SkPMColor as sRGB in SkPM4f::FromPMColor()" 2017-05-03 22:47:43 +00:00
tests disable test_diagonal on 565 2017-05-03 20:45:35 +00:00
third_party Use system Vulkan headers except when no building with vulkan support 2017-04-25 18:30:37 +00:00
tools Revert "Revert "Reland: Remove SkLights include from SkCanvas.h"" 2017-05-03 19:17:11 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore Refactor Vulkan support to support Fuchsia 2017-04-05 17:32:09 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Added support for building for tvOS 2017-03-14 22:55:04 +00:00
BUILD.gn drawfilter is legacy-guarded, no need for deprecated 2017-05-03 15:46:55 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Update build tools to newer gn. 2017-03-17 17:38:58 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
PRESUBMIT.py Change PRESUBMIT.py to use [Get|Update]DescriptionLines 2017-04-05 12:49:32 +00:00
public.bzl remove unused etc logic 2017-05-03 12:55:43 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Testing permissions 2017-04-28 15:12:32 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.