Commit Graph

18596 Commits

Author SHA1 Message Date
primiano
9a5bd7e860 Introduce interface for memory dumps
BUG=chromium:503168

Review URL: https://codereview.chromium.org/1300103004
2015-08-20 08:00:32 -07:00
bungeman
99fe822606 Use static_assert instead of SK_COMPILE_ASSERT.
Now that static_assert is allowed, there is no need to use a non-
standard compile time assertion

Review URL: https://codereview.chromium.org/1306443004
2015-08-20 07:57:52 -07:00
senorblanco
915881fe74 Implement canComputeFastBounds() for image filters.
Image filters have never implemented this check, which means that
filters which affect transparent black falsely claim they can compute
their bounds.

Implemented an affectsTransparentBlack() virtual for image
filters, and a similar helper function for color filters.

This will affect the following GMs: imagefiltersscaled
(lighting, perlin noise now filter to clip),
colorfilterimagefilter (new test case), imagefiltersclipped
(perlin noise now filters to clip).

Note: I de-inlined SkPaint::canComputeFastBounds() to avoid adding
a dependency from SkPaint.h to SkImageFilter.h.h. Skia benches show
no impact from this change, but will watch the perf bots carefully.

BUG=4212

Review URL: https://codereview.chromium.org/1296943002
2015-08-20 07:42:11 -07:00
wangyix
a7f4c435bc For a frag proc, its key will be a concatenation of all its descendant procs' keys in postorder traversal.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1297503007
2015-08-20 07:25:02 -07:00
joshualitt
87e4752fc1 Revert "fill rect batch refactor into separate batches"
This reverts commit ae41b38343.

TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1301203002
2015-08-20 07:22:42 -07:00
robertphillips
2f0dbc761a Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Committed: https://skia.googlesource.com/skia/+/45b59ed6e4e231814dbdb9f707b3d2a7ee50de84

Review URL: https://codereview.chromium.org/1291783003
2015-08-20 05:15:07 -07:00
mtklein
d1c6b7c500 SkColorCubeFilter: require alpha == 0xFF.
This is about a 12% improvement on my desktop, from 134 to 118ms on our bench.

BUG=skia:

Review URL: https://codereview.chromium.org/1295873004
2015-08-19 18:56:50 -07:00
mtklein
3679c1bbe7 Bug fix: we're using SkPMFloat methods on SkColor.
Annoyingly our test bot that forces SkPMFloat_none is a Linux bot using
BGRA SkPMColors, so we'd never notice the bug there.

BUG=skia:

Review URL: https://codereview.chromium.org/1296383006
2015-08-19 17:06:36 -07:00
mtklein
3a30cc1cbb Thou shalt use override consistently.
TBR=herb@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1285973006
2015-08-19 14:01:42 -07:00
herb
ab42ec79d5 Add asserts for shared mutex.
BUG=skia:

Review URL: https://codereview.chromium.org/1285973003
2015-08-19 13:40:12 -07:00
bsalomon
add79ef7cb Put drawPath in GrBatch.
TODO: Implement path range version of this (and preserve combining consecutive ranges).

Review URL: https://codereview.chromium.org/1301823002
2015-08-19 13:26:49 -07:00
robertphillips
f7d602a458 Revert "Update SkLightingShader to support rotation"
This reverts commit 45b59ed6e4.

TBR=herb@google.com

Review URL: https://codereview.chromium.org/1304673002
2015-08-19 13:11:23 -07:00
halcanary
a060eba083 SkPDF: Simplify PDFStream / emitObject() const
Compress SkPDFStream's data on setData(), not emitObject(); no longer stateful.

SkPDFObject::emitObject is now const.  This makes it easier to reason about state.

Minimal performance gains.

Review URL: https://codereview.chromium.org/1304493002
2015-08-19 12:26:46 -07:00
reed
216b643fc7 private iterator to visit all resource cache entries
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1271033002
2015-08-19 12:25:41 -07:00
ethannicholas
fea7763140 Fix transformed stroke width in GrAALinearizingConvexPathRenderer.
BUG=520476

Review URL: https://codereview.chromium.org/1302503003
2015-08-19 12:09:12 -07:00
borenet
e5e6c6069f Add VisualBenchTestActivity for instrumentation-testing VisualBench
BUG=skia:4093

