Commit Graph

125 Commits

Author SHA1 Message Date
ethannicholas
fa5f65ac61 added support for push_constant layout
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187433003

Review-Url: https://codereview.chromium.org/2187433003
2016-11-15 12:53:06 -08:00
Robert Phillips
f27bab207a Revert "Add IORef capability to GrSurfaceProxy objects"
This reverts commit 286b96f876.

Reason for revert: 

Failure on Mac Mini:

FAILURE: ../../../tests/ProxyRefTest.cpp:59	proxy->getPendingWriteCnt_TestOnly() == expectedNumWrites

../../../tests/ProxyRefTest.cpp:64: fatal error: "assert(proxy->getPendingWriteCnt_TestOnly() == expectedNumWrites)"


Original change's description:
> Add IORef capability to GrSurfaceProxy objects
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4734
> 
> Change-Id: If10fbe555e9fa3331bfa01065028e1afe82adb78
> Reviewed-on: https://skia-review.googlesource.com/4734
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> 

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

Change-Id: I5e1c201e027d4e9687b01f28a418b1884d3f9ece
Reviewed-on: https://skia-review.googlesource.com/4776
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-14 19:29:39 +00:00
Robert Phillips
286b96f876 Add IORef capability to GrSurfaceProxy objects
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4734

Change-Id: If10fbe555e9fa3331bfa01065028e1afe82adb78
Reviewed-on: https://skia-review.googlesource.com/4734
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2016-11-14 19:04:47 +00:00
Ben Wagner
efa62e1d5b Remove SkOSFile.cpp.
This file has been renamed SkOSPath.cpp and users no longer refer to the
old name. Remove this now empty file and its build rule.

Change-Id: I5041b61e749cc86f491b6c99b6744d7a0d4f9d1c
Reviewed-on: https://skia-review.googlesource.com/4766
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-14 17:31:57 +00:00
Mike Klein
87c36f2302 GN: detect is_clang cheaply when possible.
Running is_clang.py is the current long-poll in `gn gen` time.
We can avoid it trivially in a few situations:
  - We always use Clang on Android, iOS, and Mac.
  - If cc and cxx are clang and clang++, it's Clang.

This cuts `gn gen` time from 80ms to 20ms on my laptop.

(Did you know gn has a --tracelog=trace.log option for creating Chrome-tracing-compatible traces?  Pretty neat.)

BUG=skia:

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

Change-Id: Ic81d221675e8309cc9942bb9e62243d86658b02d
Reviewed-on: https://skia-review.googlesource.com/4746
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-11-14 17:01:57 +00:00
Mike Reed
5df4934b3e Revert[2] "Change SkCanvas to *not* inherit from SkRefCnt"
Changes over original:
- conditionalize ownership in SkPictureRecorder
- conditionalize ownership in SkCanvasStateUtils

This reverts commit b613c266df.

BUG=skia:

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

Change-Id: Ib25514d6f546c69b6650b5c957403b04f7380dc2
Reviewed-on: https://skia-review.googlesource.com/4742
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-13 18:31:13 +00:00
raftias
2563601fc2 Initial implementation of a SkColorSpace_A2B xform
There is support for all features of SkColorSpace_A2B.

Tests for these functionality were adapted from
the XYZ xform, plus a CLUT-specific test was added.

Shared functions used by both SkColorSpaceXform_XYZ and SkColorSpaceXform_A2B
have been moved into a shared header.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2449243003
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/2449243003
2016-11-11 15:27:39 -08:00
Brian Salomon
bf7b620b1e Revert "Revert "Add integer texture support.""
This reverts commit 9c7edb8311.

Fixes ASAN errors

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

Change-Id: I1b1dae754d357b01da7169c8e7c59d7d8d8a10f6
Reviewed-on: https://skia-review.googlesource.com/4736
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2016-11-11 21:58:52 +00:00
Mike Klein
58b130681d SkFixedAlloc
Looking at SkSmallAlloc hasn't left me terribly impressed.  I think we can replace it with something a lot simpler to work with.

That simpler thing's core would be something like SkFixedAlloc, which allocates objects out of a fixed sized buffer, and cleans them up when done.

If needed, we can wrap that with logic to try to allocate out of an SkFixedAlloc, falling back on mallc() when exhausted.

BUG=skia:

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

