Commit Graph

77 Commits

Author SHA1 Message Date
Mike Reed
e08e639063 Revert "Remove deadcode for sRGB image shading."
This reverts commit 51f6a0f89e.

Reason for revert: crazy attempt to fix chrome roll

Original change's description:
> Remove deadcode for sRGB image shading.
> 
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Icab02936d6c18e50b8de353aa1cd4c225e15e0bf
Reviewed-on: https://skia-review.googlesource.com/20800
Reviewed-by: Mike Reed <reed@google.com>
2017-06-25 19:55:03 +00:00
Mike Klein
d9b1fe02a6 remove a bit more dead code
Change-Id: I61484672e88d6bb4f75833ee89e7178c4f34d610
Reviewed-on: https://skia-review.googlesource.com/20780
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-06-24 16:08:23 +00:00
Herb Derby
51f6a0f89e Remove deadcode for sRGB image shading.
Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
Reviewed-on: https://skia-review.googlesource.com/20695
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-06-23 21:21:59 +00:00
Jim Van Verth
2e5eaf022e Revert "Revert "Clean up onTransferPixels""
Bug: skia:5126
Change-Id: Ia1eaef56cca266ad4c413e711e63646e913222be
Reviewed-on: https://skia-review.googlesource.com/20445
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-22 13:14:01 +00:00
Jim Van Verth
ce57552e11 Revert "Clean up onTransferPixels"
This reverts commit f7037d003c.

Reason for revert: Issues on test bots.

Original change's description:
> Clean up onTransferPixels
> 
> Bug: skia:5126
> Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc
> Reviewed-on: https://skia-review.googlesource.com/19055
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com

Change-Id: I923fda4d5cd8c2896fb347f9b2695b7f83d9137b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:5126
Reviewed-on: https://skia-review.googlesource.com/20444
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-21 15:50:51 +00:00
Jim Van Verth
f7037d003c Clean up onTransferPixels
Bug: skia:5126
Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc
Reviewed-on: https://skia-review.googlesource.com/19055
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-21 15:28:50 +00:00
Greg Daniel
a5cb781c17 Revert "Revert "Add API for flushing surfaces with gpu semaphores""
This reverts commit 7292231905.

This change relands the original plus the follow on change:
https://skia-review.googlesource.com/20059.

Additionally it adds a blacklist for the mac intel bots which
don't see to respect the added fences on the GPU.

Original change's description:
> Revert "Add API for flushing surfaces with gpu semaphores"
> 
> This reverts commit 66366c6978.
> 
> Reason for revert: Failing test on mac bots
> 
> Original change's description:
> > Add API for flushing surfaces with gpu semaphores
> > 
> > BUG=skia:
> > 
> > Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
> > Reviewed-on: https://skia-review.googlesource.com/11488
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Forrest Reiling <freiling@google.com>
> 
> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com
> 
> Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/20063
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com

Change-Id: I4dc6c0e1deb0398eeb165a34f0a26af7a58259f1
Reviewed-on: https://skia-review.googlesource.com/20141
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-16 14:22:34 +00:00
Greg Daniel
7292231905 Revert "Add API for flushing surfaces with gpu semaphores"
This reverts commit 66366c6978.

Reason for revert: Failing test on mac bots

Original change's description:
> Add API for flushing surfaces with gpu semaphores
> 
> BUG=skia:
> 
> Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
> Reviewed-on: https://skia-review.googlesource.com/11488
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Forrest Reiling <freiling@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com,freiling@google.com

Change-Id: I75633a2732d2d48b1926f9ad818a9f1a9196d211
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20063
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-15 21:55:03 +00:00
Greg Daniel
66366c6978 Add API for flushing surfaces with gpu semaphores
BUG=skia:

Change-Id: Ia4bfef784cd5f2516ceccafce958be18a86f91d1
Reviewed-on: https://skia-review.googlesource.com/11488
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Forrest Reiling <freiling@google.com>
2017-06-15 19:49:18 +00:00
Brian Osman
eee3c09e96 Unit test to demonstrate Galaxy S6 MSAA readPixels bug
After lots of tinkering, this is the smallest test case I've
found to reproduce the bug. Frequently, bitmap b4 will be
cleared to blue, but not contain the oval drawn right before.
Bitmap b5 will contain the oval, so the diff of the two
bitmaps will detect the error.

There may be something else that can be removed, but I
haven't found it.

Interesting note:

