Commit Graph

5325 Commits

Author SHA1 Message Date
kkinnunen
abc0c8216b SampleApp: Cleanup SkOSWindow_SDL
Implements:
 * Event loop event waiting (no busy loop)
 ** Skia timers
 * Proper window sizing and resizing
 * MSAA on X11 (previously it did not use MSAA at all)
 * Changes requested colorspace from 565 to 8888
   to match non-SDL variants
 * Context creation clearing (color and stencil mask)
 * Opens the window in 640x480 by default on desktop.

Removes dead code.

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

Review URL: https://codereview.chromium.org/1578173002
2016-01-14 05:37:51 -08:00
egdaniel
fa8963252e Move some program building utils from GL to GLSL
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535603006

Review URL: https://codereview.chromium.org/1535603006
2016-01-13 12:19:30 -08:00
reed
fa2b3a376d remove CreateLightingFilter from SkColorFilter
All callers have converted over to SkColorMatrixFilter

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

Review URL: https://codereview.chromium.org/1583923002
2016-01-13 10:43:09 -08:00
reed
6054d686e6 reorg global initialization, separating core from optional
Chrome will be changed to just inherit our files, with no need to have their own copy. see https://codereview.chromium.org/1581533007/

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

Review URL: https://codereview.chromium.org/1580873002
2016-01-13 08:47:54 -08:00
joshualitt
f5883a6d75 Hide drawBatch on GrDrawTarget from test Methods
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574383002

Review URL: https://codereview.chromium.org/1574383002
2016-01-13 07:47:38 -08:00
joshualitt
bc90735170 GrAuditTrail hooks in GrContext + GrDrawContext
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1580023002

Review URL: https://codereview.chromium.org/1580023002
2016-01-13 06:45:40 -08:00
ajuma
1554ec0689 Delete SkRectShaderImageFilter
This is no longer used (as of http://crrev.com/368929).

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

Review URL: https://codereview.chromium.org/1575233004
2016-01-12 14:17:30 -08:00
joshualitt
87a721b246 Convert GrAuditTrail to use scoped frames
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1579193002

Review URL: https://codereview.chromium.org/1579193002
2016-01-12 12:59:28 -08:00
fmalita
61a237e319 SkPaintFilterCanvas cleanup
All external clients have been updated, we can now remove the
transitional kludges.

BUG=skia:4782
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574303003

Review URL: https://codereview.chromium.org/1574303003
2016-01-12 12:14:10 -08:00
halcanary
2b12376849 SkTime: Stop using POSIX entensions to time.h for timezone
SkTime::GetDateTime() isn't used anywhere in production, so
change it to return current UTC time, rather than local time.

Also, move code into SkTime out of ports.

A later CL will remove empty files.

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

[mtklein]
Only deleting unused API.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1562943002
2016-01-12 11:55:29 -08:00
caryclark
c63a0f8fe5 clamp fixed divide to 32 bits
In SkEdge::setLine, the numerator is a 26.6 fixed number.
SkFixedDiv shifts it up by an additional 16 bits. If the
y interval is small, the result overflows 32 bits.

The code pins in 64 bit space before down-casting the result.

R=reed@google.com
BUG=skia:4708
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583453002

Review URL: https://codereview.chromium.org/1583453002
2016-01-12 07:21:19 -08:00
fmalita
32cdc32522 SkTCopyOnFirstWrite-based SkPaintFilterCanvas API
I find this version preferable because

1) it consolidates the in/out paint args without compromising
efficiency or flexibility

2) relieves overriders from having to set the SkTLazy explicitly

BUG=skia:4782
R=mtklein@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576183002

Review URL: https://codereview.chromium.org/1576183002
2016-01-12 07:21:11 -08:00
joshualitt
086cee12de Add batch names and bounds to json debug information
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577093003

Review URL: https://codereview.chromium.org/1577093003
2016-01-12 06:45:24 -08:00
senorblanco
a9fbd1676c Fix SkTileImageFilter when srcRect is a superset of bitmap bounds.
If the input bitmap passed to SkTileImageFilter does not fill the
srcRect, we were tiling this incorrectly (see the first sample
from tileimage filter -- it draws from a srcRect of 12,12 50x50
to a dstRect of 0,0 50x50. There should be no tiling at all
in this case!)

In order to fix this, we need to pad the bitmap out to srcRect,
and tile with that. In order to tile correctly in the GPU case,
we need to request a tileable texture.

NOTE: this will change the results of the tileimagefilter GM (correctness,
and added src / dest rects).

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

Review URL: https://codereview.chromium.org/1570133003
2016-01-11 14:09:09 -08:00
fmalita
bad23dc9ed SkPaintFilterCanvas skip-draw support
At the time SkPaintFilterCanvas was introduced as a SkDrawFilter replacement,
no clients were relying on the draw veto logic.  Now Chromium does.

To facilitate migrating off SkDrawFilter, let's augment SkPaintFilterCanvas
with skip-draw semantics.