Change-Id: I8d94156ddf98802e42ec0890cff0f06b21f073b0
Reviewed-on: https://skia-review.googlesource.com/4658
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2016-11-11 16:42:57 +00:00
Heather Miller
b613c266df Revert "Change SkCanvas to *not* inherit from SkRefCnt"
This reverts commit 8240750718.

Reason for revert: Breaking WebView (chromium:663959)

Original change's description:
> Change SkCanvas to *not* inherit from SkRefCnt
> 
> Definitely tricky for classes like SkNWayCanvas, where the caller (today)
> need not pay attention to ownership of the canvases it gave the NWay
> (after this CL, the caller *must* managed ownership)
> 
> BUG=skia:
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4441
> 
> DOCS_PREVIEW= https://skia.org/?cl=4441
> 
> Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081
> Reviewed-on: https://skia-review.googlesource.com/4441
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> 

TBR=djsollen@google.com,mtklein@google.com,halcanary@google.com,robertphillips@google.com,fmalita@chromium.org,fmalita@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I5e3b3e876b7d2c09833cf841801321033b6b968b
Reviewed-on: https://skia-review.googlesource.com/4687
Commit-Queue: Heather Miller <hcm@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
2016-11-10 21:25:44 +00:00
Leon Scroggins
9c7edb8311 Revert "Add integer texture support."
This reverts commit 434c534bd0.

Reason for revert: Undefined behavior. From

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-Clang-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/1272/steps/test_skia%20on%20Ubuntu/logs/stdio

../../../tests/IntTextureTest.cpp:51:44: runtime error: left shift of negative value -1
    #0 0x2257480 in test_IntTexture(skiatest::Reporter*, sk_gpu_test::ContextInfo const&) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x2257480)
    #1 0x1ca1066 in skiatest::RunWithGPUTestContexts(void (*)(skiatest::Reporter*, sk_gpu_test::ContextInfo const&), bool (*)(sk_gpu_test::GrContextFactory::ContextType), skiatest::Reporter*, sk_gpu_test::GrContextFactory*) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1ca1066)
    #2 0x1ca080d in run_test(skiatest::Test) (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1ca080d)
    #3 0x1c9e5e9 in dm_main() (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1c9e5e9)
    #4 0x7f2d2ba8df44 in __libc_start_main /build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:287
    #5 0x1bb3028 in _start (/b/swarm_slave/w/ir0aO1sa/out/Debug/dm+0x1bb3028)

SUMMARY: AddressSanitizer: undefined-behavior ../../../tests/IntTextureTest.cpp:51:44 in 
step returned non-zero exit code: 1


Original change's description:
> Add integer texture support.
> 
> This allows us to create integer textures and sample them from a GrProcessor's code.
> 
> Filtering is limited to NEAREST.
> 
> Adds tests for reading/writing pixels, copying, and drawing. These operations are not allowed to convert to fixed/float configs.
> 
> Vulkan support is TBD.
> 
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4348
> 
> Change-Id: If38d89a03285d4bd98d1f14f9638b0320977e43d
> Reviewed-on: https://skia-review.googlesource.com/4348
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> 

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

Change-Id: I39f1a0a0dd3e6cde1143c8cc1217d2e3d5977b21
Reviewed-on: https://skia-review.googlesource.com/4663
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-11-10 18:32:14 +00:00
Brian Salomon
434c534bd0 Add integer texture support.
This allows us to create integer textures and sample them from a GrProcessor's code.

Filtering is limited to NEAREST.

Adds tests for reading/writing pixels, copying, and drawing. These operations are not allowed to convert to fixed/float configs.

Vulkan support is TBD.


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

Change-Id: If38d89a03285d4bd98d1f14f9638b0320977e43d
Reviewed-on: https://skia-review.googlesource.com/4348
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2016-11-10 17:13:34 +00:00
Mike Reed
8240750718 Change SkCanvas to *not* inherit from SkRefCnt
Definitely tricky for classes like SkNWayCanvas, where the caller (today)
need not pay attention to ownership of the canvases it gave the NWay
(after this CL, the caller *must* managed ownership)

BUG=skia:

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

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

Change-Id: Ib1ac07a3cdf0686d78e7aaa4735d45cc90bea081
Reviewed-on: https://skia-review.googlesource.com/4441
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-09 19:40:06 +00:00
Ben Wagner
bf111d7bc9 Move SkOSPath out of include/core.
It is moved to src/utils. It is almost a tool, but has two uses in
src/ports.