In the original version, all surfaces were cleared to
black. When I started trying to change the clear colors to
figure out if we were getting an old surface, the bug went
away. In particular, the first clear color is irrelevant,
but the last three clears must all be the same color. If
any are different, the bug doesn't occur.

Bug: skia:6653
Change-Id: Iacafcc140b60594fab208e82987b0f37416975f3
Reviewed-on: https://skia-review.googlesource.com/19817
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-06-15 17:58:08 +00:00
Chris Dalton
46983b7dd8 Introduce dynamic pipeline state
Adds a DynamicState struct to GrPipeline that has a field for the
scissor rect. Eventually this should become the only way to specify a
scissor rectangle and may grow to contain more fields. Adds an array of
DynamicStates to GrGpuCommandBuffer::draw and implements support in GL
and Vulkan.

Bug: skia:
Change-Id: If5aebbf9da5d192acf7e68e7def4674ffc7ec310
Reviewed-on: https://skia-review.googlesource.com/18510
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-06-07 18:26:11 +00:00
Chris Dalton
114a3c0b2b Fix glDrawRangeElements
Adds explicit min/max index value fields to GrMesh. This eliminates the
previous assumption that the index values were within the range
[0..vertexCount-1]. In the pattern case we still maintain this
assumption.

Updates GrMesh to hide its fields and handle its new complexity using a
"helper" interface instead.

Adds a unit test for GrMesh.

Bug: skia:
Change-Id: Ia23de72d510f8827cee56072b727fb70a6e46b8d
Reviewed-on: https://skia-review.googlesource.com/17964
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-05-30 16:02:36 +00:00
Herb Derby
e7ba8b05d2 Add tail handling for SSE* to SkJumper.
Change-Id: Icb9d385333082de2f99b7a25cfd7251717e3f663
Reviewed-on: https://skia-review.googlesource.com/17580
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-05-25 20:42:08 +00:00
Brian Salomon
e334c59654 Attempt to work around iOS varying limit in GLPrograms test
Dump shaders when linking fails.

Bug: skia:6627
Change-Id: I7f1df4be039eb56d990aa64c58c8dd2a22d97dbe
Reviewed-on: https://skia-review.googlesource.com/16867
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-15 15:41:01 +00:00
Brian Osman
85d34b2e84 Remove SkCrossContextImageData and all support code
Bug: skia:
Change-Id: I8eb8cef5456c05a8e314d8404698893c7af82d13
Reviewed-on: https://skia-review.googlesource.com/16368
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-05-11 18:07:20 +00:00
Ethan Nicholas
5ac13c2362 sksl support for static ifs & switches
Bug: skia:
Change-Id: Ic9e01a3a18efddb19bab26e92bfb473cad294fc1
Reviewed-on: https://skia-review.googlesource.com/16144
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2017-05-10 19:31:34 +00:00
Chris Dalton
fe199b7d51 Add postFlush call to GrOnFlushCallbackObject
Adds a new postFlush method and renames the class to
GrOnFlushCallbackObject. Also removes the ref counting in favor of
making the callback object a purely virtual interface. ref/unref on the
callback interface would conflict with existing ref/unref methods on the
subclass. It is now the caller’s responsibility to ensure the lifetime
of the callback is tied to that of the context.

Bug: skia:
Change-Id: I2fc1f98c700032e296a36f3a9a09c0753ab47aea
Reviewed-on: https://skia-review.googlesource.com/15463
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-05 15:53:36 +00:00
Matt Sarett
26b44df233 Add support for row-by-row jpeg encoding
Reland of:
https://skia-review.googlesource.com/c/14641/

Bug: 713862
Change-Id: I9dca5ede4ebf569c5f80edcfb23a506b6cfa935e
Reviewed-on: https://skia-review.googlesource.com/15144
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-02 20:40:10 +00:00
Leon Scroggins
c06f309cf5 Revert "Add support for row-by-row jpeg encoding"
This reverts commit 9b848d5749.

Reason for revert: ASAN reports leaked memory [1]. Google3 reports a "delete size mismatch" [2], which I suspect is the same issue.

[1] https://chromium-swarm.appspot.com/task?id=35e2c9fa9eac6310&refresh=10&show_raw=1
[2] https://test.corp.google.com/ui#cl=154838904&flags=CAMQBQ==&id=OCL:154838904:BASE:154839043:1493741642370:9c96115f&t=//chrome/skia/dm_wrapper:dm_wrapper