A side effect of the CL is that now we call the filter virtual even for null
paints.

BUG=skia:4782
R=reed@google.com,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577933002

Review URL: https://codereview.chromium.org/1577933002
2016-01-11 13:58:30 -08:00
joshualitt
ce894007eb Guard SkGpuDevice
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567093002

Review URL: https://codereview.chromium.org/1567093002
2016-01-11 13:29:31 -08:00
reed
c7141eb8fb remove external header for SkModeColorFilter
BUG=skia:4791
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577073002

Review URL: https://codereview.chromium.org/1577073002
2016-01-11 13:09:00 -08:00
reed
0daf5dd7fc move declaration of CreateLightingFilter into SkColorMatrixFilter
BUG=skia:4791
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574023002

Review URL: https://codereview.chromium.org/1574023002
2016-01-11 12:34:04 -08:00
bsalomon
9d22fd6e7b Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed.
BUG=chromium:550559
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1576983002

Review URL: https://codereview.chromium.org/1576983002
2016-01-11 11:14:17 -08:00
reed
4e23cdaa6b remove imagefilter::sizeconstraint
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571033002

Review URL: https://codereview.chromium.org/1571033002
2016-01-11 10:56:59 -08:00
joshualitt
5651ee6376 Change to wire up opnames in SkGpuDevice
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1565113004

Review URL: https://codereview.chromium.org/1565113004
2016-01-11 10:39:11 -08:00
joshualitt
4897ff20fc Move atomicinc in GrTracing to behind branch
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1571603003

Review URL: https://codereview.chromium.org/1571603003
2016-01-11 08:30:48 -08:00
joshualitt
6d0872d9bd Reland of Add guards to GrTextureProvider (patchset #1 id:1 of https://codereview.chromium.org/1565313003/ )
Reason for revert:
should be fixed

Original issue's description:
> Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ )
>
> Reason for revert:
> breaking asan bot
>
> Original issue's description:
> > Add guards to GrTextureProvider
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002
> >
> > Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/9a9515e081c54efdd5a0b0
f662c013cbeef6d63f

TBR=bsalomon@google.com
TBR=robertphillips@google.com,joshualitt@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review URL: https://codereview.chromium.org/1575093002
2016-01-11 08:27:48 -08:00
msarett
a4970dc973 Delete reallyHasAlpha() from SkCodec
TBR=reed
BUG=skia:3582
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1557403002

Review URL: https://codereview.chromium.org/1557403002
2016-01-11 07:23:23 -08:00
reed
22471ed134 remove SkImage::applyFilter() -- unused, can always re-add later
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573653002

Review URL: https://codereview.chromium.org/1573653002
2016-01-08 17:21:47 -08:00
ajuma
77b6ba3b6e Implement an SkPaint-based image filter
This implements SkPaintImageFilter, and is intended to replace
SkRectShaderImageFilter. By allowing a paint and not just a
shader as input, this allows consumers to control dithering.

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

Review URL: https://codereview.chromium.org/1556553002
2016-01-08 14:58:35 -08:00
bsalomon
cdee009886 Add a class representing texture swizzle.
Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

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