The existing SkOSFile.cpp is left empty for the time being since it is
mentioned in Chromium's BUILD.gn for Skia.

Change-Id: I3bb7f7c4214359eb6ab906bfe76737d20bf1d6c7
Reviewed-on: https://skia-review.googlesource.com/4536
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-08 20:20:15 +00:00
Robert Phillips
eaa862569d Revert "Revert "Add GrRenderTargetContext instantiate & asTextureProxy""
This reverts commit 7d7d7d1946.

Reason for revert: Reverting this to see if it really was crashing on SVGs or if that was cross talk.

Original change's description:
> Revert "Add GrRenderTargetContext instantiate & asTextureProxy"
> 
> This reverts commit 9113edfff8.
> 
> Reason for revert: Looks to be causing EXCEPTION_ACCESS_VIOLATION:
> 
> https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-NUC-GPU-IntelIris6100-x86_64-Debug/builds/121/steps/test_skia%20on%20Windows/logs/stdio
> https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-GCE-CPU-AVX2-x86-Debug/builds/2384/steps/test_skia%20on%20Windows-2008ServerR2-SP1/logs/stdio
> https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug/builds/785/steps/test_skia%20on%20Windows/logs/stdio
> 
> Original change's description:
> > Add GrRenderTargetContext instantiate & asTextureProxy
> > 
> > This CL also centralizes the instantiation code in GrSurfaceProxy and adds a test.
> > 
> > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4494
> > 
> > Change-Id: I0081d9a216dc0af293179f23bcb88acf6a822324
> > Reviewed-on: https://skia-review.googlesource.com/4494
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Robert Phillips <robertphillips@google.com>
> > 
> 
> TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> 
> Change-Id: I225ce7867ebd445067e5ea55ebbfd587f7fe782a
> Reviewed-on: https://skia-review.googlesource.com/4528
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> 

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

Change-Id: Ifc3b9ac343009a3808f5f47500eef50df438e3d9
Reviewed-on: https://skia-review.googlesource.com/4537
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-11-08 13:49:49 +00:00
Leon Scroggins
7d7d7d1946 Revert "Add GrRenderTargetContext instantiate & asTextureProxy"
This reverts commit 9113edfff8.

Reason for revert: Looks to be causing EXCEPTION_ACCESS_VIOLATION:

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-NUC-GPU-IntelIris6100-x86_64-Debug/builds/121/steps/test_skia%20on%20Windows/logs/stdio
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-GCE-CPU-AVX2-x86-Debug/builds/2384/steps/test_skia%20on%20Windows-2008ServerR2-SP1/logs/stdio
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win-MSVC-ShuttleC-GPU-iHD530-x86_64-Debug/builds/785/steps/test_skia%20on%20Windows/logs/stdio

Original change's description:
> Add GrRenderTargetContext instantiate & asTextureProxy
> 
> This CL also centralizes the instantiation code in GrSurfaceProxy and adds a test.
> 
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4494
> 
> Change-Id: I0081d9a216dc0af293179f23bcb88acf6a822324
> Reviewed-on: https://skia-review.googlesource.com/4494
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> 

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

Change-Id: I225ce7867ebd445067e5ea55ebbfd587f7fe782a
Reviewed-on: https://skia-review.googlesource.com/4528
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2016-11-07 21:26:46 +00:00
Mike Klein
6749af4073 Add GN iOS builder.
This gets up a bot to build for iOS via GN as much as we can right now.  This is unlikely to be the long term structure of the iOS bots... by the time we add Test/Perf bots we'll likely need to have a gn_ios_flavor.py.  But for now, this keeps the GN iOS build such as it is working.

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

Change-Id: Ideb10ae3f4ab5530ad153237a343dd5c0e7dd02f
Reviewed-on: https://skia-review.googlesource.com/4457
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
2016-11-07 21:20:18 +00:00
Robert Phillips
9113edfff8 Add GrRenderTargetContext instantiate & asTextureProxy
This CL also centralizes the instantiation code in GrSurfaceProxy and adds a test.

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