Original change's description:
> Add support for row-by-row jpeg encoding
> 
> Bug: 713862
> Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1
> Reviewed-on: https://skia-review.googlesource.com/14641
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic5a8d67e0d4a7733662586055ceff086a2ab335d
Reviewed-on: https://skia-review.googlesource.com/15140
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-05-02 17:08:35 +00:00
Matt Sarett
9b848d5749 Add support for row-by-row jpeg encoding
Bug: 713862
Change-Id: I787b7c49662a00b89ae0ef35845dfbd6be3e6fb1
Reviewed-on: https://skia-review.googlesource.com/14641
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-05-02 16:07:15 +00:00
Leon Scroggins III
83239658f2 Reland "Make SkPngCodec only read as much of the stream as necessary"
(Originally uploaded as 13900.)

Previously, SkPngCodec assumed that the stream only contained one
image, which ended at the end of the stream. It read the stream in
arbitrarily-sized chunks, and then passed that data to libpng for
processing.

If a stream contains more than one image, this may result in reading
beyond the end of the image, making future reads read the wrong data.

Now, SkPngCodec starts by reading 8 bytes at a time. After the
signature, 8 bytes is enough to know which chunk is next and how many
bytes are in the chunk.

When decoding the size, we stop when we reach IDAT, and when decoding
the image, we stop when we reach IEND.

This manual parsing is necessary to support APNG, which is planned in
the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
was a workaround for reading more than necessary at the beginning of
the image.

Add a test that simulates the issue, by decoding a special stream that
reports an error if the codec attempts to read beyond the end.

Temporarily disable the partial decoding tests for png. A larger change
will be necessary to get those working again, and no clients are
currently relying on incrementally decoding PNGs (i.e. decode part of
an image, then decode further with more data).

Include a workaround for older versions of libpng (e.g. 1.2 in
Google3). In older versions, if the row callback is null when the
IDAT header is processed, reading the image will fail. When we see the
IDAT, we save the length and process a recreated IDAT header later,
after the row callback has been set.

Bug: skia:5368
Bug:b/34073812
Test: Existing tests, plus a new test in dm.

Change-Id: I293a4ddc013b82669a8b735062228b26d0bce933
Reviewed-on: https://skia-review.googlesource.com/13984
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-21 20:49:55 +00:00
Leon Scroggins
434b6e81a5 Revert "Make SkPngCodec only read as much of the stream as necessary"
This reverts commit 2c65d51612.

