Commit Graph

279 Commits

Author SHA1 Message Date
Mike Klein
7d92103f9e GN: add skia_android_serial and push_$foo targets when it's set
E.g.
    $ ninja -C out push_dm

By default (ninja -C out) everything is built and pushed if skia_android_serial
is set.  Dependencies are tracked, so incremental builds push only executables
that have changed.

Change-Id: I586d81791f5f877b173cf61ed68fa9aab96234d2
Reviewed-on: https://skia-review.googlesource.com/6616
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-05 19:04:30 +00:00
Derek Sollenberger
70120c778a Add tools to support gdb and simpleperf for android executables.
Change-Id: I6e7f41df094ae037538ebd61e40385d7e2e9eb26
Reviewed-on: https://skia-review.googlesource.com/6615
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-01-05 17:16:01 +00:00
Matt Sarett
d3ed402617 Disable clang -Wsigned-enum-bitfield warnings
Full error text:
error: enums in the Microsoft ABI are signed integers by default;
consider giving the enum Properties an unsigned underlying type
to make this code portable [-Werror,-Wsigned-enum-bitfield]

BUG=skia:

Change-Id: I1491dd94c894e383fed401880fc04562140f7a66
Reviewed-on: https://skia-review.googlesource.com/6594
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2017-01-04 22:46:38 +00:00
Ben Wagner
e6b274e402 Specify "/utf-8" with Visual C++.
This sets the source and executable character set to utf-8. This avoids
issues with local code pages and avoids adding an unwanted BOM.

Change-Id: If854c0001c2363f3262d20e28dce30c1e733536a
Reviewed-on: https://skia-review.googlesource.com/6547
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-01-03 22:45:03 +00:00
Matt Sarett
909d3791f5 Improve color space support in SkImage::readPixels()
Correct handling of kGray, k565, k4444 etc. is still a TODO.
SkImage_Generator and SkImage_Gpu are still TODOs.

BUG=skia:6021

Change-Id: Ib53d97d3a866b2b4934fd85c10100855743a8fab
Reviewed-on: https://skia-review.googlesource.com/6396
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-22 17:47:08 +00:00
Leon Scroggins III
20a7ecc49b Implement scaling in SkCodecImageGenerator
Plumb calls down to SkCodec.

Add a gm