Review URL: https://codereview.chromium.org/1567733005
2016-01-08 13:20:12 -08:00
mtklein
3183a41363 Revert of Add a class representing texture swizzle. (patchset #6 id:100001 of https://codereview.chromium.org/1567733005/ )
Reason for revert:
Shader compilation failures when implicitly converting vec4 to float.

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/3266/steps/dm/logs/stdio

https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug/builds/3154/steps/dm/logs/stdio

Original issue's description:
> Add a class representing texture swizzle.
>
> Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.
>
> Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005
>
> Committed: https://skia.googlesource.com/skia/+/1a1efeacf7cc94a8c2977114dfe230fed3efc105

TBR=egdaniel@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1569393002
2016-01-08 12:11:39 -08:00
mtklein
defa0daa6a Clean up SkXfermode_opts.h
It seems that MSVC + __vectorcall don't play well together,
so back ourselves out into a situation where we don't need it.

   - Inline transfermode functions.  This removes the need for SK_VECTORCALL.
   - Remove 565 destination specializations.
     Blending into 565 is not speed-critical enough to merit the code bloat.
   - Removing 565 specializations means a bunch of Sk4px code is now dead.

8888 xfermodes generally speed up a bit from inlining, smoothly ranging from no change down to 0.65x for the fastest functions like Plus or Modulate.

565 xfermodes generally slow down because we're doing 565 -> 8888 and 8888->565 conversion serially[1] and using the stack, smoothly ranging from no change up to 2x slower for the fastest functions like Plus and Modulate.

[1] the 565->8888 conversion is actually being autovectorized

BUG=skia:4765,skia:4776
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1565223002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

No public API changes.
TBR=reed@google.com

Review URL: https://codereview.chromium.org/1565223002
2016-01-08 11:45:21 -08:00
bsalomon
1a1efeacf7 Add a class representing texture swizzle.
Store config swizzle GrGLCaps and shader swizzles in GrGLSLCaps.

Remove GrTextureAccess's swizzle and update users of it to swizzle in their shader code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567733005

Review URL: https://codereview.chromium.org/1567733005
2016-01-08 11:38:41 -08:00
bungeman
0e101667d6 Use ::std for is_empty, is_class, add_xxx_reference, remove decay.
SkTLogic.h contains implemenetations of is_empty, is_class, decay,
decay_t, add_lvalue_reference, add_rvalue_reference, and
add_rvalue_reference_t. The declaration of is_class is only used by
is_empty. The current implementation of is_empty will not work
correctly with 'final'. The current implementation of
add_lvalue_reference does not support clarifications in c++17. No Skia
code is currently using decay, decay_t, add_rvalue_reference, and
add_rvalue_reference_t. In addition, there are no known issues with
any of these in ::std with any supported compiler.

The implementations of is_function and is_convertible are commented to
note why they are still present.

Review URL: https://codereview.chromium.org/1567123006
2016-01-08 11:05:09 -08:00
joshualitt
de8dc7e920 Reland of Make a single GrSingleOwner in GrContext (patchset #1 id:1 of https://codereview.chromium.org/1565303003/ )
Reason for revert:
trying again

Original issue's description:
> Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ )
>
> Reason for revert:
> breaking asan
>
> Original issue's description:
> > Make a single GrSingleOwner in GrContext
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004
> >
> > Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a
>
> TBR=robertphillips@google.com,joshualitt@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/94da292e39db0d41da08b1d6055ca5e0d6b498cc

TBR=robertphillips@google.com,joshualitt@chromium.org
# 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/1572653002
2016-01-08 10:09:13 -08:00
robertphillips
2c3176c18f Remove "unused" parameter from filterInputGPU
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569553007

Review URL: https://codereview.chromium.org/1569553007
2016-01-08 09:28:24 -08:00
bsalomon
41e4384ea0 Move config texturability/renderability to config table.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002

Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949

Review URL: https://codereview.chromium.org/1563443002
2016-01-08 09:12:44 -08:00
joshualitt
27a48dc0cd Create stub GrAuditTrail class
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1572553002

Review URL: https://codereview.chromium.org/1572553002
2016-01-08 07:19:47 -08:00
reed
7c554222dd remove SkGPipe
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568883003

Review URL: https://codereview.chromium.org/1568883003
2016-01-08 06:30:14 -08:00
egdaniel
4999df8ca2 Revert of Move config texturability/renderability to config table (patchset #8 id:140001 of https://codereview.chromium.org/1563443002/ )
Reason for revert:
speculative revert for breaking iOS writePixels tests

Original issue's description:
> Move config texturability/renderability to config table.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002
>
> Committed: https://skia.googlesource.com/skia/+/32a3cd2f2860b15a842a6aa49e4e6a3bed04f949

TBR=jvanverth@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1569103003
2016-01-07 17:06:04 -08:00
reed
3061af4a5f add SkShader::newWithColorFilter
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556693003

Review URL: https://codereview.chromium.org/1562193002
2016-01-07 15:47:29 -08:00
joshualitt
94da292e39 Revert of Make a single GrSingleOwner in GrContext (patchset #3 id:40001 of https://codereview.chromium.org/1563703004/ )
Reason for revert:
breaking asan

Original issue's description:
> Make a single GrSingleOwner in GrContext
>
> TBR=bsalomon@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004
>
> Committed: https://skia.googlesource.com/skia/+/f9bc796e0dbd31674c22b34761913ee6e8fdd66a

TBR=robertphillips@google.com,joshualitt@chromium.org
# 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/1565303003
2016-01-07 13:22:24 -08:00
joshualitt
9a9515e081 Revert of Add guards to GrTextureProvider (patchset #5 id:80001 of https://codereview.chromium.org/1567983002/ )
Reason for revert:
breaking asan bot

Original issue's description:
> Add guards to GrTextureProvider
>
> TBR=bsalomon@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002
>
> Committed: https://skia.googlesource.com/skia/+/b30dd1db1d914b85a691b4724713ba1b0f16cd6c

TBR=robertphillips@google.com,joshualitt@chromium.org
# 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/1565313003
2016-01-07 13:17:39 -08:00
bsalomon
32a3cd2f28 Move config texturability/renderability to config table.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563443002

Review URL: https://codereview.chromium.org/1563443002
2016-01-07 13:00:11 -08:00
joshualitt
b30dd1db1d Add guards to GrTextureProvider
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567983002

Review URL: https://codereview.chromium.org/1567983002
2016-01-07 12:52:05 -08:00
bungeman
de029d0e41 More <type_traits> for SkTLogic.h.
SkTLogic.h specifies a number of declarations now found in
<type_traits>. This removes some of these declarations from SkTLogic.h
in favor of the ::std versions. These declarations are fairly safe to
change as the implementations are striaght forward and no known stl
implementations are known to have issues with them.

Review URL: https://codereview.chromium.org/1565283003
2016-01-07 12:39:11 -08:00
caryclark
6544817b98 test & doc for SkUnitCubicInterp
R=reed@google.com
BUG=skia:959
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1562333002

Review URL: https://codereview.chromium.org/1562333002
2016-01-07 11:33:15 -08:00
joshualitt
f9bc796e0d Make a single GrSingleOwner in GrContext
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1563703004

Review URL: https://codereview.chromium.org/1563703004
2016-01-07 11:32:40 -08:00
reed
bfd5f171e6 Revert[2] of "add backdrop option to SaveLayerRec"
Reverted because of picture/serialization failure

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

TBR=mtklein

Review URL: https://codereview.chromium.org/1567063002
2016-01-07 11:28:08 -08:00
reed
0575cb2def Revert of add backdrop option to SaveLayerRec (patchset #14 id:260001 of https://codereview.chromium.org/1523053003/ )
Reason for revert:
serialized != direct, will investigate

Original issue's description:
> add backdrop option to SaveLayerRec
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1523053003
>
> Committed: https://skia.googlesource.com/skia/+/247415969a9a5ed6c83cc09395472416c4b7de7f

TBR=robertphillips@google.com,bsalomon@google.com,mtklein@google.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/1565203002
2016-01-07 08:15:10 -08:00
reed
247415969a add backdrop option to SaveLayerRec
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1523053003

Review URL: https://codereview.chromium.org/1523053003
2016-01-07 07:44:35 -08:00
reed
ce2dfae8c5 remove dead code from SkColorMatrixFilter
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568783002

Review URL: https://codereview.chromium.org/1568783002
2016-01-07 06:23:48 -08:00
kkinnunen
3405800d7a Make SkGLContext lifetime more well-defined
Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

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

Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

Review URL: https://codereview.chromium.org/1511773005
2016-01-06 23:49:31 -08:00
joshualitt
5b1dec7cde Add additional assert to GrSingleOwner
TBR=bsalomon@google.com
TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1566703003

Review URL: https://codereview.chromium.org/1566703003
2016-01-06 09:25:14 -08:00
bungeman
54e6308219 Add skstd::remove_pointer_t and use it.
This replaces an existing incomplete implementation. This also makes
it easier to update the current use in the future when switching to
<type_traits>.

Review URL: https://codereview.chromium.org/1555153002
2016-01-06 08:30:59 -08:00
joshualitt
1de610a528 Create debug only SkSingleOwner
This is so Gpu code can guard against improper multithreaded usage in
debug builds

TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1555953004

Review URL: https://codereview.chromium.org/1555953004
2016-01-06 08:26:09 -08:00
bungeman
221524de3b Start using <type_traits> and <utility> (C++11).
SkUtility.h and SkTLogic.h implement a number of type traits now
available through <type_traits> and <utility>. This removes SkUtility.h,
replacing it with <utility>, and moves a number of traits in
SkTLogic.h to use the std:: equivelents. This change only uses C++11
parts of the standard library; SkTLogic.h will continue to provide
C++14 and beyond for now in the skstd namespace.

The changes to SkTLogic.h are being done gradually so that safe changes
may be landed confidently, with more risky changes in the future.

Review URL: https://codereview.chromium.org/1561683002
2016-01-05 14:59:40 -08:00
jvanverth
17aa047066 More framework support for TransferBuffers
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534123003

Review URL: https://codereview.chromium.org/1534123003
2016-01-05 10:41:27 -08:00
reed
05dd251e5e take gr-context parameter to refEncoded, indicating a desire for only gpu-specific formats
Prime motivator:
- we always call refEncoded on the generator when trying to upload
   - we call it *before* we ask for raster or YUV
- for blink, this call can be very slow, as they have to cons-up their SkData the first time (and grab a mutex to do it)
- this parameter will indicate to them that we're only interested in gpu formats, which they will know if they have.

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

Review URL: https://codereview.chromium.org/1556333004
2016-01-05 09:16:19 -08:00
reed
4e5a758f38 remove shadeSpan16 from shader
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556003003
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1556003003
2016-01-05 05:10:33 -08:00
jcgregorio
54e2ca5a23 Revert of Make SkGLContext lifetime more well-defined (patchset #7 id:120001 of https://codereview.chromium.org/1511773005/ )
Reason for revert:
Broke tests on Android, iOS, Mac and Windows.

Original issue's description:
> Make SkGLContext lifetime more well-defined
>
> Remove refcounting from SkGLContext.
>
> SkGLContext is expected to behave like GrContextFactory would own
> it, as implied by the GrContextFactory function.
>
> If it is refcounted, this does not hold.
>
> Also other use sites, such as in SkOSWindow_win (command buffer gl
> object), confirm the behavior. The object is explicitly owned and
> destroyed, not shared.
>
> Also fixes potential crashes from using GL context of an abandoned
> context.
>
> Also fixes potential crashes in DM/nanobench, if the GrContext lives
> longer than GLContext through internal refing of GrContext.
>
> Moves the non-trivial implementations from GrContextFactory.h to
> .cpp, just for consistency sake.
>
> Changes pathops_unittest.gyp. The pathops_unittest uses
> GrContextFactory, but did not link to its implementation. The reason
> they worked was that the implementation used (constructors, destructors)
> happened to be in the .h file.
>
> This works towards being able to use command buffer and NVPR from
> the SampleApp.
>
> BUG=skia:2992
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1511773005
>
> Committed: https://skia.googlesource.com/skia/+/830e012187f951d49d7e46e196ac8d1e653a25da

TBR=bsalomon@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1555053003
2016-01-05 04:15:23 -08:00
tzik
bc7d235c8b Take care fall-through case of switch in skia
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1549273002

Review URL: https://codereview.chromium.org/1549273002
2016-01-05 00:35:50 -08:00
kkinnunen
830e012187 Make SkGLContext lifetime more well-defined
Remove refcounting from SkGLContext.

SkGLContext is expected to behave like GrContextFactory would own
it, as implied by the GrContextFactory function.

If it is refcounted, this does not hold.

Also other use sites, such as in SkOSWindow_win (command buffer gl
object), confirm the behavior. The object is explicitly owned and
destroyed, not shared.

Also fixes potential crashes from using GL context of an abandoned
context.

Also fixes potential crashes in DM/nanobench, if the GrContext lives
longer than GLContext through internal refing of GrContext.

Moves the non-trivial implementations from GrContextFactory.h to
.cpp, just for consistency sake.

Changes pathops_unittest.gyp. The pathops_unittest uses
GrContextFactory, but did not link to its implementation. The reason
they worked was that the implementation used (constructors, destructors)
happened to be in the .h file.

This works towards being able to use command buffer and NVPR from
the SampleApp.

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

Review URL: https://codereview.chromium.org/1511773005
2016-01-05 00:30:33 -08:00
caryclark
6df611574a handle halfway case in scan converter
Scan edges that start at exactly -0.5 aren't trimmed by
clipping or by rounding, triggering a debug assert.

One way to fix this is to round the top and left
down instead of up.

Also, move the path initialization of gm/composeshader.cpp
to make debugging other path problems easier.

R=reed@google.com
BUG=skia:2715
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544873002

Review URL: https://codereview.chromium.org/1544873002
2016-01-04 14:17:47 -08:00
scroggo
ffe031e65c Add conversion from SaveLayerFlags to SaveFlags
Needed for SkiaAndroidProxy::getSaveLayerStrategy.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1559873003

Review URL: https://codereview.chromium.org/1559873003
2016-01-04 07:16:32 -08:00
reed
03f8968106 move SkDither.h to private, remove unused shadeSpan16
Since perlin noise shader never set the kHasShad16 flag, its shadeSpan16 method was never called.

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

TBR=

Review URL: https://codereview.chromium.org/1558933002
2016-01-04 05:06:07 -08:00
reed
76a834a107 move SkTDict and SkTSearch into private
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1558923002

TBR=

Review URL: https://codereview.chromium.org/1558923002
2016-01-03 18:36:05 -08:00
reed
f880e45e92 change factory to method, to parallel pattern in imagefilters. no functionality change.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1553743002

TBR=

Review URL: https://codereview.chromium.org/1553743002
2015-12-30 13:39:41 -08:00
joshualitt
e76b4bb3ae Reland of Make draw* lines responsible for cache management (patchset #1 id:1 of https://codereview.chromium.org/1552513003/ )
Reason for revert:
might have been premature

Original issue's description:
> Revert of Make draw* lines responsible for cache management (patchset #1 id:1 of https://codereview.chromium.org/1521613002/ )
>
> Reason for revert:
> seeing crashes on android and linux
>
> Original issue's description:
> > Make draw* lines responsible for cache management
> >
> > TBR=bsalomon@google.com
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/66957946c0c418e71c0f36bb2904cc38c334eba4
>
> TBR=bsalomon@google.com,jvanverth@google.com,joshualitt@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/90e293dae4990a86cb952663ccde8fae55112d7d

TBR=bsalomon@google.com,jvanverth@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1551563003
2015-12-28 07:23:58 -08:00
joshualitt
90e293dae4 Revert of Make draw* lines responsible for cache management (patchset #1 id:1 of https://codereview.chromium.org/1521613002/ )
Reason for revert:
seeing crashes on android and linux

Original issue's description:
> Make draw* lines responsible for cache management
>
> TBR=bsalomon@google.com
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/66957946c0c418e71c0f36bb2904cc38c334eba4

TBR=bsalomon@google.com,jvanverth@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1552513003
2015-12-28 07:14:52 -08:00
reed
9a878a00ef remove cruft from SkTypes.h, including SkBool
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1548223002

TBR=

Review URL: https://codereview.chromium.org/1548223002
2015-12-27 12:47:25 -08:00
reed
6855ddb3cc remove deprecated annotation helper
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1552443003

TBR=

Review URL: https://codereview.chromium.org/1552443003
2015-12-26 19:00:01 -08:00
reed
98e7538be3 make GrRect.h private
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1548213002

TBR=bsalomon

Review URL: https://codereview.chromium.org/1548213002
2015-12-26 18:20:00 -08:00
reed
48eb08a790 remove unused SkAutoROCanvasPixels
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1550583002

TBR=

Review URL: https://codereview.chromium.org/1550583002
2015-12-25 12:56:03 -08:00
reed
08e7047e68 remove unused SkCubicInterval
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533393005

TBR=scroggo

Review URL: https://codereview.chromium.org/1533393005
2015-12-23 11:21:39 -08:00
kkinnunen
3e980c3d88 Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

Review URL: https://codereview.chromium.org/1490113005
2015-12-23 01:33:01 -08:00
rmistry
0f515bd428 Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #21 id:400001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
The Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug builder fails after this CL.

Links to specific builds:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1689
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1690
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Debug/builds/1691

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b
>
> Committed: https://skia.googlesource.com/skia/+/9ebc3f0ee6db215dde461dc4777d85988cf272dd

TBR=mtklein@google.com,bsalomon@google.com,joshualitt@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1548683002
2015-12-22 10:22:26 -08:00
reed
83ba585ecb move SkParsePaint.h into views
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1547653002
TBR=

Review URL: https://codereview.chromium.org/1547653002
2015-12-22 04:36:57 -08:00
kkinnunen
9ebc3f0ee6 Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

Review URL: https://codereview.chromium.org/1490113005
2015-12-21 23:48:13 -08:00
reed
b39f39f5cc remove unused SkCullPoints
need to remove file references from chrome before landing this
https://codereview.chromium.org/1547603002#

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

TBR=scroggo

Review URL: https://codereview.chromium.org/1541933004
2015-12-21 18:37:16 -08:00
bsalomon
2047b78555 Don't ref/unref the static src-over xp
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1540363002

bug=chromium:570301

Review URL: https://codereview.chromium.org/1540363002
2015-12-21 13:12:55 -08:00
reed
bada1885da hide old SaveFlags, but keep them available (for now) for Android
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535993003

requires https://codereview.chromium.org/1537203002/# to land in chrome first (android should be safe)

Review URL: https://codereview.chromium.org/1535993003
2015-12-21 13:09:44 -08:00
reed
5e1ddb1086 Reland of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1540203002/ )
Reason for revert:
chrome changes have landed

Original issue's description:
> Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )
>
> Reason for revert:
> need to update some chrome/blink call-sites
>
> Original issue's description:
> > change all factories to return their base-class
> >
> > will watch DEPS roll to see if there are chrome sites needing updates
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
> >
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2d6ba6690f8951e152d8e793191b14afd52f5506

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1533373002
2015-12-21 08:52:45 -08:00
xidachen
627769144d Create a hash table from id<-->key in SkImageFilter::CacheImpl
There is memory leak in the SkImageFilter::Cache. There are two sources
of memory leak:
1. The cache filling up quickly.
2. A slow small leak that never stops.
This CL solves the first issue, which prevents the cache filling up quickly.
This CL creates a new hash table that index the
SkImageFilter::uniqueID to an array of keys, and with the existing
key<-->Value hash table, we can have SkImageFilters proactively
purge content derived cached content when destroyed.

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

Committed: https://skia.googlesource.com/skia/+/f5d1f8dcc841516d7ea63c151b13059af40ca76d

Review URL: https://codereview.chromium.org/1514893003
2015-12-21 07:29:03 -08:00
reed
2d6ba6690f Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ )
Reason for revert:
need to update some chrome/blink call-sites

Original issue's description:
> change all factories to return their base-class
>
> will watch DEPS roll to see if there are chrome sites needing updates
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34

TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1540203002
2015-12-20 20:08:43 -08:00
reed
d63f60a363 change all factories to return their base-class
will watch DEPS roll to see if there are chrome sites needing updates

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

TBR=

Review URL: https://codereview.chromium.org/1535353002
2015-12-20 19:38:20 -08:00
reed
03ef4b16b2 remove SK_SUPPORT_LEGACY_SAVELAYERPARAMS code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1537193002

TBR=

Review URL: https://codereview.chromium.org/1537193002
2015-12-18 21:26:56 -08:00
herb
c7a784cc8c Fix UB function problems for shaders and mask.
BUG=skia:4634
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002

Committed: https://skia.googlesource.com/skia/+/dafd044e4aea529f88d899247678d4549f776388

Review URL: https://codereview.chromium.org/1530743002
2015-12-18 09:52:15 -08:00
herb
1e810b3cc2 Revert of Fix UB function problems for shaders and mask. (patchset #3 id:40001 of https://codereview.chromium.org/1530743002/ )
Reason for revert:
Breaks man gold tests.

Original issue's description:
> Fix UB function problems for shaders and mask.
>
> BUG=skia:4634
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002
>
> Committed: https://skia.googlesource.com/skia/+/dafd044e4aea529f88d899247678d4549f776388

TBR=mtklein@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4634

Review URL: https://codereview.chromium.org/1534243002
2015-12-18 08:50:08 -08:00
reed
4960eeec4a change signature for virtual related to saveLayer, passing SaveLayerRec
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1533953002

NOTREECHECKS=True

Review URL: https://codereview.chromium.org/1533953002
2015-12-18 07:09:18 -08:00
caryclark
f97aa74fea fix large dashed paths
Paths with lots of points exceed the 32767 point index.
Make the index larger, add a test, and allow the
t value to use the extra bits.

R=reed@google.com,fmalita@chromium.org
BUG=skia:3501
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1534223002

Review URL: https://codereview.chromium.org/1534223002
2015-12-18 07:03:13 -08:00
joshualitt
4dabf83cbe Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #18 id:340001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
This CL changed 1200 images on gold, when I wouldn't expect any diffs from the description.

Original issue's description:
> Add config options to run different GPU APIs to dm and nanobench
>
> Add extended config specification form that can be used to run different
> gpu backend with different APIs.
>
> The configs can be specified with the form:
> gpu(api=string,dit=bool,nvpr=bool,samples=int)
>
> This replaces and removes the --gpuAPI flag.
>
> All existing configs should still work.
>
> Adds following documentation:
>
> out/Debug/dm --help config
>
> Flags:
>     --config:	type: string	default: 565 8888 gpu nonrendering
>         Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
>         nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
>         xps or use extended form 'backend(option=value,...)'.
>
>         Extended form: 'backend(option=value,...)'
>
>         Possible backends and options:
>
>         gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
>         	api	type: string	default: native.
>         	    Select graphics API to use with gpu backend.
>         	    Options:
>         		native			Use platform default OpenGL or OpenGL ES backend.
>         		gl    			Use OpenGL.
>         		gles  			Use OpenGL ES.
>         		debug 			Use debug OpenGL.
>         		null  			Use null OpenGL.
>         	dit	type: bool	default: false.
>         	    Use device independent text.
>         	nvpr	type: bool	default: false.
>         	    Use NV_path_rendering OpenGL and OpenGL ES extension.
>         	samples	type: int	default: 0.
>         	    Use multisampling with N samples.
>
>         Predefined configs:
>
>         	gpu      	= gpu()
>         	msaa4    	= gpu(samples=4)
>         	msaa16   	= gpu(samples=16)
>         	nvprmsaa4	= gpu(nvpr=true,samples=4)
>         	nvprmsaa16	= gpu(nvpr=true,samples=16)
>         	gpudft    	= gpu(dit=true)
>         	gpudebug  	= gpu(api=debug)
>         	gpunull   	= gpu(api=null)
>         	debug     	= gpu(api=debug)
>         	nullgpu   	= gpu(api=null)
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005
>
> Committed: https://skia.googlesource.com/skia/+/c8b4336444e7b90382e04e33665fb3b8490b825b

TBR=mtklein@google.com,bsalomon@google.com,scroggo@google.com,kkinnunen@nvidia.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:2992

Review URL: https://codereview.chromium.org/1536963002
2015-12-18 06:02:18 -08:00
reed
e848ff5965 Revert of Create a hash table from id<-->key in SkImageFilter::CacheImpl (patchset #7 id:120001 of https://codereview.chromium.org/1514893003/ )
Reason for revert:
speculative revert to try to unblock DEPS roll

https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/94665

Original issue's description:
> Create a hash table from id<-->key in SkImageFilter::CacheImpl
>
> There is memory leak in the SkImageFilter::Cache. There are two sources
> of memory leak:
> 1. The cache filling up quickly.
> 2. A slow small leak that never stops.
> This CL solves the first issue, which prevents the cache filling up quickly.
> This CL creates a new hash table that index the
> SkImageFilter::uniqueID to an array of keys, and with the existing
> key<-->Value hash table, we can have SkImageFilters proactively
> purge content derived cached content when destroyed.
>
> BUG=489543
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1514893003
>
> Committed: https://skia.googlesource.com/skia/+/f5d1f8dcc841516d7ea63c151b13059af40ca76d

TBR=mtklein@google.com,junov@chromium.org,xidachen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=489543

Review URL: https://codereview.chromium.org/1537923002
2015-12-18 05:23:09 -08:00
kkinnunen
c8b4336444 Add config options to run different GPU APIs to dm and nanobench
Add extended config specification form that can be used to run different
gpu backend with different APIs.

The configs can be specified with the form:
gpu(api=string,dit=bool,nvpr=bool,samples=int)

This replaces and removes the --gpuAPI flag.

All existing configs should still work.

Adds following documentation:

out/Debug/dm --help config

Flags:
    --config:	type: string	default: 565 8888 gpu nonrendering
        Options: 565 8888 debug gpu gpudebug gpudft gpunull msaa16 msaa4
        nonrendering null nullgpu nvprmsaa16 nvprmsaa4 pdf pdf_poppler skp svg
        xps or use extended form 'backend(option=value,...)'.

        Extended form: 'backend(option=value,...)'

        Possible backends and options:

        gpu(api=string,dit=bool,nvpr=bool,samples=int)	GPU backend
        	api	type: string	default: native.
        	    Select graphics API to use with gpu backend.
        	    Options:
        		native			Use platform default OpenGL or OpenGL ES backend.
        		gl    			Use OpenGL.
        		gles  			Use OpenGL ES.
        		debug 			Use debug OpenGL.
        		null  			Use null OpenGL.
        	dit	type: bool	default: false.
        	    Use device independent text.
        	nvpr	type: bool	default: false.
        	    Use NV_path_rendering OpenGL and OpenGL ES extension.
        	samples	type: int	default: 0.
        	    Use multisampling with N samples.

        Predefined configs:

        	gpu      	= gpu()
        	msaa4    	= gpu(samples=4)
        	msaa16   	= gpu(samples=16)
        	nvprmsaa4	= gpu(nvpr=true,samples=4)
        	nvprmsaa16	= gpu(nvpr=true,samples=16)
        	gpudft    	= gpu(dit=true)
        	gpudebug  	= gpu(api=debug)
        	gpunull   	= gpu(api=null)
        	debug     	= gpu(api=debug)
        	nullgpu   	= gpu(api=null)

BUG=skia:2992

Committed: https://skia.googlesource.com/skia/+/e13ca329fca4c28cf4e078561f591ab27b743d23
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1490113005

Review URL: https://codereview.chromium.org/1490113005
2015-12-18 03:27:32 -08:00
bsalomon
ef2c7c7057 Make SkMatrix::get*Scale[s]() fail on NaN
BUG=skia:4718
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1532963002

Review URL: https://codereview.chromium.org/1532963002
2015-12-17 15:33:13 -08:00
herb
dafd044e4a Fix UB function problems for shaders and mask.
BUG=skia:4634
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530743002

Review URL: https://codereview.chromium.org/1530743002
2015-12-17 14:22:34 -08:00
xidachen
f5d1f8dcc8 Create a hash table from id<-->key in SkImageFilter::CacheImpl
There is memory leak in the SkImageFilter::Cache. There are two sources
of memory leak:
1. The cache filling up quickly.
2. A slow small leak that never stops.
This CL solves the first issue, which prevents the cache filling up quickly.
This CL creates a new hash table that index the
SkImageFilter::uniqueID to an array of keys, and with the existing
key<-->Value hash table, we can have SkImageFilters proactively
purge content derived cached content when destroyed.

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

Review URL: https://codereview.chromium.org/1514893003
2015-12-17 14:12:23 -08:00
robertphillips
e80eb928ba Add default ctor to SkMask
The minimal fix here seems to be handling BoxBlur's return value in SkBlurMaskFilter.cpp::GrRRectBlurEffect::Create. We seem to do enough special handling of the fImage field though that always initialializing it may not be a bad idea.

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

Review URL: https://codereview.chromium.org/1539553002
2015-12-17 11:33:12 -08:00
bsalomon
f0795ab1f2 Fix thread-unsafe construction of GrUniqueKey in GR_DEFINE_STATIC_UNIQUE_KEY
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530313002

Review URL: https://codereview.chromium.org/1530313002
2015-12-17 08:15:47 -08:00
reed
96205ddedc remove obsolete ondrawsprite base virtual
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1529283003

TBR=

Review URL: https://codereview.chromium.org/1529283003
2015-12-16 14:25:30 -08:00
caryclark
7471fa4920 add fsync to try to get complete skps from webpage picture capture
R=reed@google.com,mtklein@google.com
BUG=skia:4691
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1530783003

Review URL: https://codereview.chromium.org/1530783003
2015-12-16 13:41:23 -08:00
reed
da420b976e Reland of move drawSprite from canvas (patchset #1 id:1 of https://codereview.chromium.org/1529803004/ )
Reason for revert:
guard has landed in chrome

Original issue's description:
> Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )
>
> Reason for revert:
> need to remove an override in chrome
>
> Original issue's description:
> > remove drawSprite from canvas
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1
>
> TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/32704674f64cb6a14356dfebe060cd3484c06cc7

TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1530203002
2015-12-16 08:38:16 -08:00
reed
32704674f6 Revert of remove drawSprite from canvas (patchset #4 id:60001 of https://codereview.chromium.org/1534443003/ )
Reason for revert:
need to remove an override in chrome

Original issue's description:
> remove drawSprite from canvas
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4657ce2324ea197507c4ba728d81138f56da13b1

TBR=fmalita@chromium.org,robertphillips@google.com,senorblanco@chromium.org,mtklein@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1529803004
2015-12-16 08:27:10 -08:00