Change-Id: I0081d9a216dc0af293179f23bcb88acf6a822324
Reviewed-on: https://skia-review.googlesource.com/4494
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-07 20:28:13 +00:00
Ben Wagner
260d9b3152 Move SkChunkAlloc.h to include/private.
This class does not appear to have any external users, and Skia probably
does not want anyone depending on it. It also clutters up include/core
with an 'uninteresting' utility class.

Change-Id: I7de9468500ecffd0b722f222932e4f8b6637925b
Reviewed-on: https://skia-review.googlesource.com/4522
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-07 20:16:56 +00:00
Mike Reed
1c2ed9963f remove xfermode legacy build flag for android
BUG=skia:
NOTRY=True

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

Change-Id: I499e55fd410647783105e24bc8d51ccb70f791bd
Reviewed-on: https://skia-review.googlesource.com/4487
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-07 16:22:59 +00:00
Robert Phillips
84a812061f Add GrTextureRenderTargetProxy and support switching between RT & Tex Proxies
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4427

Change-Id: Ie7662299953592f564bb27a4df4ea101f743403e
Reviewed-on: https://skia-review.googlesource.com/4427
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2016-11-07 15:56:19 +00:00
Mike Klein
44b36a2104 GN: quiet alink spam on Mac
When building on Mac you see lots of spam about object files with no symbols when linking libskia.a.  This filters them out.

We have to do this in a Python script anyway, so I've consolidated into the existing gn/ar.py.

BUG=skia:

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

Change-Id: I9b18051ba687ec1fcf464a87a8a5929d29c70f24
Reviewed-on: https://skia-review.googlesource.com/4447
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-07 14:19:32 +00:00
Mike Klein
4b6b503c06 GN: quiet link.exe warning spam.
BUG=skia:

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

Change-Id: Iabc76cf111a62783770725a6cbf3a4284f35502b
Reviewed-on: https://skia-review.googlesource.com/4448
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-07 14:19:01 +00:00
Mike Reed
faba3715b8 remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAM
BUG=skia:

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

Change-Id: I5121acd027d935ade169ff65941f29f654a47bd0
Reviewed-on: https://skia-review.googlesource.com/4384
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-03 19:54:08 +00:00
Mike Klein
7d3028818e GN: iOS basics
This doesn't create any apps or bundles or sign anything, but it all compiles and links.

Note the awkward transitional hack I used to make each tool's tool_main() serve as the real main() again when built with GN, while keeping the existing setup with GYP.  Fun...

BUG=skia:

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

Change-Id: I632753d5d8e5848380854f413bf5905d676bfcf4
Reviewed-on: https://skia-review.googlesource.com/4350
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 19:31:50 +00:00
Mike Klein
89eda8a5e3 Streamline skia.h construction.
This moves the work of finding headers from `gn gen` time into the action itself.  We can do this safely now because we're constructing a skia.h.d deps file, which Ninja uses to track if-these-are-dirty-then-this-is-dirty relationships.  Everything can now live in one handy find_headers.py.

Upshot is, `gn gen` runs ~50ms faster, and I think the code's clearer this way too.

BUG=skia:

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

Change-Id: I2f1e7adf68be8e961eb77596786a795134bbb9a6
Reviewed-on: https://skia-review.googlesource.com/4065
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-03 17:28:39 +00:00
Ben Wagner
d5def99232 Remove SK_SUPPORT_LEGACY_SHADER_ASALOCALMATRIXSHADER
This is no longer used and can be removed.

Change-Id: I6aab1cf243aa1f09bdcd26517a392bbcf11c9444
Reviewed-on: https://skia-review.googlesource.com/4360
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-11-02 21:20:43 +00:00
Mike Klein
df707567a0 For debug builds, -O0 by default, adding -O1 only on bots.
BUG=skia:

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

Change-Id: Idc1435d75e51ea0b54d369efa91993d369aa74c0
Reviewed-on: https://skia-review.googlesource.com/4344
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-11-02 16:12:12 +00:00
Mike Reed
5e25717ab6 hide setImageFilter(ptr)
BUG=skia:

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

Change-Id: Iad792cfdf54087ad4c424fd268559c162a9a5f5c
Reviewed-on: https://skia-review.googlesource.com/4184
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-11-01 16:05:41 +00:00
Jim Van Verth
3c1b7db243 Add SkShadowMaskFilter
BUG=skia:

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