Review URL: https://codereview.chromium.org/1295823004
2015-08-19 12:06:47 -07:00
bungeman
f3c15b7cfc Move SkTemplates.h to private.
SkTemplates.h contains a number of Skia specific utilities which are
not designed for external use. In addition to reducing the external
support burden, this will allow Skia to freely refactor this file.

Review URL: https://codereview.chromium.org/1272293004
2015-08-19 11:56:48 -07:00
joshualitt
9be0b002ca stop dropping AA when rect stays rect
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1bef9f59c566cc54c2259cc4d0171c115157cd1c

Review URL: https://codereview.chromium.org/1295523002
2015-08-19 11:50:51 -07:00
reed
f5822825ec change asABitmap to isABitmap on shader
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1287263005
2015-08-19 11:46:38 -07:00
mtklein
790d74f7c1 No need to re-declare pure virtual name().
Fixes inconsistent override warning.

BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1293413003
2015-08-19 11:05:39 -07:00
mtklein
3b44dcf078 Patches on top of Radu's latest.
patch from issue 1273033005 at patchset 120001 (http://crrev.com/1273033005#ps120001)

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/2d141ba2df8f7506848aa9369f502944e837cd09

Review URL: https://codereview.chromium.org/1288323004
2015-08-19 10:39:54 -07:00
robertphillips
45b59ed6e4 Update SkLightingShader to support rotation
This also:
makes the SkLightingShader handle normal maps where the rects aren't aligned between the diffuse and normal maps.

adds a light aggregating class (Lights) to SkLightingShader (along with a Builder nested class).

Split out of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call)