Reason for revert: Causing failures in Google3 (https://test.corp.google.com/ui#cl=153703311&flags=CAMQAg==&id=OCL:153703311:BASE:153703364:1492695824938:4db2240d&t=//chrome/skia/dm_wrapper:dm_wrapper) and differences in Gold. This change was not intended to change the output.

Original change's description:
> Make SkPngCodec only read as much of the stream as necessary
> 
> Previously, SkPngCodec assumed that the stream only contained one
> image, which ended at the end of the stream. It read the stream in
> arbitrarily-sized chunks, and then passed that data to libpng for
> processing.
> 
> If a stream contains more than one image, this may result in reading
> beyond the end of the image, making future reads read the wrong data.
> 
> Now, SkPngCodec starts by reading 8 bytes at a time. After the
> signature, 8 bytes is enough to know which chunk is next and how many
> bytes are in the chunk.
> 
> When decoding the size, we stop when we reach IDAT, and when decoding
> the image, we stop when we reach IEND.
> 
> This manual parsing is necessary to support APNG, which is planned in
> the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
> was a workaround for reading more than necessary at the beginning of
> the image.
> 
> Add a test that simulates the issue, by decoding a special stream that
> reports an error if the codec attempts to read beyond the end.
> 
> Temporarily disable the partial decoding tests for png. A larger change
> will be necessary to get those working again, and no clients are
> currently relying on incrementally decoding PNGs (i.e. decode part of
> an image, then decode further with more data).
> 
> Bug: skia:5368
> BUG:34073812
> 
> Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d
> Reviewed-on: https://skia-review.googlesource.com/13900
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Matt Sarett <msarett@google.com>
> 

TBR=msarett@google.com,scroggo@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I2f82e9960dda7bf5c646774df84320dadb7b930e
Reviewed-on: https://skia-review.googlesource.com/13971
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-04-20 15:07:23 +00:00
Leon Scroggins III
2c65d51612 Make SkPngCodec only read as much of the stream as necessary
Previously, SkPngCodec assumed that the stream only contained one
image, which ended at the end of the stream. It read the stream in
arbitrarily-sized chunks, and then passed that data to libpng for
processing.

If a stream contains more than one image, this may result in reading
beyond the end of the image, making future reads read the wrong data.

Now, SkPngCodec starts by reading 8 bytes at a time. After the
signature, 8 bytes is enough to know which chunk is next and how many
bytes are in the chunk.

When decoding the size, we stop when we reach IDAT, and when decoding
the image, we stop when we reach IEND.

This manual parsing is necessary to support APNG, which is planned in
the future. It also allows us to remove the SK_GOOGLE3_PNG_HACK, which
was a workaround for reading more than necessary at the beginning of
the image.

Add a test that simulates the issue, by decoding a special stream that
reports an error if the codec attempts to read beyond the end.

Temporarily disable the partial decoding tests for png. A larger change
will be necessary to get those working again, and no clients are
currently relying on incrementally decoding PNGs (i.e. decode part of
an image, then decode further with more data).

Bug: skia:5368
BUG:34073812

Change-Id: If832f7b20565411226fb5be3c305a4d16bf9269d
Reviewed-on: https://skia-review.googlesource.com/13900
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-20 13:40:17 +00:00
Mike Klein
d0ce148ed4 test and fix f16<->f32 conversion stages
This refactors from_half() and to_half() a bit, totally
reimplementing the non-hardware cases to be more clearly correct.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Release-Android,Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android,Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android,Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug

Change-Id: I439463cf90935c5e8fe2369cbcf45e07f3af62c7
Reviewed-on: https://skia-review.googlesource.com/13921
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-04-20 12:49:03 +00:00
Mike Klein
8f2911f840 add unit tests for parametric_* stages
Change-Id: I7fab6d1c7240c17f2cc8436e8c6e7c8d2df940bb
Reviewed-on: https://skia-review.googlesource.com/13814
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-19 17:39:48 +00:00
Herb Derby
3f4531d312 Remove SkVarAlloc
Change-Id: Id41d3e03390185f72b682225aeb140df45c84a34
Reviewed-on: https://skia-review.googlesource.com/13763
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:43:42 +00:00
Mike Reed
a00f347747 switch over to no lockPixels in pixelref
Bug: skia:6481
Change-Id: I7c32d2e6dcd4c9cd8aa761ac5c4794c916eb650a
Reviewed-on: https://skia-review.googlesource.com/13193
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-12 00:12:00 +00:00
Brian Salomon
7b29749c13 constexprify GrBlend.h and GrPorterDuffXferProcessor.cpp
Also remove some unused functions from GrBlend.h and related unit test.

Bug: skia:
Change-Id: Id8ad0057a02f65a9e19dc75e4b88709a762f4139
Reviewed-on: https://skia-review.googlesource.com/12623
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-04-10 16:27:36 +00:00
Robert Phillips
51e7ca31ce Add new proxy-based DetermineDomainMode w/ test
split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors)


Change-Id: Ibf54da589710382254b416e4801d83e9f5663f44
Reviewed-on: https://skia-review.googlesource.com/10180
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-27 14:57:56 +00:00
Brian Salomon
ab664fa5b5 Revert "Revert "Create new inset algorithm for spot shadows""
This reverts commit e7c85c45c4.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Create new inset algorithm for spot shadows"
> 
> This reverts commit e5f5bf5175.
> 
> Reason for revert: Breaking a bunch of bots. e.g:
> 
> https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout
> 
> Original change's description:
> > Create new inset algorithm for spot shadows
> > 
> > BUG=skia:
> > 
> > Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> > Reviewed-on: https://skia-review.googlesource.com/9875
> > Commit-Queue: Ravi Mistry <rmistry@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
> 
> Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
> Reviewed-on: https://skia-review.googlesource.com/10112
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> 

TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,msarett@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: Ib3998300606d3a2e2fb3a14b2088cfad48363501
Reviewed-on: https://skia-review.googlesource.com/10113
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:07:27 +00:00
Brian Salomon
e7c85c45c4 Revert "Create new inset algorithm for spot shadows"
This reverts commit e5f5bf5175.

Reason for revert: Breaking a bunch of bots. e.g:

https://luci-milo.appspot.com/swarming/task/3519cae0a03c7b10/steps/dm/0/stdout