Change-Id: Idde7f7d6a61583a8be26df7a7c4b293c4710bccf
Reviewed-on: https://skia-review.googlesource.com/3824
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2016-10-31 20:29:30 +00:00
Mike Reed
6ff1f33eba remove legacy xfermode build flag
BUG=skia:

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

Change-Id: Id60623220daf5a600d8143dedc46714c8dd9896d
Reviewed-on: https://skia-review.googlesource.com/4201
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-31 17:14:55 +00:00
Matt Sarett
a9fd106d0c Draw Alpha8 + color filter correctly in software
This makes the behavior match our gpu backend.

BUG=android:31019366

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

Change-Id: I941623d0bdf54f61aafb1383de46bbedceb7578d
Reviewed-on: https://skia-review.googlesource.com/3979
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Matt Sarett <msarett@google.com>
2016-10-31 14:42:52 +00:00
Mike Klein
d280d425bd SkFixed15
BUG=skia:

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

Change-Id: I811b22004e8e2d5b7135f574caea296ffdff7011
Reviewed-on: https://skia-review.googlesource.com/3981
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-31 13:41:39 +00:00
Mike Reed
7d954ad797 remove xfermode from public api
BUG=skia:

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

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac
Reviewed-on: https://skia-review.googlesource.com/4020
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2016-10-28 20:06:17 +00:00
Ben Wagner
187a771f59 Add support for lib_dirs to gn_to_cmake.py.
The vulcan code uses lib_dirs to point to the libs in the SDK.

Change-Id: I4a1a4235b8534f3f937640b10f9758b0c70434c9
Reviewed-on: https://skia-review.googlesource.com/4003
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2016-10-28 15:07:10 +00:00
Brian Osman
1105224f97 Rename GrDrawContext to GrRenderTargetContext
This is in preparation for GrTextureContext and GrSurfaceContext

BUG=skia:

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

Change-Id: Ie58c93052e68f3f1f5fe8d15d63760de274a6fbd
Reviewed-on: https://skia-review.googlesource.com/4030
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2016-10-27 19:14:09 +00:00
Mike Klein
6e74412a9c Create .gni files for samples, tests, gms, and benches.
Calling Python to find all these files is convenient, but error-prone.  It's easy to forget to call GN again when adding a file.  Each of these calls to Python also adds ~50ms to the run time of gn gen, which is small but adds up.

On my desktop, gn gen drops from 600ms to 150ms, noticeably faster.

This leaves one call to find.py for generating skia.h for fiddle.  We're not quite sure how to automate that process to happen entirely inside the :skia.h action while maintaining correct dependencies, so I'm leaving it for now.

BUG=skia:

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

Change-Id: Ib9d355b97900f29afebc65311ceef50537e46dda
Reviewed-on: https://skia-review.googlesource.com/4036
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-27 18:14:06 +00:00
Mike Klein
eb94e56882 opts.gypi -> opts.gni
BUG=skia:

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

Change-Id: Ib687bd7ce87ddbbc60f95e7a30e20575971e5c59
Reviewed-on: https://skia-review.googlesource.com/4026
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 23:23:09 +00:00
Mike Klein
9034b13764 gpu.gypi -> gpu.gni
BUG=skia:

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

Change-Id: I55a6d58458500ccfb009382eab4c90a6e4217b2c
Reviewed-on: https://skia-review.googlesource.com/4025
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-26 22:14:31 +00:00
Mike Klein
cfc4f44aeb gypi -> gni: core, effects, android framework defines
BUG=skia:

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

Change-Id: I29a26c1716a319156a34a64999756ed7dba1e603
Reviewed-on: https://skia-review.googlesource.com/4023
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 21:44:49 +00:00
Mike Klein
a5fb6157e5 Split SkSL and utils apart again into .gni files.
Also extend GN format presubmit check to .gni files.

BUG=skia:

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

Change-Id: I292f3136437101e3e2c3271e260536ab7a24b192
Reviewed-on: https://skia-review.googlesource.com/3976
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 18:56:37 +00:00
Mike Klein
552cd1335f Start inverting GN reading .gypis to GYP reading .gnis.
This canaries the idea by converting gyp/pdf.gypi to gn/pdf.gni.
If this lands and rolls quietly, I'll flesh out the rest.

BUG=skia:

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