Review URL: https://codereview.chromium.org/1291783003
2015-08-19 10:35:14 -07:00
caryclark
95b96d6495 Revert of cast SK_ARRAY_COUNT to make it sign agnostic (patchset #1 id:1 of https://codereview.chromium.org/1299943002/ )
Reason for revert:
fails on chrome build on windows

Original issue's description:
> cast SK_ARRAY_COUNT to make it sign agnostic
>
> By adding a cast to SK_ARRAY_COUNT, the compiler treats the
> compile-time value as if it were a const int, and like regular
> numbers, permits it to be compared to signed and unsigned
> numbers freely.
>
> R=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/bca86202a48b2afa527b6e40d8b360ce3bc7c2e7

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1285263007
2015-08-19 10:12:59 -07:00
mtklein
c6ad06acef unsigned -> int for counts and indices in picture-related code
also, (C)

BUG=skia:

Review URL: https://codereview.chromium.org/1300163002
2015-08-19 09:51:01 -07:00
senorblanco
4b013296bf Add rendertarget flag to prevent a debug assert in SampleApp.
BUG=skia:4223

Review URL: https://codereview.chromium.org/1301583006
2015-08-19 09:10:28 -07:00
joshualitt
ae5b2c623b Create GrQuad
BUG=skia:

Review URL: https://codereview.chromium.org/1294713009
2015-08-19 08:48:41 -07:00
caryclark
bca86202a4 cast SK_ARRAY_COUNT to make it sign agnostic
By adding a cast to SK_ARRAY_COUNT, the compiler treats the
compile-time value as if it were a const int, and like regular
numbers, permits it to be compared to signed and unsigned
numbers freely.

R=reed@google.com

Review URL: https://codereview.chromium.org/1299943002
2015-08-19 08:28:14 -07:00
bsalomon
7dea7b7df1 Use calloc to allocate data that will be uploaded to vertex/index buffers in Chrome
BUG=chromium:454267
BUG=chromium:522315

Review URL: https://codereview.chromium.org/1300123002
2015-08-19 08:26:51 -07:00
wangyix
93ab254b7e This change is in preparation for updating how processor keys and meta keys are generated for frag procs.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1298233002
2015-08-19 08:23:12 -07:00
joshualitt
5b4a7abd48 Adding sucessful exit message to VisualBench
BUG=skia:

Review URL: https://codereview.chromium.org/1287763004
2015-08-19 08:21:48 -07:00
reed
451af5062e remove SkDeferredCanvas
Waiting a day or so to see if the blink-removal of SkDeferredCanvas sticks

BUG=skia:

Review URL: https://codereview.chromium.org/1269093002
2015-08-19 08:18:04 -07:00
joshualitt
da04e0e80a Allow setting of GrBatchFontCache atlas sizes
BUG=skia:

Review URL: https://codereview.chromium.org/1255943006
2015-08-19 08:16:43 -07:00
msarett
45cba08015 Forgot to add resources with new test
I created these images using mandrill_16.png (already in
resources) and an online tool.

https://codereview.chromium.org/1287863004/
BUG=skia:

Review URL: https://codereview.chromium.org/1297723004
2015-08-19 08:12:57 -07:00
mtklein
8c9a67ae4b Revert of Have DM manually encode its .png outputs. (patchset #2 id:20001 of https://codereview.chromium.org/1304443002/ )
Reason for revert:
derek + Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug

Original issue's description:
> Have DM manually encode its .png outputs.
>
> This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7

TBR=stephana@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1297383002
2015-08-19 08:11:37 -07:00
herb
82a02c9620 Revert of SkCanvas::onDrawPicture() quick-reject (patchset #3 id:40001 of https://codereview.chromium.org/1264133003/ )
Reason for revert:
Seems to be breaking some blink tests.
https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/75812/layout-test-results/results.html

Original issue's description:
> SkCanvas::onDrawPicture() quick-reject
>
> R=reed@google.com,mtklein@google.com
>
> Committed: https://skia.googlesource.com/skia/+/48ed62b29d45e42b971aac8858da06781c93e6d7
>
> Committed: https://skia.googlesource.com/skia/+/d3d07245e29504dbffa0083e84ace5bab85853d4

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

Review URL: https://codereview.chromium.org/1301973002
2015-08-19 07:47:55 -07:00
mtklein
3cc0dfffb7 Have DM manually encode its .png outputs.
This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.

BUG=skia:

Review URL: https://codereview.chromium.org/1304443002
2015-08-19 07:37:51 -07:00
halcanary
d75e21dade SkStream Testing: fix bug in new unit test.
Review URL: https://codereview.chromium.org/1297143004
2015-08-19 07:22:04 -07:00
mtklein
a4c3244760 add missing override
BUG=skia:

TBR=

Review URL: https://codereview.chromium.org/1292073003
2015-08-19 07:11:34 -07:00
joshualitt
ae41b38343 fill rect batch refactor into separate batches
BUG=skia:

Review URL: https://codereview.chromium.org/1295773003
2015-08-19 06:54:08 -07:00
Brian Salomon
6458b6f0a8 Init class ID in GrStencilPathBatch
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1300093007
2015-08-19 09:44:48 -04:00
halcanary
cb9241badd Fix stack overuse error
Review URL: https://codereview.chromium.org/1283193008
2015-08-19 06:12:40 -07:00
bsalomon
f3bf892d71 Fix VS 2015 build
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1297283003
2015-08-19 06:12:36 -07:00
fmalita
d3d07245e2 SkCanvas::onDrawPicture() quick-reject
R=reed@google.com,mtklein@google.com

Committed: https://skia.googlesource.com/skia/+/48ed62b29d45e42b971aac8858da06781c93e6d7

Review URL: https://codereview.chromium.org/1264133003
2015-08-19 06:07:36 -07:00
reed
a32cc950fb widen gm to show entire image, add place-holder for no context
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1294113003
2015-08-19 06:07:29 -07:00
halcanary
48305e8353 SkPDF/Deflate: clean up old SkFlate code
Factor out some of https://crrev.com/1227913008

BUG=skia:3030

Review URL: https://codereview.chromium.org/1298243002
2015-08-18 13:30:25 -07:00
bsalomon
a44919ea27 Path stenciling in GrBatch
Review URL: https://codereview.chromium.org/1293973003
2015-08-18 13:28:20 -07:00
msarett
b32758a72f Test scaling for small images
We don't want to test small images on Gold because they are
not interested to look at.  Instead, I wrote a unit test to
verify that scaling small images does not cause crashes.

BUG=skia:

Review URL: https://codereview.chromium.org/1287863004
2015-08-18 13:22:46 -07:00
egdaniel
73caadf277 Try enabling all nanobenches on Nexus7
BUG=skia:2774

Review URL: https://codereview.chromium.org/1290223005
2015-08-18 13:08:36 -07:00
reed
4f0e04736c handle no shader from image in drawAtlas
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1298233003
2015-08-18 12:50:24 -07:00
bsalomon
f46c5e8fdb Remove Cmd in GrTargetCommands that is no longer needed with GrCopySurfaceBatch
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1292623004
2015-08-18 12:30:02 -07:00