Original change's description:
> Create new inset algorithm for spot shadows
> 
> BUG=skia:
> 
> Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
> Reviewed-on: https://skia-review.googlesource.com/9875
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=jvanverth@google.com,bsalomon@google.com,rmistry@google.com,robertphillips@google.com,msarett@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: I3d119ff631dbb1a41f873b9c8753d542ec91254e
Reviewed-on: https://skia-review.googlesource.com/10112
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-03-24 16:00:55 +00:00
Jim Van Verth
e5f5bf5175 Create new inset algorithm for spot shadows
BUG=skia:

Change-Id: If7c67c2a5b9beea28f86d13362a5156b46394d0e
Reviewed-on: https://skia-review.googlesource.com/9875
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-03-24 14:56:01 +00:00
Hal Canary
27ecd86b61 SkImageSource::Make() returns nullptr when srcrect is empty.
BUG=skia:6389
Change-Id: Ia995da1f70cbbc0c80ab76385f0ea8cc0d48fa07
Reviewed-on: https://skia-review.googlesource.com/9943
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-03-21 22:04:36 +00:00
Robert Phillips
eb35f4dfaa Add pre-Flush callback to GrDrawingManager (take 2)
This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.

Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)

Change-Id: I7ffc1b69defda625b6d4311e96776de4cf2abb87
Reviewed-on: https://skia-review.googlesource.com/9903
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-21 11:59:58 +00:00
Robert Phillips
18ea816aad Revert "Add pre-Flush callback to GrDrawingManager"
This reverts commit d222ec492f.

Reason for revert: TegraX1 Vulkan bot

Original change's description:
> Add pre-Flush callback to GrDrawingManager
> 
> This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.
> 
> Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)
> 
> Change-Id: I307796595d651cf376838bff1f9e4385c3753547
> Reviewed-on: https://skia-review.googlesource.com/8679
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I852648adc12d2aa58cd09c57d961c340d657776c
Reviewed-on: https://skia-review.googlesource.com/9735
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-03-15 18:41:31 +00:00
Robert Phillips
d222ec492f Add pre-Flush callback to GrDrawingManager
This will allow internal systems (e.g., fonts & path renderers) to create pre-flush atlases.

Depends on: https://skia-review.googlesource.com/c/8988/ (Allow GrSurfaceProxy-derived classes to use flags when instantiating)

Change-Id: I307796595d651cf376838bff1f9e4385c3753547
Reviewed-on: https://skia-review.googlesource.com/8679
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-03-15 17:54:16 +00:00
Mike Reed
bdce9c2d73 vertices to/from data
precursor to enabling serialization in pictures

BUG=skia:6366

Change-Id: Iba89aa98f389b3281e7705d041e3337e89071f03
Reviewed-on: https://skia-review.googlesource.com/9680
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-03-14 18:40:40 +00:00
Brian Osman
2c2bc11aea Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

Re-land of https://skia-review.googlesource.com/c/8529/

BUG=skia:

Change-Id: I48ebd57d1ea0cfd3a1db10c475f2903afb821966
Reviewed-on: https://skia-review.googlesource.com/8960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-28 20:59:57 +00:00
Robert Phillips
c787e495e2 Allow GrSurfaceProxy-derived classes to use flags when instantiating (take 2)
In some instances proxies must be created that, when instantiated, have no pending IO.

This is split out of:

https://skia-review.googlesource.com/c/8679/ (Add per-Flush callback to GrDrawingManager)

and is a reland of:

https://skia-review.googlesource.com/c/8988/ ( Allow GrSurfaceProxy-derived classes to use flags when instantiating)

Change-Id: I36f52a6d249e762bdfc1f0d7528aba6d4071e492
Reviewed-on: https://skia-review.googlesource.com/9070
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-02-28 17:21:55 +00:00
Brian Osman
aa1ab8905e Revert "Add GrExternalTextureData and SkCrossContextImageData"
This reverts commit 9ad1f92e2f.

Reason for revert: Breaking lots of bots