Change-Id: Iecaf1ccce7891679904c585946272bfb25eea299
Reviewed-on: https://skia-review.googlesource.com/3972
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 17:47:00 +00:00
Mike Klein
6e55fef07f GN: spin off :no_exceptions as its own config.
BUG=skia:

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

Change-Id: Ibaa10b9b6f566958b7e6622eedbc30a7010260b3
Reviewed-on: https://skia-review.googlesource.com/4001
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 17:08:53 +00:00
Mike Klein
6ad9909fb7 Turn on -Wrange-loop-analysis.
-Wrange-loop-analysis triggers when we use a new-style for loop in a way that appears to unintentionally call a copy constructor on each non-trivial loop element instead of operating on them by reference.


BUG=skia:

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

Change-Id: If9e1b7fcc1f2789ae03c41c17abb17e60d564a8b
Reviewed-on: https://skia-review.googlesource.com/4000
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 15:57:09 +00:00
Mike Klein
82364bae16 Build for Android from Windows, work in progress.
Pretty vanilla stuff here, mostly just making the gcc-like toolchain Windows friendly.

I was having trouble getting rm -r {{output}} && $ar rcs {{output}} @$rspfile to work without deleting my ar.exe, so I chickened out the usual way by adding gn/ar.py.

I've also updated bin/droid to work with Git Bash on Windows.

BUG=skia:

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

Change-Id: I04c34ccc91e6a291c11ac4e7a7a0ffe41d879fe6
Reviewed-on: https://skia-review.googlesource.com/3751
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-26 14:37:43 +00:00
Mike Klein
8ffb26051f Turn off buffer security checking in Release builds.
I'm seeing /GS's _security_check_cookie() show up as a signficant piece of time when profiling.  That's mostly just annoying noise.  We generally use our Release builds for performance testing and Debug for correctness, so it seems like a fair thing to disable in Release builds... it's a sort of ASAN thing, which we only do in Debug on other platforms.

BUG=skia:

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

Change-Id: I9b3cf4c5cf943fc2549f5bf91a1f6f7e41733e2c
Reviewed-on: https://skia-review.googlesource.com/3782
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-20 20:16:12 +00:00
Mike Klein
90a381f5b2 Turn on /OPT:REF and /OPT:ICF too.
These two together shave another 5MB off dm.exe, from 16MB -> 11MB.

BUG=skia:

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

Change-Id: Id216867e0ad5bc115fbd4006095860dff9204947
Reviewed-on: https://skia-review.googlesource.com/3738
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-20 18:03:50 +00:00
Mike Klein
916ca1d8a0 Compile for Windows with /Zc:inline.
By default, MSVC generates standalone versions of all functions, including static inline functions that are only inlined.  Those standalone versions are dead code.  This /Zc:inline flag makes MSVC behave like all the other compilers, omitting those standalone functions.  Chrome builds with this flag.

This CL cuts dm.exe and nanobench.exe each down by about 3MB, 19->16MB for DM and 15MB->12MB for nanobench.  This shouldn't affect runtime speed, and didn't signficantly change clean build time on my Z840 (~90s either way).

BUG=skia:

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

Change-Id: Ibd2a80337fcefc3f4eaf4335ea4e95a80bb4fddb
Reviewed-on: https://skia-review.googlesource.com/3735
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Ben Wagner <bungeman@google.com>
2016-10-20 17:50:44 +00:00
Mike Klein
0bcfeac251 Compile Release builds with -momit-leaf-frame-pointer.
Unlike -fomit-frame-pointer, this doesn't make debugging or profiling any more difficult, as it only applies to leaves.  It will make our code (negligibly) smaller and (negligibly) faster.

Mostly I just find it easier to read the disassembly without all the rbp gymnastics getting in the way.


BUG=skia:

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

Change-Id: I4b96aee7619791d5980de7f46e82836ca08a6456
Reviewed-on: https://skia-review.googlesource.com/3700
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-20 17:01:14 +00:00
Mike Klein
43c2526665 Viewer on Mac.
- Support ObjC / ObjC++
  - Build SDL on Mac.
  - Build viewer on Mac.

Patched from Jim's CL.

BUG=skia:

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

Change-Id: I12663f2ed2969e22f51aefed560fbc22b2524167
Reviewed-on: https://skia-review.googlesource.com/3760
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2016-10-20 14:57:49 +00:00