Change-Id: I16da24eb739295ab72f487df02f19968151443f3
Reviewed-on: https://skia-review.googlesource.com/6287
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-21 19:12:51 +00:00
Brian Salomon
09d994ecb3 Misc batch->op cleanup Part 1 of 2
Change-Id: I80f951976558a284e55386e0a368f08bd835d8ca
Reviewed-on: https://skia-review.googlesource.com/6359
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-21 16:45:40 +00:00
rmistry
478422596e Revert of Generate Signed Distance Field directly from vector path (patchset #23 id:440001 of https://codereview.chromium.org/1643143002/ )
Reason for revert:
Caused test failures again but this time in Win8 and Win10 bots:
* https://chromium-swarm.appspot.com/task?id=33384540bf6f3710&refresh=10
* https://chromium-swarm.appspot.com/task?id=3338a3ea9f6fe510&refresh=10

Original issue's description:
> Generate Signed Distance Field directly from vector path
>
> Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002
>
> Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
> Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
> Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
> Review-Url: https://codereview.chromium.org/1643143002
> Committed: https://skia.googlesource.com/skia/+/64b70b096ac20833d9737758a4bd5f2a51078bc4
> Review-Url: https://codereview.chromium.org/1643143002
> Committed: https://skia.googlesource.com/skia/+/6d2f73c364d0d823f14d1ddebc88e0bcbc8f0634

TBR=bsalomon@google.com,jvanverth@google.com,mtklein@google.com,wasim.abbas@arm.com,caryclark@google.com,reed@google.com,egdaniel@google.com,joel.liang@arm.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/2597473003
2016-12-21 04:25:18 -08:00
Mike Klein
40a82bd0f4 remove MIPS DSP optimizations
There are only a couple of these, primarily focused on index8 srcs and 565 dsts.  The burden's starting to outweigh the benefit.  No one on the team knows MIPS assembly.

If we're going to try this again, I'd rather we try some sort of SkNx / compiler-intrinsic based approach, probably targeting MIPS SIMD (MSA), not this older instruction set.

We already ignore these files for 64-bit MIPS.  This just closes the loop on 32-bit MIPS.

CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD,Build-Ubuntu-Clang-mips64el-Debug-Android,Build-Ubuntu-Clang-mips64el-Release-Android,Build-Ubuntu-Clang-mipsel-Debug-Android,Build-Ubuntu-Clang-mipsel-Release-Android

BUG=skia:6065

Change-Id: Iecac15b56f59625b2e743ea36e7791b90bb0b422
Reviewed-on: https://skia-review.googlesource.com/6353
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-21 03:55:00 +00:00
joel.liang
6d2f73c364 Generate Signed Distance Field directly from vector path
Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002

Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
Review-Url: https://codereview.chromium.org/1643143002
Committed: https://skia.googlesource.com/skia/+/64b70b096ac20833d9737758a4bd5f2a51078bc4
Review-Url: https://codereview.chromium.org/1643143002
2016-12-20 18:58:53 -08:00
Hal Canary
6ad3d2fa38 xps.gni
Motivation: Since I am activly refactoring SkXPS, I will be needing to
add and subtract sources.  This is the only way to keep chrome and skia
in sync.

TODO(halcanry): follow up in Chrome build files.

BUG=skia:3495

Change-Id: I2bfcbfce7628c34f9a623c6fa806374a10cdbb75
Reviewed-on: https://skia-review.googlesource.com/6350
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-12-20 21:55:50 +00:00
Brian Salomon
5ec9def2dd Rename files, macros, types, and functions related to GrDrawOp testing.
Make the test factories use sk_sp.

Change-Id: Idba630b84deb2848f2203a80fd72e1efa5fc6acf
Reviewed-on: https://skia-review.googlesource.com/6342
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-20 21:10:56 +00:00
Leon Scroggins III
4f8a467a47 Allow running gn_to_bp.py from another script
Use __file__ to determine where 'here' is.

Necessary for
https://chrome-internal-review.googlesource.com/313075.

Change-Id: I1b9571847c761da311012039e2c885fad0a593cb
Reviewed-on: https://skia-review.googlesource.com/6230
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-19 16:21:53 +00:00
Leon Scroggins III
932efed7c8 GIF: Avoid copying/storing data when possible
If the input SkStream has a length and position, do not copy and store
LZW blocks or ColorMaps. Instead, mark the position and size, and read
from the stream when necessary.

This will save memory in Chromium's use case, which has already
buffered all of its data.

In the case where we *do* need to copy, store it on the SkStreamBuffer.
This allows SkGifImageReader to have simpler code.

Add tests.

Change-Id: Ic65fa766328ae2e5974b2084bc2099e19aced731
Reviewed-on: https://skia-review.googlesource.com/6157
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2016-12-19 15:25:13 +00:00
rmistry
a8b1e6d068 Revert of Generate Signed Distance Field directly from vector path (patchset #23 id:440001 of https://codereview.chromium.org/1643143002/ )
Reason for revert:
Seems to have caused lot of test bots to fail.
Eg:
https://luci-milo.appspot.com/swarming/task/332e3b427135f010

Original issue's description:
> Generate Signed Distance Field directly from vector path
>
> Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002
>
> Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
> Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
> Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
> Review-Url: https://codereview.chromium.org/1643143002
> Committed: https://skia.googlesource.com/skia/+/64b70b096ac20833d9737758a4bd5f2a51078bc4

TBR=bsalomon@google.com,jvanverth@google.com,mtklein@google.com,wasim.abbas@arm.com,caryclark@google.com,reed@google.com,egdaniel@google.com,joel.liang@arm.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/2580373002
2016-12-19 04:32:28 -08:00
joel.liang
64b70b096a Generate Signed Distance Field directly from vector path
Add SkGenerateDistanceFieldFromPath API to generate signed distance field directly from SkPath.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1643143002

Committed: https://skia.googlesource.com/skia/+/4de97a64e8829323a7070b623411d9f9ddb0cd0f
Committed: https://skia.googlesource.com/skia/+/e8f0a7b986f1e5583c9bc162efcdd92fd6430549
Committed: https://skia.googlesource.com/skia/+/67c7c81a82b6351e9fbbf235084d7120162d9268
Review-Url: https://codereview.chromium.org/1643143002
2016-12-18 20:24:12 -08:00
Ravi Mistry
113d05fa7b Revert "Revert "WIP: Skia support library for ICC tasks""
This reverts commit eb733fbf56.

Reason for revert: Revert patch was automatically merged incorrectly?

Original change's description:
> Revert "WIP: Skia support library for ICC tasks"
> 
> This reverts commit fc8dc3194a.
> 
> Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds.
> Example tasks:
> * https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10
> * https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10
> 
> Original change's description:
> > WIP: Skia support library for ICC tasks
> > 
> > As a starting point, this would be mostly trivial to implement using
> > SkColorSpace.
> > 
> > This also would give us the flexibility to begin to move all of
> > the ICC related code from SkColorSpace to SkICC.
> > 
> > What are the advantages of moving this away from SkColorSpace?
> > (1) A long term goal (once Chrome uses SkCodec), might be to
> > move SkColorSpace::MakeICC() out of the public API.  That way,
> > we can guarantee that we can draw to/from *any* SkColorSpace.
> > (2) Keeps SkColorSpace separate from ICC-specific representations
> > like SkColorSpaceTransferFn etc.
> > 
> > BUG=skia:
> > 
> > Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
> > Reviewed-on: https://skia-review.googlesource.com/5676
> > Commit-Queue: Matt Sarett <msarett@google.com>
> > Reviewed-by: Brian Osman <brianosman@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> > 
> 
> TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
> BUG=skia:
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856
> Reviewed-on: https://skia-review.googlesource.com/6232
> Commit-Queue: Ravi Mistry <rmistry@google.com>
> Reviewed-by: Ravi Mistry <rmistry@google.com>
> 

TBR=mtklein@google.com,rmistry@google.com,msarett@google.com,reviews@skia.org,brianosman@google.com,reed@google.com
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I68b1624cfab8adfe31b17e1193a7766507dec8b0
Reviewed-on: https://skia-review.googlesource.com/6233
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2016-12-17 01:31:22 +00:00
Ravi Mistry
eb733fbf56 Revert "WIP: Skia support library for ICC tasks"
This reverts commit fc8dc3194a.

Reason for revert: Breaks Build-Mac-Clang-Arm7-{Debug,Release}-iOS builds.
Example tasks:
* https://chromium-swarm.appspot.com/task?id=3322f668620b9e10&refresh=10
* https://chromium-swarm.appspot.com/task?id=332296146331e810&refresh=10

Original change's description:
> WIP: Skia support library for ICC tasks
> 
> As a starting point, this would be mostly trivial to implement using
> SkColorSpace.
> 
> This also would give us the flexibility to begin to move all of
> the ICC related code from SkColorSpace to SkICC.
> 
> What are the advantages of moving this away from SkColorSpace?
> (1) A long term goal (once Chrome uses SkCodec), might be to
> move SkColorSpace::MakeICC() out of the public API.  That way,
> we can guarantee that we can draw to/from *any* SkColorSpace.
> (2) Keeps SkColorSpace separate from ICC-specific representations
> like SkColorSpaceTransferFn etc.
> 
> BUG=skia:
> 
> Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
> Reviewed-on: https://skia-review.googlesource.com/5676
> Commit-Queue: Matt Sarett <msarett@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> 

TBR=mtklein@google.com,msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ibdf272fce25892402bd3e85595fb8814cdf59856
Reviewed-on: https://skia-review.googlesource.com/6232
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Ravi Mistry <rmistry@google.com>
2016-12-17 01:27:10 +00:00
Brian Salomon
2ee084e730 Rename GrBatchAtlas -> GrDrawOpAtlas.
Change-Id: I776f37e42dcab8b16535c48df9c405b1f211f6c9
Reviewed-on: https://skia-review.googlesource.com/6165
Commit-Queue: Brian Salomon <brian@thesalomons.net>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-17 00:35:39 +00:00
Brian Salomon
903da79a19 Rename GrBatchAtlas files to GrDrawOpAtlas
This intermediary change only exists to make the actual class rename change readable on gerrit due to gerrit not recognizing file renames correctly.

Change-Id: I919f84837fb17191ca49f00f82e56330f84766da
Reviewed-on: https://skia-review.googlesource.com/6190
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-16 23:50:06 +00:00
Matt Sarett
fc8dc3194a WIP: Skia support library for ICC tasks
As a starting point, this would be mostly trivial to implement using
SkColorSpace.

This also would give us the flexibility to begin to move all of
the ICC related code from SkColorSpace to SkICC.

What are the advantages of moving this away from SkColorSpace?
(1) A long term goal (once Chrome uses SkCodec), might be to
move SkColorSpace::MakeICC() out of the public API.  That way,
we can guarantee that we can draw to/from *any* SkColorSpace.
(2) Keeps SkColorSpace separate from ICC-specific representations
like SkColorSpaceTransferFn etc.

BUG=skia:

Change-Id: Iddeb9903221fb57fbfc01218d8641c928b4a5165
Reviewed-on: https://skia-review.googlesource.com/5676
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-16 22:13:28 +00:00
Brian Salomon
f856fd1ccd Rename GrBatchFontCache->GrAtlasGlyphCache
Change-Id: Ie21e18b631daa24e70df630b9f910213f62bdbdf
Reviewed-on: https://skia-review.googlesource.com/6164
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 19:48:35 +00:00
Robert Phillips
8ced688a3a Add GM for filtering bug
For SkFilterQuality we get:

High   - repros for GPU
Medium - repros for both!
Low    - repros for both!
None   - doesn't repro

For AA quality (with filter quality fixed at High) we get:

AA     - repros for GPU
BW     - repros for GPU

BUG=673261

Change-Id: Ibf0644352bfa9d9c0e2d166e396ce9e9799b6d9d
Reviewed-on: https://skia-review.googlesource.com/6187
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-16 17:29:48 +00:00
Brian Salomon
895274391d move src/gpu/batches -> src/gpu/ops
Change-Id: I6410eae41f051ce38bef6f38d670924c3483c325
Reviewed-on: https://skia-review.googlesource.com/6163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 16:58:24 +00:00
Brian Salomon
6b316e9e20 Rename GrTestBatch and subclasses to Op
Change-Id: Ideab66b7ca227057a767be48aba3ea69a0a19115
Reviewed-on: https://skia-review.googlesource.com/6161
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-16 16:13:59 +00:00
Brian Salomon
a6aa590efc Rename batch->op and sk_sp for all remaining path renderer classes.
Change-Id: Iaa5551d3efe33b8b679b1913a19119ee3ed2e9b6
Reviewed-on: https://skia-review.googlesource.com/6159
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-16 15:14:00 +00:00
Ethan Nicholas
1b9924ffb7 Added SkLRUCache.h and converted GPU program cache to use it.
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4221

Change-Id: I7e4094c2f2a2ecc5909895a8a68b27047acdcbd0
Reviewed-on: https://skia-review.googlesource.com/4221
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-15 21:09:57 +00:00
Brian Salomon
09e019eafd Rename GrAtlasTextBatch files to GrAtlasTextOp
Change-Id: I3ce7321577c236a95811d7a2da798d4eb2e0cbd3
Reviewed-on: https://skia-review.googlesource.com/6116
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-15 16:28:59 +00:00
Brian Salomon
82c263f6e4 Rename NVPR batch->op and sk_sp'ify
Change-Id: I5934e189f72cbc9c1f306c719b4d6e3f5178a046
Reviewed-on: https://skia-review.googlesource.com/6101
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-15 15:30:17 +00:00
Brian Salomon
fc527d2764 Even more batch->op and sk_sp'ification.
Change-Id: I9930381465ebad690206e2251171004f9579fbcd
Reviewed-on: https://skia-review.googlesource.com/6100
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-15 14:40:59 +00:00
Brian Salomon
7dae46a678 Some more batch->op renaming
Change-Id: I5cbdc606170186d2d908d518af0e0fd1094fcf78
Reviewed-on: https://skia-review.googlesource.com/6089
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-14 22:08:58 +00:00
Brian Salomon
289e3d8dd7 Bring sk_sp to oval GrDrawOps and rename batch->op
Change-Id: Ic0e95a29f1e2479d3d79b7d175290cb20422b585
Reviewed-on: https://skia-review.googlesource.com/6082
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-14 21:29:49 +00:00
Brian Salomon
6a639040bc Update rect ops to use "op" in their name and return sk_sp.
Change-Id: I757c33d1cd17a7a7dda858f0fc5ab1094e3c2472
Reviewed-on: https://skia-review.googlesource.com/5985
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-14 19:27:40 +00:00
Mike Klein
b7ce80b714 switch to libstdc++ for standalone Android builds.
This makes it possible to target NDK API 18 (K) again.

Change-Id: Id3d1f19b2904792b4001d2ea0942cc1ab6cf732e
Reviewed-on: https://skia-review.googlesource.com/6081
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-14 19:15:18 +00:00
Robert Phillips
e305cc1f2a Partially defer GrSWMaskHelper
This is intended to position the writePixels in GrSWMaskHelper::toTexture for moving to GrSurfaceContext

Change-Id: I6c3d24eb3b1db3b0efc63f7f4f1240a7a00ee88a
Reviewed-on: https://skia-review.googlesource.com/6032
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-14 19:04:02 +00:00
Mike Reed
19d20c6176 remove PLAIN_ENUM flag for SkClipOp
BUG=skia:

Change-Id: Ie87c3e11df74fecf32217e2039ce46bea9ff4ab7
Reviewed-on: https://skia-review.googlesource.com/6033
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-14 18:35:07 +00:00
Mike Reed
49282296b6 add tests/bench for dynamicwstream
BUG=skia:

Change-Id: I5a995b63b1a2975cce8101717777eaa6fc12af21
Reviewed-on: https://skia-review.googlesource.com/6035
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-14 18:34:30 +00:00
Brian Osman
2052c86a30 Move, rename, and document Visual Studio GN helper script
BUG=skia:

DOCS_PREVIEW= https://skia.org/?cl=5983

Change-Id: I32ac2c5275eb86adaa2be9ceee061b2956db70ad
Reviewed-on: https://skia-review.googlesource.com/5983
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-12-14 16:41:52 +00:00
Mike Klein
bde5d5dc2e Revert "Do not build the ktx encoder for android framework"
This reverts commit eeb7137a0b.

Reason for revert: well, duh, I guess we'd better update the GYP and Google3 builds...

Original change's description:
> Do not build the ktx encoder for android framework
> 
> Move SkKTXImageEncoder.cpp into an optional block, and disable that
> block for the android framework. Use a new define to determine whether
> to define the entry point, rather than using
> SK_BUILD_FOR_ANDROID_FRAMEWORK.
> 
> Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1
> Reviewed-on: https://skia-review.googlesource.com/5982
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> 

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

Change-Id: I8da75db31884b5148f7f85a6a0c3e6913b71cfa8
Reviewed-on: https://skia-review.googlesource.com/6021
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-14 01:31:53 +00:00
Leon Scroggins III
eeb7137a0b Do not build the ktx encoder for android framework
Move SkKTXImageEncoder.cpp into an optional block, and disable that
block for the android framework. Use a new define to determine whether
to define the entry point, rather than using
SK_BUILD_FOR_ANDROID_FRAMEWORK.

Change-Id: I41103459135af744cf5715f27783c63dc37a7ad1
Reviewed-on: https://skia-review.googlesource.com/5982
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-13 22:13:54 +00:00
Mike Klein
db402cab8b add move semantics to SkTHash*
The more I look at std::unordered_map and co., the less I like them.
I think we might want to bet on SkTHash*.

As a simple first improvement, add move support.
Next comes shrinking, and then I'll start moving over SkTDynamicHash users.

BUG=skia:6053

Change-Id: Ifdb5d713aab66434ca271c7f18a0cbbb0720099c
Reviewed-on: https://skia-review.googlesource.com/5943
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-12-13 18:18:47 +00:00
Stan Iliev
5f1bb0a7c5 Add a method in SkCanvas to set "hard" clip bounds.
Add SkCanvas::setBoundRect, which sets the max clip rectangle,
which can be replaced by clipRect, clipRRect and clipPath.

BUG=skia:

Change-Id: Ie39eb1715214971576e7a1dda760c6997a7e0208
Reviewed-on: https://skia-review.googlesource.com/5359
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2016-12-12 23:24:31 +00:00
Mike Reed
689169dcad Hide exotic clipops, with a private rename for internal use
BUG=skia:

Change-Id: I6c320a8c7fa501771d93c191c4657452cc9f2e03
Reviewed-on: https://skia-review.googlesource.com/5844
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2016-12-12 20:58:16 +00:00
Hal Canary
1b3387b5cf SkBitmap::setPixelRef(): less reference churn
BUG=skia:

Change-Id: I9657e4af5fcc808f9175ff336155374ccc77999d
Reviewed-on: https://skia-review.googlesource.com/5461
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-12-12 20:18:50 +00:00
Mike Klein
ee43f6f25e Just make Android.bp bpfmt compliant to begin with.
Change-Id: I0fe833b4af4b68f97fe3feefc76503cb6473eb7b
Reviewed-on: https://skia-review.googlesource.com/5847
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-12 19:32:27 +00:00
Mike Klein
f44703a87f Remove dependency on NDK cpufeatures.
Instead of relying on cpu-features.c, just do what it does.

Good reading: http://man7.org/linux/man-pages/man3/getauxval.3.html

While it's nice to use the headers when possible, should either of these headers not be available, we can fall back to doing it all manually:

  extern "C" uint32_t getauxval(uint32_t)
  static const int AT_HWCAP = 16;
  static const int HWCAP_CRC32 = (1<<7);


To keep things simple I've slimmed cpu feature detection down to just the features we actually make use of.  This removes all runtime feature detection for ARMv7... we expect NEON to be globally available, and so far we haven't used the other FMA/FP16 bits on ARMv7.  ARMv8 feature dection remains the same, CRC32 before, CRC32 after.  x86 (cpuid-based detection) and MIPS (nothing) are untouched.


We need to keep //third_party/cpu-features for //third_party/libwebp.

Change-Id: I6c96df9a09ae68c8c0e54c1152aa177ba9bafc83
Reviewed-on: https://skia-review.googlesource.com/5800
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-12 16:16:44 +00:00
Mike Reed
ebfce6d9b4 change SkClipOp to a class enum
BUG=skia:

Change-Id: I25dbe6d6b8666a2a0a7be7bdd2ae0b067868d14e
Reviewed-on: https://skia-review.googlesource.com/5718
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-12-12 15:38:31 +00:00
Mike Klein
c30833327f proposed gn_to_bp fixes
in response to 5784

Change-Id: I3ad34a30743e7ffbd04767668c288a4f884eb19c
Reviewed-on: https://skia-review.googlesource.com/5732
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-12 15:18:22 +00:00
Herb Derby
252b72410b Revert "SkImageEncoder::* going away"
Breaks 5 compiles on google3.

This reverts commit 3489b2b727.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> SkImageEncoder::* going away
> 
> Approval from https://review.skia.org/5006
> TBR=reed@google.com
> 
> Change-Id: Ib5fb1b624594598e2316f9247069ecd207d7a974
> Reviewed-on: https://skia-review.googlesource.com/5751
> Reviewed-by: Hal Canary <halcanary@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>
> 

TBR=halcanary@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I0c0b863056c90435374769e85fb08c1b2f5113a2
Reviewed-on: https://skia-review.googlesource.com/5760
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2016-12-09 17:07:18 +00:00
Hal Canary
3489b2b727 SkImageEncoder::* going away
Approval from https://review.skia.org/5006
TBR=reed@google.com

Change-Id: Ib5fb1b624594598e2316f9247069ecd207d7a974
Reviewed-on: https://skia-review.googlesource.com/5751
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-12-09 16:13:42 +00:00
Mike Klein
67702f6322 update Win/Android toolchain setup after rolling GN
The new GN doesn't like "ar = ar + ...", etc.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Win-Clang-arm64-Release-Android

Change-Id: Ib131ee367c4af144f8ffb8562fc26b67675e4f45
Reviewed-on: https://skia-review.googlesource.com/5726
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-09 16:01:58 +00:00
Herb Derby
76073c1104 Add the ability to use different mallocs.
gn gen --args='malloc="tcmalloc"'
gn gen --args='malloc="jemalloc"'

or if the library is in a non-standard directory
gn gen --args='malloc="tcmalloc" extra_ldflags="-L<path-to-library>"'

Change-Id: Icacd837d11392a1971f298ccddd69a5a6781f6cf
Reviewed-on: https://skia-review.googlesource.com/5629
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-09 01:21:28 +00:00
Mike Klein
978ccebd8a On mips64el, use -B instead of linking .o manually.
These .o are only appropriate for linking executables; others would be used if we link an .so.

-B turns out to be the flag we really wanted here anyway, adding that directory to the search path for all these .o files, letting Clang pick the right one.  The existing comment is now correct for both the lib_dirs and ldflags +=.

Change-Id: I66d9aada12477756142726828cf66c142ca76a48
Reviewed-on: https://skia-review.googlesource.com/5657
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-08 16:13:12 +00:00
Brian Salomon
742e31de15 Rename GrBatchFlushState to GrOpFlushState
Change-Id: I1a8052c61d7624929caf45ba44e2a465cd0dc1c2
Reviewed-on: https://skia-review.googlesource.com/5649
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-07 23:36:31 +00:00
Mike Reed
867812e2ef remove SK_SUPPORT_LEGACY_CANVAS_IS_REFCNT from android
BUG=skia:

Change-Id: I78db77832431d1847cef7de1f74613bfe6b87c7d
NOTRY=True
Reviewed-on: https://skia-review.googlesource.com/5691
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-07 22:02:27 +00:00
Mike Reed
b92520df1d remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS for android
... to land *after* we land the change in master to use SkClipOps

BUG=skia:

Change-Id: I58d73866324aae9b9693afcd2a81aef503241a46
NOTRY=True
TBR=djsollen
Reviewed-on: https://skia-review.googlesource.com/5678
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-07 20:59:18 +00:00
Mike Reed
fd87be8ffa hide emboss from everyone (except android for now)
BUG=skia:

Change-Id: Ibd453b0a63948e3e4950f02459d7bc01a6ed26c5
Reviewed-on: https://skia-review.googlesource.com/5671
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2016-12-07 19:13:32 +00:00
Mike Klein
27eb22b994 gn_to_bp.py fixes
- no u"" strings
  - more pervasive sorting
  - include sources from optional Skia components (e.g. gpu, codec, pdf)
  - cosmetic nits

Change-Id: Ief0f293117dbfbc97584db185c067a8297067b74
Reviewed-on: https://skia-review.googlesource.com/5643
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-07 18:01:54 +00:00
Hal Canary
b88ca7eca4 Revert "SkImageEncoder::* going away"
This reverts commit d7e16661bb.
Reason for revert: breaking g3
NOTRY=true
Change-Id: I56d53adca64a94b4f66dd0539634804a96e92ddf
Reviewed-on: https://skia-review.googlesource.com/5672
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2016-12-07 16:50:32 +00:00
Hal Canary
d7e16661bb SkImageEncoder::* going away
Approval from https://review.skia.org/5006
TBR=reed@google.com

Change-Id: I43d1a24fa3e924b3c24b224f2451ab990b440dc8
Reviewed-on: https://skia-review.googlesource.com/5413
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-12-07 16:02:33 +00:00
Mike Klein
308b5ac681 Add gn_to_bp.py.
The general idea here is, run GN in --ide=json mode to get most information.

Then, read a couple .gni files to get the rest (platform specific source lists, Android framework defines).

For now, I'm generating Android.bp and SkUserConfig.h.  I figure we can do DM and nanobench once these work?

Change-Id: I8e7f60d6572f2d4769760cf872895518a15d841b
Reviewed-on: https://skia-review.googlesource.com/5554
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-06 23:10:34 +00:00
Mike Klein
c5875fb58d -pie applies only to executables
Change-Id: I36dff113145befbfb4f69810a474394d5d0ca4ed
Reviewed-on: https://skia-review.googlesource.com/5553
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-12-06 16:38:31 +00:00
Florin Malita
4b7b6f0229 Retire SkNoSaveLayerCanvas
No clients, superseded by SkNoDrawCanvas.

R=reed@google.com

Change-Id: I93352c6cfb24ec133ed8433c3b31a5fa5ab1ace8
Reviewed-on: https://skia-review.googlesource.com/5460
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2016-12-02 14:16:33 +00:00
Brian Salomon
dad2923b8e Rename GrVertexBatch->GrMeshDrawOp
Change-Id: I3ebe5a471477ce1b71c150b0bde4982d113fd8a7
Reviewed-on: https://skia-review.googlesource.com/5468
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-12-01 22:46:23 +00:00
raftias
5476128f0a Added CMYK support for ICC profiles.
Changed ICC parsing/SkGammas/SkColorLookUpTable to handle non-3-channel
inputs. Parsed CMYK A2B ICC profiles. Integrated this with SkJpegCodec
(the only file that supports CMYK) and SkColorSpaceXform_A2B to allow
parsing and color xforming of ICC CMYK images.

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

Change-Id: I11e3d17180244281be3eb43fd608609925a7f71e
Reviewed-on: https://skia-review.googlesource.com/5444
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-12-01 19:42:32 +00:00
Robert Phillips
6e1fca43b4 Add animating blur image filter GM/slide/bench
Probably still worth having but I haven't been able to reproduce the perf regression in 
crbug.com/668179 with it yet.

Change-Id: If3b0f2998ff38a17a173895ed9cea6950a81f6b7
Reviewed-on: https://skia-review.googlesource.com/5382
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-12-01 18:35:06 +00:00
Florin Malita
ee424acbb8 SkNoDrawCanvas - a public non-drawing canvas base class
TODO:

  - convert SkDeferredCanvas, SkLiteRecorder, etc. to the new base
  - remove unused SkNoSaveLayerCanvas

BUG=chromium:668925
R=reed@google.com,mtklein@google.com

Change-Id: Ie9af577477a6b9eaa5ef55523287ad1635dca116
Reviewed-on: https://skia-review.googlesource.com/5349
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2016-12-01 18:34:29 +00:00
Brian Salomon
9afd371a8a Rename GrDrawBatch->GrDrawOp
Change-Id: I18f520924b8a2548566fd61dbea4e3e12bd253dd
Reviewed-on: https://skia-review.googlesource.com/5411
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-01 16:45:27 +00:00
Mike Klein
62458a6778 Revert "Added CMYK support for ICC profiles."
This reverts commit 51c3fcd376.

Reason for revert: ASAN, MSAN both take issue with parse_and_load_gamma() 

Original change's description:
> Added CMYK support for ICC profiles.
> 
> Changed ICC parsing/SkGammas/SkColorLookUpTable to handle non-3-channel
> inputs. Parsed CMYK A2B ICC profiles. Integrated this with SkJpegCodec
> (the only file that supports CMYK) and SkColorSpaceXform_A2B to allow
> parsing and color xforming of ICC CMYK images.
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5197
> CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
> 
> 
> Change-Id: Id6619f63f04071f79cd2d84321857dfa269ad3aa
> Reviewed-on: https://skia-review.googlesource.com/5197
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Matt Sarett <msarett@google.com>
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

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

Change-Id: Ib43fef00bc233c0b4fa47ed29040d69601def267
Reviewed-on: https://skia-review.googlesource.com/5423
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-12-01 16:38:30 +00:00
raftias
51c3fcd376 Added CMYK support for ICC profiles.
Changed ICC parsing/SkGammas/SkColorLookUpTable to handle non-3-channel
inputs. Parsed CMYK A2B ICC profiles. Integrated this with SkJpegCodec
(the only file that supports CMYK) and SkColorSpaceXform_A2B to allow
parsing and color xforming of ICC CMYK images.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5197
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD


Change-Id: Id6619f63f04071f79cd2d84321857dfa269ad3aa
Reviewed-on: https://skia-review.googlesource.com/5197
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-12-01 16:22:49 +00:00
Brian Salomon
25a880960a Rename GrBatch to GrOp
Change-Id: I27b6324f8040899fafeda23ca524bc54a4dbf090
Reviewed-on: https://skia-review.googlesource.com/5392
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2016-12-01 15:12:53 +00:00
Brian Salomon
94efbf51f5 Merge GrGLSLCaps into GrShaderCaps
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5121

Change-Id: If8d13638f80f42161cbc766a2666c5789e5772c8
Reviewed-on: https://skia-review.googlesource.com/5121
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-29 19:32:31 +00:00
Joe Gregorio
c18baa11a0 Revert "Use /MD for Windows builds."
This reverts commit cab79aadad.

Reason for revert: Bots crashing.

Original change's description:
> Use /MD for Windows builds.
> 
> I think the default is /MT, static linking.
> This should make our builds smaller, and compatible with clients using /MD.
> 
> Change-Id: Id8a39a029925eda2627532bbd0223c693300f5da
> Reviewed-on: https://skia-review.googlesource.com/5277
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

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

Change-Id: Iff644250a23175e44a4282e7aaea0e2a2adc1ce0
Reviewed-on: https://skia-review.googlesource.com/5310
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
2016-11-29 18:20:56 +00:00
Mike Klein
cab79aadad Use /MD for Windows builds.
I think the default is /MT, static linking.
This should make our builds smaller, and compatible with clients using /MD.

Change-Id: Id8a39a029925eda2627532bbd0223c693300f5da
Reviewed-on: https://skia-review.googlesource.com/5277
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-29 17:54:20 +00:00
Brian Salomon
f9f451213a Reland image storage with fixes.
Revert "Revert "Initial OpenGL Image support.""

This reverts commit 59dc41175d.

BUG=skia:

Change-Id: Ibe3c87ce7f746f065fdbcc5a518388cc291112f5
Reviewed-on: https://skia-review.googlesource.com/5131
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-29 17:42:53 +00:00
Brian Osman
e8e54580c3 GrTextureProducer cleanup, phase two: Producer, Adjuster, Maker
Previously: GrTextureProducer, GrTextureAdjuster, and GrTextureMaker
were all in GrTextureParamsAdjuster.h. Now they're each in their own
header.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5202

Change-Id: I17fa9057b11511aa4d3e15569ea1c378cfec4c80
Reviewed-on: https://skia-review.googlesource.com/5202
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2016-11-28 15:44:40 +00:00
Brian Osman
3b66ab6f9f GrTextureProducer cleanup, phase one: Bitmap and Image makers
Split these into their own files, and actually name the files after the
classes they contain. The top three classes in the hierarchy still need
attention, but those are going to be trickier.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5195

Change-Id: I295f4d50e35748eac38a31f302e14b5b62653c55
Reviewed-on: https://skia-review.googlesource.com/5195
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-28 14:58:41 +00:00
Hal Canary
db6830162e SkImageEncoder: simplify API
(re-land 248ff02 & 2cb6cb7, with changes)

  - Hide SkImageEncoder class in private header.
  - SkImageEncoder::Type becomes SkEncodedImageFormat
  - SkEncodedFormat becomes SkEncodedImageFormat
  - SkImageEncoder static functions replaced with
    single function EncodeImage()
  - utility wrappers for EncodeImage() are in
    sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-on: https://skia-review.googlesource.com/5186
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-23 16:40:32 +00:00
Brian Osman
45580d3e30 Added GrSurfaceContext and GrTextureContext
This lets copy-to-texture to be treated like copy-to-rt.
To match current behavior, though, copies to texture are
still executed immediately (forcing a flush).

Once MDB is enabled, copies to texture will be deferred.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5093

Change-Id: Icc0ce5435507a5f0a237c22eedef879824952367
Reviewed-on: https://skia-review.googlesource.com/5093
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-23 15:52:27 +00:00
Brian Salomon
59dc41175d Revert "Initial OpenGL Image support."
This reverts commit be34882042.

Reason for revert: Test failures and shader compilation issues on Android.

Original change's description:
> Initial OpenGL Image support.
> 
> This change along with recently landed changes is enough to make the new unit test work and not much else. imageLoad is support but not stores or any other image functions (atomics). Barriers in the shading language or the GL API are not yet hooked up.
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4182
> 
> Change-Id: I5958b7c89e40ae5ee05f7bbaca3b3738162fe5ce
> Reviewed-on: https://skia-review.googlesource.com/4182
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I29a2502c296ae39ed9a999957800414ae46e6f0f
Reviewed-on: https://skia-review.googlesource.com/5129
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-23 01:02:57 +00:00
Brian Salomon
be34882042 Initial OpenGL Image support.
This change along with recently landed changes is enough to make the new unit test work and not much else. imageLoad is support but not stores or any other image functions (atomics). Barriers in the shading language or the GL API are not yet hooked up.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4182

Change-Id: I5958b7c89e40ae5ee05f7bbaca3b3738162fe5ce
Reviewed-on: https://skia-review.googlesource.com/4182
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-22 21:35:11 +00:00
Matt Sarett
030cbd5f3c Add SkOverdrawColorFilter
Uses the value in the src alpha channel to choose how
to set the dst pixel.

This is a part of a multi-part change to detect and
display gpu overdraw on Android.

CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Debug-NoGPU-Trybot

BUG:32370375

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5113

Change-Id: I07040929d8a46bbadd499dccec75eebef0e11d11
Reviewed-on: https://skia-review.googlesource.com/5113
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-22 21:27:42 +00:00
Hal Canary
a2b4bdce8c Revert 248ff023 & 2cb6cb72
Revert "SkImageEncoder: simplify API"
This reverts commit 248ff02331.
Revert "Fix bug: can't convert nullptr -> bool"
This reverts commit 2cb6cb7218.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151
NOTRY=true

Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec
Reviewed-on: https://skia-review.googlesource.com/5151
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2016-11-22 21:23:51 +00:00
Matt Sarett
22886c4935 Add SkOverdrawCanvas to detect overdraw
This is the first part of a multi-part change to detect and
display gpu overdraw on Android.

BUG:32370375

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4907

Change-Id: Ibba9d7343f2fd57397fa1168a5a5b1ef6ef91287
Reviewed-on: https://skia-review.googlesource.com/4907
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-11-22 18:27:47 +00:00
Hal Canary
248ff02331 SkImageEncoder: simplify API
- Hide SkImageEncoder class in private header.
  - SkImageEncoder::Type becomes SkEncodedImageFormat
  - SkEncodedFormat becomes SkEncodedImageFormat
  - SkImageEncoder static functions replaced with
    single function EncodeImage()
  - utility wrappers for EncodeImage() are in
    sk_tool_utils.h

TODO: remove link-time registration mechanism.
TODO: clean up clients use of API and flip the flag.
TODO: implement EncodeImage() in chromeium/skia/ext

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4909

Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70
Reviewed-on: https://skia-review.googlesource.com/4909
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2016-11-22 18:25:55 +00:00
ethannicholas
8ac838d978 added support for push_constant layout
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187433003

Committed: https://skia.googlesource.com/skia/+/fa5f65ac61fd525029aa9dab161ffe4896c10f6d
Review-Url: https://codereview.chromium.org/2187433003
2016-11-22 08:39:36 -08:00
Jim Van Verth
c590341458 Add shadowrrect geometry processor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4233

Change-Id: I637099709cfe30f7d3c1883e23840a47a7a25c10
Reviewed-on: https://skia-review.googlesource.com/4233
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-21 21:44:20 +00:00
Brian Salomon
99938a8ef2 Merge GrGLSLShaderVar and GrShaderVar
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5087

Change-Id: Ib8943a1da1ea495554feaf5b0992b94fbb9539ab
Reviewed-on: https://skia-review.googlesource.com/5087
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2016-11-21 19:13:43 +00:00
Brian Salomon
101b844d6b Remove GrGLSLSampler type and subclasses
GrGLSLUniformManager and GrGLSLProgramDataManager subclasses handle sampler variation across GPU backends.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5002

Change-Id: I968b006bab978c2fa209d1f7eda710c298d1212f
Reviewed-on: https://skia-review.googlesource.com/5002
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-21 18:01:43 +00:00
Mike Reed
62a8aa398e android does not need XFERMODE_PUBLIC flag
BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5071

Change-Id: Ib889e8e41bb0fac6a6dfbbec22fe3930d178e3ba
Reviewed-on: https://skia-review.googlesource.com/5071
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-18 23:10:54 +00:00
Mike Klein
17b6e487b7 Revert "Turn off /arch:AVX[2] on Windows builds."
This reverts commit c89e2438ae.

Reason for revert: 

I'm going to stub this code out in Chrome instead for now.  Chrome's not going to land something that looks like this, so I'd rather undo it than leave Skia in this odd state.

Original change's description:
> Turn off /arch:AVX[2] on Windows builds.
> 
> This canaries a similar change Chrome may need.
> 
> BUG=chromium:666707
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5005
> 
> Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175
> Reviewed-on: https://skia-review.googlesource.com/5005
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>
> 

TBR=mtklein@chromium.org,brucedawson@chromium.org,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I9562f7877749c61f6ba4d48d6c4b557f09876128
Reviewed-on: https://skia-review.googlesource.com/5069
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2016-11-18 22:11:49 +00:00
Mike Klein
c89e2438ae Turn off /arch:AVX[2] on Windows builds.
This canaries a similar change Chrome may need.

BUG=chromium:666707

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5005

Change-Id: Ibf7f9941968d905d865b9be1e63ebbf768870175
Reviewed-on: https://skia-review.googlesource.com/5005
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-18 17:59:30 +00:00
Brian Salomon
b014cca49d Make GrBufferAccess a nested class of GrProcessor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4978

Change-Id: I08c24e9183108f4dd6068216488fd3ac9b5f3ec2
Reviewed-on: https://skia-review.googlesource.com/4978
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-18 17:17:46 +00:00
Yuqian Li
ce1d293880 Add test for QuickFDot6Div
This test will catch our (1 << 10) bug (which should be 1 << 9)

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4986

Change-Id: I25b607d1535a647284cee3b304a6f567f389e7f6
Reviewed-on: https://skia-review.googlesource.com/4986
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2016-11-18 17:16:49 +00:00
xiangze.zhang
d2265e537c Port convolve functions to SkOpts
This patch moves the C++/SSE2/NEON implementations of convolve functions
into the same place and uses SkOpts framework.
Also some indentation fix.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2500113004
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/2500113004
2016-11-17 18:39:38 -08:00
Adam Barth
f8afab9677 Mark this file as executable
The executable bit is needed in the Fuchsia build in order to execute this file
during the build.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4985

Change-Id: I4c11d823d052b7c8cef79b2842169581db76e815
Reviewed-on: https://skia-review.googlesource.com/4985
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-17 22:29:59 +00:00
Brian Salomon
514baff8be Rename GrTextureParams to GrSamplerParams
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4965

Change-Id: I7d52e81c670e92ca96117284f44b274ce3cc3671
Reviewed-on: https://skia-review.googlesource.com/4965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-17 21:13:18 +00:00
Brian Salomon
0bbecb21ab Rename GrTextureAccess to GrProcessor::TextureSampler.
Renames vars and methods that used the work "access" to refer to this type.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4931

Change-Id: Ibcf488fbd445c5119fc13d190544cd98981bdbee
Reviewed-on: https://skia-review.googlesource.com/4931
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2016-11-17 17:18:53 +00:00
Florin Malita
ca79535dcb External SkImageGenerator API
Introduce an SkImageGenerator API to support the implementation of
externally-managed image decode and scale caches.

BUG=skia:5806
R=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4720

Change-Id: Ibfe37af5471f78f28f88f9d5e80938882be1a344
Reviewed-on: https://skia-review.googlesource.com/4720
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2016-11-16 20:24:48 +00:00
Mike Klein
50500ad470 GN: add public headers warnings check.
We already generate skia.h to include all public headers for Fiddle.
This just includes it with -Wunused-parameter turned on as an error.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4901

Change-Id: Ia55a901c09a3c9c9d6d35a43259431dba3532ed9
Reviewed-on: https://skia-review.googlesource.com/4901
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-16 19:27:29 +00:00