Original change's description:
> Add GrExternalTextureData and SkCrossContextImageData
> 
> GrExternalTextureData is an API for exporting the backend-specific
> information about a texture in a type-safe way, and without pointing
> into the GrTexture. The new detachBackendTexture API lets us release
> ownership of a texture to the client.
> 
> SkCrossContextImageData is the public API that lets clients upload
> textures on one thread/GrContext, then safely transfer ownership to
> another thread and GrContext for rendering.
> 
> Only GL is implemented/supported right now. Vulkan support requires
> that we add thread-safe memory pools, or otherwise transfer the
> actual memory block containing the texture to the new context.
> 
> BUG=skia:
> 
> Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
> Reviewed-on: https://skia-review.googlesource.com/8529
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,chinmaygarde@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: If27d1f4c3a169efb6533170f67a172664c0fe8ce
Reviewed-on: https://skia-review.googlesource.com/8955
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-02-24 17:28:03 +00:00
Brian Osman
9ad1f92e2f Add GrExternalTextureData and SkCrossContextImageData
GrExternalTextureData is an API for exporting the backend-specific
information about a texture in a type-safe way, and without pointing
into the GrTexture. The new detachBackendTexture API lets us release
ownership of a texture to the client.

SkCrossContextImageData is the public API that lets clients upload
textures on one thread/GrContext, then safely transfer ownership to
another thread and GrContext for rendering.

Only GL is implemented/supported right now. Vulkan support requires
that we add thread-safe memory pools, or otherwise transfer the
actual memory block containing the texture to the new context.

BUG=skia:

Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca
Reviewed-on: https://skia-review.googlesource.com/8529
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-02-24 16:09:33 +00:00
Dominic Mazzoni
394d414452 Implement SkHighContrastFilter
This is a color filter to apply several contrast adjustments for users
with low vision, including inverting the colors (in either RGB or HSL
space), applying gamma correction, converting to grayscale, and increasing
the contrast.

BUG=skia:6235

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: Icb8f3e290932d8bcd9387fb1f39dd20767e15cf6
Reviewed-on: https://skia-review.googlesource.com/7460
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-02-16 02:34:44 +00:00
Herb Derby
78c0c4c5a0 Remove SkSmallAllocator.
TBR=mtklein@google.com

Change-Id: I375af12c5de4397a682c1946404282da95ad42ec
Reviewed-on: https://skia-review.googlesource.com/8392
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-02-14 19:32:58 +00:00
Brian Salomon
cb30bb2cb7 Remove GrFragmentProcessor::computeInvariantOutput
Change-Id: If475730103052c6097eb91be06808fb723b70bf8
Reviewed-on: https://skia-review.googlesource.com/8330
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-02-13 15:32:00 +00:00
Herb Derby
2e83b13122 Remove SkTextureCompressor.
This is the ultimate state of what it looks like to remove
SkTextureCompressor.

This end result will result from the following steps.

1) Remove Skia dep on ktx (done)
2) Move format over to ktx (done)
3) Remove all SkTexture compressor code

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Change-Id: I3ad7a6abbea006a3034d95662c652d6db90b86ef
Reviewed-on: https://skia-review.googlesource.com/8272
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-02-10 17:36:43 +00:00
Brian Salomon
0dda9cb881 Make shadow tessellators fail gracefully and add unit test for this.
Change-Id: I42a9d06a18928588347a6dea2f6150518ba29aa8
Reviewed-on: https://skia-review.googlesource.com/7886
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2017-02-03 16:08:46 +00:00
Robert Phillips
3500b77f7d Consolidate read/write-Pixels testing code - take 2
Change-Id: I0de058a9eec749a7086138ac2eb79732f06ce55e
Reviewed-on: https://skia-review.googlesource.com/7650
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-01-27 15:52:20 +00:00
Robert Phillips
2b270e5662 Revert "Consolidate read/write-Pixels testing code"
This reverts commit 0bd4a23ef4.

Reason for revert: What?!?

Original change's description:
> Consolidate read/write-Pixels testing code
> 
> Change-Id: I853f8f747ed0040333473fbc722cabac84e6ac83
> Reviewed-on: https://skia-review.googlesource.com/7560
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> 

TBR=robertphillips@google.com,brianosman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I9cb049a4f86350f849d00839a55b55fb07e861b0
Reviewed-on: https://skia-review.googlesource.com/7648
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-01-27 14:28:40 +00:00
Robert Phillips
0bd4a23ef4 Consolidate read/write-Pixels testing code
Change-Id: I853f8f747ed0040333473fbc722cabac84e6ac83
Reviewed-on: https://skia-review.googlesource.com/7560
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-01-27 13:27:21 +00:00
Herb Derby
ac04fef619 Remove SkFallbackAlloc and SkFixedAlloc.
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN;skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

TBR=reed@google.com

Change-Id: I1000dc9ed8ad65b249798759d9af99f47fc237d2
Reviewed-on: https://skia-review.googlesource.com/6809
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-01-16 17:01:57 +00:00