Go to file
Mike Klein db711c982b move dither after the transfer function
There's no single dither rate that we can use in linear space if we're
using a non-linear transfer function... if it's too high (like today)
we'll dither too much around zero (e.g. 0 -> 5), and if it's too low we
won't dither near one.

We were thinking it'd be a good idea to move the dither later in the
pipeline anyway.  This has to be the right spot!

Now that we're moving dither from operating in linear space to operating
in bit-space (after transfer function, aware of bit-depth of
destination) we have to start clamping [0,1] instead of [0,a]...

But, I think I've rewritten things to make sure we don't need to clamp
at all.  The main idea is to make sure 0-dither and 1+dither round to 0
and 1 respectively.  We can do this by making the dither span exclusive,
switching from [-0.5,+0.5] to (-0.5,+0.5).  In practice I'm doing that
as [-0.4921875,+0.4921875], a maximum dither of 63/128 of a bit.

Similarly, I don't think it makes sense to fold in the multiply by alpha
anymore if we're after the transfer function.

Change-Id: I55857bca80377c639fcdd29acc9b362931dd9d12
Reviewed-on: https://skia-review.googlesource.com/15254
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-04 14:22:08 +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 Reland "Add SkImage::makeColorSpace() with correct transfer fn behavior" 2017-05-04 13:22:39 +00:00
gn Reland "Add SkImage::makeColorSpace() with correct transfer fn behavior" 2017-05-04 13:22:39 +00:00
include Add GrGpuTextureProxyRef 2017-05-04 13:29:29 +00:00
infra Turn on verbose logging for Valgrind_PreAbandonGpuContext bot. 2017-05-04 13:46:43 +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 move dither after the transfer function 2017-05-04 14:22:08 +00:00
tests Revert "Revert "Revert "eliminated GrGLSLExpr""" 2017-05-04 13:11:09 +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.