Commit Graph

484 Commits

Author SHA1 Message Date
Brian Salomon
5e550ab57e Revert "eliminated GrGLSLExpr"
This reverts commit 93f20f5629.

Reason for revert: Mismerge readded deleted files.

Original change's description:
> eliminated GrGLSLExpr
> 
> Now that skslc performs all of the optimizations (and then some) that
> GrGLSLExpr is responsible for, it's just extra work for no benefit.
> 
> Bug: skia:
> Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
> Reviewed-on: https://skia-review.googlesource.com/14560
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

TBR=bsalomon@google.com,ethannicholas@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia8b723594527afe34489fc78a4b49039081b6390
Reviewed-on: https://skia-review.googlesource.com/15154
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-05-02 21:07:32 +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
Ethan Nicholas
93f20f5629 eliminated GrGLSLExpr
Now that skslc performs all of the optimizations (and then some) that
GrGLSLExpr is responsible for, it's just extra work for no benefit.

Bug: skia:
Change-Id: I40b0629e00a33873ed9fc6c0a9f41d8350221f9a
Reviewed-on: https://skia-review.googlesource.com/14560
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-05-02 20:05:56 +00:00
Jim Van Verth
4c9155bd66 Remove EXPERIMENTAL_SHADOWING, Part 1
Bug: skia:6557
Change-Id: I6482d74be7b360c93141a73dd80c67854530c7a1
Reviewed-on: https://skia-review.googlesource.com/15101
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-02 17:22:44 +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
Florin Malita
c3b10a3a78 Reland "Add a clip mask bench"
Change-Id: Iefbfd1ecec38d3db5bac4370c75e6701aa03076f
TBR=reed@google.com
Reviewed-on: https://skia-review.googlesource.com/15102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-02 15:33:06 +00:00
Mike Klein
cea615b497 Revert "Add a clip mask bench"
This reverts commit c59a38d12d.

Reason for revert: whoops, sorry, this one must have been the problem.

Original change's description:
> Add a clip mask bench
> 
> Change-Id: I230729492fc23e290136f7d62610abe5ca51c067
> Reviewed-on: https://skia-review.googlesource.com/14941
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> 

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

Change-Id: Ifbd74a8985ebaa95e54032aaaa2891b0f1b67940
Reviewed-on: https://skia-review.googlesource.com/14957
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-05-01 21:34:00 +00:00
Florin Malita
c59a38d12d Add a clip mask bench
Change-Id: I230729492fc23e290136f7d62610abe5ca51c067
Reviewed-on: https://skia-review.googlesource.com/14941
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-05-01 21:27:00 +00:00
Matt Sarett
d170c0fb48 Only store width and height on SkPixelRef (last part)
Relanding https://skia-review.googlesource.com/c/14105/
in pieces to try to diagnose problems with the Chrome
roll.

Bug: skia:6535
Change-Id: Iefe4825b9ce9be999baeec8ab7ae6651f1caf451
Reviewed-on: https://skia-review.googlesource.com/14860
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-05-01 17:01:29 +00:00
Mike Reed
736a9cc88d remove unused yuv methods
Bug: skia:
Change-Id: Ie1e6c905d8989b49c2cf5c9e5fd1f383268f6480
Reviewed-on: https://skia-review.googlesource.com/14645
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-28 18:25:17 +00:00
Ben Wagner
2fcd4a480d Revert "Only store width and height on SkPixelRef"
This reverts commit 2cbb6662e3.

Reason for revert: Likely cause of Chromium DEPS roll failure; speculative revert.

Original change's description:
> Only store width and height on SkPixelRef
>
> Bug: skia:6535
> Change-Id: Id91e8d1e82f593be7d4b23ca5abde752f2666a77
> Reviewed-on: https://skia-review.googlesource.com/14105
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

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

Change-Id: I12a024a71833f33432d5ea8cffdfc642b8b4240a
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/14644
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2017-04-28 17:06:23 +00:00
Matt Sarett
2cbb6662e3 Only store width and height on SkPixelRef
Bug: skia:6535
Change-Id: Id91e8d1e82f593be7d4b23ca5abde752f2666a77
Reviewed-on: https://skia-review.googlesource.com/14105
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-04-27 21:19:32 +00:00
Brian Osman
df7e075c74 Fold SkImageCacherator into SkImage_Lazy
SkImageCacherator still exists, but only as an interface implemented
(solely) by SkImage_Lazy. The only external clients are
GrImageTextureMaker and SkImage_Gpu::getDeferredTextureImageData.

This is probably an improvement, but doesn't go as far as I'd hoped.

Bug: skia:
Change-Id: I6812badfabb6924b025621b21af00cbde9c16cac
Reviewed-on: https://skia-review.googlesource.com/14371
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-27 18:31:19 +00:00
Mike Klein
39312c8f82 Describe GCC-like asm steps as "assemble ..."
Oddly, the MSVC toolchain already says "assemble ...".

Change-Id: Iabf06afa1b7c05b5699a26813f1469346be439a5
Reviewed-on: https://skia-review.googlesource.com/14367
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-26 14:59:55 +00:00
Matt Sarett
ee7cb5d974 Delete SkGTypeface and SkGScalerContext
Bug: skia:
Change-Id: I6a513d0cb3600678bc3b9c2bdfa8e04d692e9acf
Reviewed-on: https://skia-review.googlesource.com/14191
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-25 15:49:55 +00:00
Robert Phillips
7fbb7d3d90 Remove two more gpu headers from include/*
This is probably it until GrTexture.h can be hidden.

TBR=bsalomon@google.com

Change-Id: Ie743c937f72aa0dc9f5e84def572f655f0abe041
Reviewed-on: https://skia-review.googlesource.com/14143
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-04-24 12:57:31 +00:00
Robert Phillips
e3302dfb81 Make InstancedRendering more opList-splitting friendly
This CL splits the InstancedRendering class into an allocator and a per-opList op tracker. This was done because we need to allocate the InstancedRendering ops before we know the final destination opList. The InstancedRendering ops are now still all allocated from the same pool but the tracking and execution is done per opList.

Change-Id: Ieddabb6f85f8f187c5e7373f7f6cb155d69a9685
Reviewed-on: https://skia-review.googlesource.com/13860
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2017-04-24 12:13:16 +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
Matt Sarett
e71db447d4 Use dstColorSpace in SkPictureShader cache key
Starting with the bug fix + test.

Broken off of:
https://skia-review.googlesource.com/c/13976

Bug: skia:
Change-Id: If6c28e2dfb0c5340c48e943d0313a9ea9515a6c3
Reviewed-on: https://skia-review.googlesource.com/14061
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-21 19:34:43 +00:00
Robert Phillips
9f5d4679e1 Remove more headers from include/gpu
TBR=bsalomon@google.com

Change-Id: I93b28cfcb4d7b50c12e24ea81faab680bccce9ef
Reviewed-on: https://skia-review.googlesource.com/14036
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-04-21 17:12:17 +00:00
Robert Phillips
54cbcd7056 Remove all headers from include/gpu/effects
TBR=bsalomon@google.com

Change-Id: I9ad2fa41262693b3a83bef625eac332eb1e71a3d
Reviewed-on: https://skia-review.googlesource.com/13988
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-04-21 16:02:31 +00:00
Brian Osman
f1b4382421 Rename SkImage_Generator to SkImage_Lazy
This removes a long-standing source of confusion: SkImage_Generator was an
image that wrapped an SkImageGenerator (with an SkImageCacherator stuck in
the middle). We could choose to rename either one, but SkImageGenerator is
public, so take the easy road and rename the private image subclass. Given
the existence of SkImage::isLazyGenerated, this name seems appropriate.

Bug: skia:
Change-Id: I061ece94f48538efb1dc5548010f6ca7d438a69b
Reviewed-on: https://skia-review.googlesource.com/13979
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-04-20 18:19:56 +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
Greg Daniel
c819e66993 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reland of the reverted cl: https://skia-review.googlesource.com/13804

Bug: skia:
Change-Id: I9023e80e60d2f2ebbdc8e794ec46d6f5c5c7c917
Reviewed-on: https://skia-review.googlesource.com/13874
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-20 13:09:27 +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
Herb Derby
ecc364c426 Remove SkOpTAllocator
Have the callsites of SkOpTAllocator call SkArenaAlloc directly.

Bug: skia:
Change-Id: Ic54e92c3e9a0abed038aa3ae40e8a195895af99d
Reviewed-on: https://skia-review.googlesource.com/13870
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2017-04-19 20:36:15 +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
Greg Daniel
5238f994bf Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit 3a3bc42b7d.

Reason for revert: still breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> This is a reupload of CL: https://skia-review.googlesource.com/13651
> 
> Bug: skia:
> Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
> Reviewed-on: https://skia-review.googlesource.com/13804
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> 

TBR=djsollen@google.com,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ic595e32005761170156499cfb6efc1acfce96001
Reviewed-on: https://skia-review.googlesource.com/13806
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 14:44:47 +00:00
Greg Daniel
3a3bc42b7d Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

This is a reupload of CL: https://skia-review.googlesource.com/13651

Bug: skia:
Change-Id: I091f526b8c4a61774c34834cd7bfb7e2c822ff5c
Reviewed-on: https://skia-review.googlesource.com/13804
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 13:58:52 +00:00
Greg Daniel
df07ddd1f0 Revert "Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h"
This reverts commit edbb7d8860.

Reason for revert: breaking android

Original change's description:
> Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
> 
> This change is needed since once we start getting support for varrying of extensions
> and newer version support in general, we need a common vulkan header to compile off of.
> Otherwise we will run into problems if clients have older headers that don't include
> functions/symbols we are trying to use.
> 
> Additionally it has the benefit of not needing to add if SK_VULKAN around code in
> include which wants to use vulkan symbols.
> 
> Bug: skia:
> Change-Id: I674a253308596dc75bd23574984ae933923679f9
> Reviewed-on: https://skia-review.googlesource.com/13651
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,egdaniel@google.com,mtklein@google.com,jvanverth@google.com,bsalomon@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I179647e6ae213b1b17a9c42ced5e98c6599b96c2
Reviewed-on: https://skia-review.googlesource.com/13774
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-04-19 01:22:52 +00:00
Greg Daniel
9440345a81 Add backend safe classes for passing in external texture and render targets into gpu
This CL adds the GrBackend* classes as well as just updates the API for SkSurface and
SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will
be in an additional CL.

Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin,
samples, out of the descriptor and pass those in directly.

Bug: skia:
Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854
Reviewed-on: https://skia-review.googlesource.com/13122
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-04-18 20:33:58 +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
Greg Daniel
edbb7d8860 Check-in vulkan.h into third_party and use that instead of local sdk vulkan.h
This change is needed since once we start getting support for varrying of extensions
and newer version support in general, we need a common vulkan header to compile off of.
Otherwise we will run into problems if clients have older headers that don't include
functions/symbols we are trying to use.

Additionally it has the benefit of not needing to add if SK_VULKAN around code in
include which wants to use vulkan symbols.

Bug: skia:
Change-Id: I674a253308596dc75bd23574984ae933923679f9
Reviewed-on: https://skia-review.googlesource.com/13651
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-18 19:35:22 +00:00
Mike Reed
15bff50a62 remove unneeded android flag for lockpixels
Bug: skia:6481
Change-Id: I6f9e299b34f396fbab892a4f91d3c4265c7c0ae2
Reviewed-on: https://skia-review.googlesource.com/13762
Reviewed-by: Mike Reed <reed@google.com>
2017-04-18 19:01:26 +00:00
Mike Reed
4edb5d219e hide lockpixels api behind flag
guarded by SK_SUPPORT_OBSOLETE_LOCKPIXELS

needs https://codereview.chromium.org/2820873002/# to land first
Bug: skia:6481
Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09

Change-Id: I1c39902cbf6fe99f622adfa8192733b95f7fea09
Reviewed-on: https://skia-review.googlesource.com/13580
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-17 15:33:36 +00:00
Mike Reed
818580d81b remove code directly involved in lock/unlock in SkPixelRef
Bug: skia:6481
Change-Id: I3c301ad42b082e04e233aa32d77862036fe998fa
Reviewed-on: https://skia-review.googlesource.com/13463
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-13 20:44:24 +00:00
Mike Reed
79f2db2a21 remove old-pixelref-api flag from android
call sites have been updated in master

Bug: skia:6481
Change-Id: I7f341cb511126a71fe3077bed3eaa55dc7ff76c3
Reviewed-on: https://skia-review.googlesource.com/13440
Reviewed-by: Mike Reed <reed@google.com>
2017-04-13 18:10:55 +00:00
Mike Reed
1335a0561e remove dead code around replayClips
Bug: skia:
Change-Id: I208bf41846265524d86f65de660311199fefc158
Reviewed-on: https://skia-review.googlesource.com/13338
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-13 15:42:09 +00:00
Greg Daniel
50130e427c Allow including of vulkan.h as a required public api when using vulkan.
Bug: skia:
Change-Id: I3ac382edc12144dcda9ef168f752b14878e0e5ac
Reviewed-on: https://skia-review.googlesource.com/13262
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-12 18:24:25 +00:00
Matt Sarett
547a7272fa Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
Fixes cts tests.

b/37161109
b/37237678

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN

Bug: skia:
Change-Id: I438b8b17f4c7c5bfcb50dfa22af1ddb97b905088
Reviewed-on: https://skia-review.googlesource.com/13261
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-12 16:36:51 +00:00
Matt Sarett
e5fec21787 Revert "Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix"
This reverts commit e5efa51b2a.

Reason for revert: MSAN

Original change's description:
> Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
> 
> Fixes cts tests.
> 
> b/37161109
> b/37237678
> 
> Bug: skia:
> Change-Id: Ida9ac5e4261e8a6b22e8cdc0e585e0e7929dbbfd
> Reviewed-on: https://skia-review.googlesource.com/13249
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

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

Change-Id: I2b78c7b32997344136c784dc77675dafca37565e
Reviewed-on: https://skia-review.googlesource.com/13259
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-04-12 15:49:51 +00:00
Matt Sarett
e5efa51b2a Fix SkLocalMatrixShader::isAImage() to respect local matrix and image local matrix
Fixes cts tests.

b/37161109
b/37237678

Bug: skia:
Change-Id: Ida9ac5e4261e8a6b22e8cdc0e585e0e7929dbbfd
Reviewed-on: https://skia-review.googlesource.com/13249
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-12 15:11:03 +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
Mike Klein
28f5b779a3 stop disabling threadsafe statics
Chrome's got threadsafe statics, Android too, Flutter too, and heck, we even have them on all our Windows builds.  No one responded to my mail about them.  Let's stop turning them off on not-Windows!

Change-Id: Iadf00336aa73df3f694ac019c9d54a3f2257a3bd
Reviewed-on: https://skia-review.googlesource.com/11683
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-04-07 14:54:29 +00:00
Mike Reed
93b1b4feda add guard for obsolete (non-functioning) replayClips
replayClips has been disabled (broken) for a while.
This CL just attempts to hide the api (will remove
once android's callsite is removed)

Bug: skia:
Change-Id: I35b412addfc0a08ea888a62609888b9b54dce2a6
Reviewed-on: https://skia-review.googlesource.com/11401
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-06 12:53:21 +00:00
Mike Reed
45a00cee88 remove android legacy flags
relies on https://googleplex-android-review.git.corp.google.com/#/c/2060523/ landing first

Bug: skia:
Change-Id: I603c8e0835235e9d81bd0a5a559cb5ab5b5cfd56
Reviewed-on: https://skia-review.googlesource.com/11350
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-04-05 17:45:49 +00:00
Mike Klein
9e4d51126f remove -mdspr2
I set -mdspr2 unconditionally on 32-bit MIPS builds only to not have to
deal with setting it conditionally on the source files specifically
requiring those instructions.

Since then, I've deleted all the source files specifically requiring
-mdspr2 (and -mdsp).  No one understood them and they were only
accelerating really uninteresting cases, like 565 blits.

So, we haven't needed -mdspr2 anywhere for a while, and removing it
will unblock running these builds on the CI20 dev boards, which
support neither -mdsp nor -mdsp2.

BUG=skia:1437

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-mipsel-Release-Android

Change-Id: Idda56fd8bb37ba064b78b4cddd8878b37dfe9502
Reviewed-on: https://skia-review.googlesource.com/11284
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-04 19:33:43 +00:00