Commit Graph

3368 Commits

Author SHA1 Message Date
egdaniel
ad3a13c4c3 Revert of Add vulkan files into skia repo. (patchset #2 id:20001 of https://codereview.chromium.org/1718693002/ )
Reason for revert:
breaking builds

Original issue's description:
> Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time.
>
> R=robertphillips@google.com
> TBR=bsalomon@google.com
>
> BUG=skia:4955
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1718693002
>
> Committed: https://skia.googlesource.com/skia/+/48cf268defad66f58f1aa03b4835e5583be96b2f

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

Review URL: https://codereview.chromium.org/1723503002
2016-02-22 06:17:53 -08:00
Greg Daniel
48cf268def Add vulkan files into skia repo. This is an incomplete backend with only partial functionality at this time.
R=robertphillips@google.com
TBR=bsalomon@google.com

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

Review URL: https://codereview.chromium.org/1718693002
2016-02-22 09:11:32 -05:00
mtklein
03762fea75 fix race: this kCacheSize is probably not meant to be static
TSAN sees us racing to intialize the static const kCacheSize.

This static const value depends on the runtime value image->getSize(), so there
is a race to set it.  I think this is unintentionally copy-paste from the other
tests that use a constant kCacheSize.  It's weird to intialize a constant based
on the first call to test_internal_purge(), though luckily we're always calling
it with same sized images today.

See these TSAN failures:
    https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN/builds/4937
    https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN/builds/4940/steps/dm/logs/stdio

TBR=robertphillips@google.com

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

Review URL: https://codereview.chromium.org/1720743002
2016-02-21 13:36:50 -08:00
mtklein
7c249e5319 SkNx: kth<...>() -> [...]
Just some syntax cleanup.  No real change: kth<...>() was calling [...] already.

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

Review URL: https://codereview.chromium.org/1714363002
2016-02-21 10:54:19 -08:00
herb
f5d4746ad7 Fix asserts found in SampleApp and update the tests with additional interesting numbers.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1717743004

Review URL: https://codereview.chromium.org/1717743004
2016-02-19 16:54:12 -08:00
herb
3eb4895ea1 Add point spans, but fall back for all cases.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1711963003

curr/maxrss     loops   min     median  mean    max     stddev  samples                 config  bench
  10/10  MB     1       481µs   504µs   512µs   580µs   6%      ▁▁▄▆▂▃▁▁▁▁▁▁▃▇█▅▃█▃▅    nonrendering    SkBitmapFPAffineXClampYClampFilterOrig
  10/10  MB     1       2.21ms  2.31ms  2.31ms  2.53ms  4%      ▁▁▆▃▃▃▄▅▂▁▄▁█▅▁▁▄▂▆▁    nonrendering    SkBitmapFPAffineXClampYClampFilterLinr
  10/10  MB     1       2.49ms  2.63ms  2.61ms  2.78ms  4%      ▄▃▇▄▅▇▆▁▆▁▁▁▅▂▁▄▃█▆▃    nonrendering    SkBitmapFPAffineXClampYClampFiltersRGB
  10/10  MB     2       150µs   151µs   153µs   162µs   2%      ▅▇▂▂▁▁▂▂▁▁▂▂▁▁▁▁▇█▂▁    nonrendering    SkBitmapFPAffineXClampYClampNearestOrig
  10/10  MB     1       552µs   553µs   562µs   658µs   4%      ▁▁▁▁▁▁▁▁▁▄▃▁▁▁▁▁▁▁▁█    nonrendering    SkBitmapFPAffineXClampYClampNearestLinr
  10/10  MB     1       718µs   742µs   748µs   808µs   4%      ▃▃▁▁▅▁▁▁▁▃▃▃▃▇▇▇▁▁▇█    nonrendering    SkBitmapFPAffineXClampYClampNearestsRGB
  10/10  MB     1       277µs   286µs   292µs   341µs   7%      █▁▁▁▁▁▁▁▁▁▃▂▃▃▆█▄▂▂▂    nonrendering    SkBitmapFPScaleXClampYClampFilterOrig
  10/10  MB     1       2.21ms  2.41ms  2.39ms  2.55ms  4%      ▄▆▃▅▇▂▁▁▇▅▆▅▅▆▄▅█▅▆▅    nonrendering    SkBitmapFPScaleXClampYClampFilterLinr
  10/10  MB     1       2.55ms  2.68ms  2.69ms  2.94ms  4%      ▂▃▁▁▄▄▅▅▄▃█▄▃▇▂▁▃▃▂▂    nonrendering    SkBitmapFPScaleXClampYClampFiltersRGB
  10/10  MB     4       59.9µs  60.6µs  61.6µs  71.1µs  5%      ▂▃▄▁▁▁▁█▇▁▂▁▁▁▁▁▁▁▁▁    nonrendering    SkBitmapFPScaleXClampYClampNearestOrig
  10/10  MB     1       534µs   560µs   559µs   613µs   5%      ▇▂▁▅▅▅█▅▅▃▁▁▁▁▂▄▅▁▁▁    nonrendering    SkBitmapFPScaleXClampYClampNearestLinr
  10/10  MB     1       639µs   658µs   666µs   731µs   5%      ▅█▃▂▃▇▆▁▁▁▁▁▂▁▁▁▁▄█▄    nonrendering    SkBitmapFPScaleXClampYClampNearestsRGB
  10/10  MB     4       61.6µs  65.7µs  65.5µs  70.4µs  5%      ▃▃▃█▆▆▂▂▂▅▄▄▇▄▁▂▁▄██    nonrendering    SkBitmapFPIdentityXClampYClampFilterOrig
  10/10  MB     1       2.22ms  2.34ms  2.35ms  2.57ms  3%      ▂█▅▄▃▃▃▄▂▄▄▄▂▄▁▆▃▁▄▃    nonrendering    SkBitmapFPIdentityXClampYClampFilterLinr
  10/10  MB     1       2.42ms  2.52ms  2.52ms  2.76ms  4%      ▁▁▄▂▄▄▃▅█▄▅▁▃▁▁▃▁▄▃▃    nonrendering    SkBitmapFPIdentityXClampYClampFiltersRGB
  10/10  MB     4       59.7µs  64.7µs  64.8µs  73.3µs  7%      ▂▂▄▁▂▁▁▂▁▁▆▄▆▆▇▄▆▇▂█    nonrendering    SkBitmapFPIdentityXClampYClampNearestOrig
  10/10  MB     1       376µs   388µs   387µs   429µs   4%      ▃▃▆▁▄▄▁▃█▁▁▁▁▁▃▃▄▁▁▁    nonrendering    SkBitmapFPIdentityXClampYClampNearestLinr
  10/10  MB     1       496µs   511µs   518µs   568µs   5%      ▂▆▆█▆▃▂▂█▇▃▁▁▁▁▁▁▁▁▁    nonrendering    SkBitmapFPIdentityXClampYClampNearestsRGB

Review URL: https://codereview.chromium.org/1711963003
2016-02-19 14:39:47 -08:00
reed
c5b1228141 remove supports4f flag for colorfilters
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1720443002

Review URL: https://codereview.chromium.org/1720443002
2016-02-19 13:38:53 -08:00
robertphillips
cbc5bccebe Add GPU-backed SkImage case to ImageFilterCache unit test
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713073002

Review URL: https://codereview.chromium.org/1713073002
2016-02-19 10:41:13 -08:00
robertphillips
df7bb471e5 Update SkImageFilter's cache to handle SkSpecialImages and add unit test
This is calved off of: https://codereview.chromium.org/1695823002/ (Get OffsetImageFilter really working with SkSpecialImages)

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

Review URL: https://codereview.chromium.org/1709263002
2016-02-19 08:19:40 -08:00
herb
ed545042fc Switch to pixmap in API.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1712653002

Review URL: https://codereview.chromium.org/1712653002
2016-02-18 13:55:02 -08:00
reed
dd9ffea9ce make SkPM4f private
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1713653002

Review URL: https://codereview.chromium.org/1713653002
2016-02-18 12:39:14 -08:00
robertphillips
3b087f4010 Update SkSpecialImage API
This adds some temporary compatibility features:
   internal_getBM & internal_fromBM - to convert back & forth from Bitmaps in the ImageFilters
   internal_getProxy - to allow the special images to interface with the current ImagerFilter system

It also adds a unique ID, opaque flag and size method.
   The unique ID and size method are needed for the image filter's caching system.
   The opaque flag is need for swapping back & forth from Bitmaps

These are all calved off of https://codereview.chromium.org/1695823002/ (Get OffsetImageFilter really working with SkSpecialImages) which actually makes use of them.

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

Review URL: https://codereview.chromium.org/1705113002
2016-02-18 08:48:04 -08:00
scroggo
ef0fed3bf0 Remove position from FrontBufferedStream
When FrontBufferedStream was written, it implemented getPosition()
and returned true for hasPosition(). The CL that introduced it
(crrev.com/23717055) does not have any indication why, but I'm guessing
it was because it was easy to implement. None of our decoders rely on
this (only some tests do).

Now that we have a decoder (SkRawCodec) that expects to be able to seek
a stream if it has a position (which makes sense - SkStream.h
associates that with SkStreamSeekable, and there is no other way to
check to see if a stream is seekable), it is failing because
FrontBufferedStream reports it has a position and the decoder tries to
seek.

Remove FrontBufferedStream::hasPosition() (reverting to the default,
false) and ::getPosition() (so it will return 0).

Fix tests - do not call FrontBufferedStream::getPosition()

Update CodexTest to test using an FrontBufferedStream, like Android
does.

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

Review URL: https://codereview.chromium.org/1703293002
2016-02-18 05:59:25 -08:00
caryclark
8e7b19d0f0 add interp path
Add path methods to determine if a pair of paths
can be interpolated, and to interpolate them.

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

Review URL: https://codereview.chromium.org/1703943003
2016-02-18 04:11:49 -08:00
herb
c5eddd7d8d Add bilerp filtering.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1705203002

Review URL: https://codereview.chromium.org/1705203002
2016-02-17 19:50:05 -08:00
cblume
e2412d5738 Adding direct access to SkMipMap levels.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1639693002

Review URL: https://codereview.chromium.org/1639693002
2016-02-17 14:53:23 -08:00
robertphillips
48e78468f5 Mark existing image filter entry points that will be going away with Deprecated
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1709753002

Review URL: https://codereview.chromium.org/1709753002
2016-02-17 13:57:17 -08:00
msarett
82709da122 Delete KTX tests to fix Android build
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1707053002

Review URL: https://codereview.chromium.org/1707053002
2016-02-17 13:10:14 -08:00
msarett
8715d47e24 Make SkPicture/SkImageGenerator default to SkCodec
Remove reference to SkImageDecoder from SkPicture. Make the default
InstallPixelRefProc passed to CreateFromStream use
SkImageGenerator::NewFromEncoded instead.

Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
Remove the old version that used SkImageDecoder.

Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
now behaves lazily.

Update all clients to use the default.

Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.

This is a rebased version of:
https://codereview.chromium.org/1671193002/

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1699183004
2016-02-17 10:02:29 -08:00
herb
feec878e85 Simplified linear pipeline.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1704583003

Review URL: https://codereview.chromium.org/1704583003
2016-02-17 10:00:07 -08:00
ebrauer
46d2aa824c Updates Piex and uses it to obtain the DNG dimensions.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1659873002

Review URL: https://codereview.chromium.org/1659873002
2016-02-17 08:04:00 -08:00
mtklein
0cf795fd11 fast sk4f <-> sk4i SSE methods
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1707673002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1707673002
2016-02-17 07:23:36 -08:00
mtklein
048494c1e2 clean up more dead code
- SkSHA1 is unused
  - SkRunnable is obsolete now that we have std::function

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

Review URL: https://codereview.chromium.org/1705583003
2016-02-16 19:06:15 -08:00
mtklein
f60a8908d2 Delete dead code. SkBitmapHasher has not been used since gm.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1704783002

Review URL: https://codereview.chromium.org/1704783002
2016-02-16 18:38:15 -08:00
robertphillips
e8c34974c4 Change signature of SkSpecialImage::draw to take SkScalars
Review URL: https://codereview.chromium.org/1704603002
2016-02-16 12:09:37 -08:00
bsalomon
b8fea97a7a Make copySurface work for texture dsts, return a bool, & add unit test.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002

Committed: https://skia.googlesource.com/skia/+/7ea5e28065e5eb797e95f5d81c1a65cf3209d741

Review URL: https://codereview.chromium.org/1684313002
2016-02-16 07:34:17 -08:00
scroggo
9dec5d2acd Make SkRWBuffer destruct safely
Check for NULL before calling unref.

Add a test.

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

Review URL: https://codereview.chromium.org/1691383002
2016-02-16 06:59:18 -08:00
msarett
829caa2f6b Delete SkDecodingImageGenerator
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1692053002

Review URL: https://codereview.chromium.org/1692053002
2016-02-11 14:17:17 -08:00
mtklein
ddb64c81fb new version of SkHalfToFloat_01
This is a little faster than the previous version, and much better explained.

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

Review URL: https://codereview.chromium.org/1688233002
2016-02-11 12:48:23 -08:00
kjlubick
0eed945294 Revert of Make copySurface work for texture dsts, return a bool, & add unit test. (patchset #6 id:100001 of https://codereview.chromium.org/1684313002/ )
Reason for revert:
Copy surface tests are not happy for Windows, Android and probably others:
https://uberchromegw.corp.google.com/i/client.skia.android/builders/Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release/builds/4161
https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Release/builds/3694

Original issue's description:
> Make copySurface work for texture dsts, return a bool, & add unit test.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002
>
> Committed: https://skia.googlesource.com/skia/+/7ea5e28065e5eb797e95f5d81c1a65cf3209d741

TBR=robertphillips@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/1690053002
2016-02-11 12:05:24 -08:00
bsalomon
7ea5e28065 Make copySurface work for texture dsts, return a bool, & add unit test.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684313002

Review URL: https://codereview.chromium.org/1684313002
2016-02-11 11:42:31 -08:00
scroggo
bed1ed6eac Test SkAndroidCodec for more types
Now that SkAndroidCodec supports all types, stop selectively running
its tests for the types supported by BRD.

For the tests that actually require BRD support (i.e. partial
scanlines), change the method name from supports_scaled_codec to
supports_partial_scanlines to be more accurate today.

Use the name SkAndroidCodec instead of SkScaledCodec.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691823002

Review URL: https://codereview.chromium.org/1691823002
2016-02-11 10:24:55 -08:00
msarett
4946b9419f Fix scanline decoding of rare RLE bmps
This also exposed a bug in rewinding RLE bmps, which I have also
fixed in this CL.

This should fix testcase7.bmp on Gold.

The image that I am adding to resources is in the
public domain.

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

Review URL: https://codereview.chromium.org/1689953002
2016-02-11 08:41:01 -08:00
halcanary
7001576c71 SkDocument: remove use of SkTArray (part 1/3).
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1689683002

Review URL: https://codereview.chromium.org/1689683002
2016-02-11 07:59:59 -08:00
mtklein
fff055cc5f SkHalfToFloat_01 / SkFloatToHalf_01
These are basically inlined, 4-at-a-time versions of our existing functions,
but cut down to avoid any work that's only necessary outside [0,1].

Both f16 and f32 denorms should work fine modulo the usual ARMv7 NEON denorm==zero caveat.

In exchange for a little speed, f32->f16 does not round properly.
Instead it truncates, so it's never off by more than 1 bit.

Support for finite values >1 or <0 is straightforward to add back.
>1 might already work as-is.

Getting close to _u16 performance:
    micros   	bench
    261.13  	xferu64_bw_1_opaque_u16
   1833.51  	xferu64_bw_1_alpha_u16
   2762.32 ?	xferu64_aa_1_opaque_u16
   3334.29  	xferu64_aa_1_alpha_u16
    249.78  	xferu64_bw_1_opaque_f16
   3383.18  	xferu64_bw_1_alpha_f16
   4214.72  	xferu64_aa_1_opaque_f16
   4701.19  	xferu64_aa_1_alpha_f16

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

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

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

Review URL: https://codereview.chromium.org/1685133005
2016-02-11 06:30:03 -08:00
mtklein
cbefc5e4ca Revert of SkHalfToFloat_01 / SkFloatToHalf_01 (patchset #11 id:200001 of https://codereview.chromium.org/1685133005/ )
Reason for revert:
Gotta fix Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD

Original issue's description:
> SkHalfToFloat_01 / SkFloatToHalf_01
>
> These are basically inlined, 4-at-a-time versions of our existing functions,
> but cut down to avoid any work that's only necessary outside [0,1].
>
> Both f16 and f32 denorms should work fine modulo the usual ARMv7 NEON denorm==zero caveat.
>
> In exchange for a little speed, f32->f16 does not round properly.
> Instead it truncates, so it's never off by more than 1 bit.
>
> Support for finite values >1 or <0 is straightforward to add back.
> >1 might already work as-is.
>
> Getting close to _u16 performance:
>     micros   	bench
>     261.13  	xferu64_bw_1_opaque_u16
>    1833.51  	xferu64_bw_1_alpha_u16
>    2762.32 ?	xferu64_aa_1_opaque_u16
>    3334.29  	xferu64_aa_1_alpha_u16
>     249.78  	xferu64_bw_1_opaque_f16
>    3383.18  	xferu64_bw_1_alpha_f16
>    4214.72  	xferu64_aa_1_opaque_f16
>    4701.19  	xferu64_aa_1_alpha_f16
>
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685133005
>
> Committed: https://skia.googlesource.com/skia/+/9ea11a4235b3e3521cc8bf914a27c2d0dc062db9

TBR=jvanverth@google.com,reed@google.com,mtklein@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/1693443003
2016-02-11 06:00:49 -08:00
mtklein
9ea11a4235 SkHalfToFloat_01 / SkFloatToHalf_01
These are basically inlined, 4-at-a-time versions of our existing functions,
but cut down to avoid any work that's only necessary outside [0,1].

Both f16 and f32 denorms should work fine modulo the usual ARMv7 NEON denorm==zero caveat.

In exchange for a little speed, f32->f16 does not round properly.
Instead it truncates, so it's never off by more than 1 bit.

Support for finite values >1 or <0 is straightforward to add back.
>1 might already work as-is.

Getting close to _u16 performance:
    micros   	bench
    261.13  	xferu64_bw_1_opaque_u16
   1833.51  	xferu64_bw_1_alpha_u16
   2762.32 ?	xferu64_aa_1_opaque_u16
   3334.29  	xferu64_aa_1_alpha_u16
    249.78  	xferu64_bw_1_opaque_f16
   3383.18  	xferu64_bw_1_alpha_f16
   4214.72  	xferu64_aa_1_opaque_f16
   4701.19  	xferu64_aa_1_alpha_f16

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

Review URL: https://codereview.chromium.org/1685133005
2016-02-11 05:56:08 -08:00
erikchen
9a1ed5d81d skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

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

Review URL: https://codereview.chromium.org/1623653002
2016-02-10 16:32:35 -08:00
kjlubick
1de415f2c3 Revert of Make SkPicture/SkImageGenerator default to SkCodec (patchset #7 id:120001 of https://codereview.chromium.org/1671193002/ )
Reason for revert:
Breaks Ubuntu and Mac CMAKE

Original issue's description:
> Make SkPicture/SkImageGenerator default to SkCodec
>
> Remove reference to SkImageDecoder from SkPicture. Make the default
> InstallPixelRefProc passed to CreateFromStream use
> SkImageGenerator::NewFromEncoded instead.
>
> Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
> Remove the old version that used SkImageDecoder.
>
> Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
> now behaves lazily.
>
> Update all clients to use the default.
>
> Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.
>
> BUG=skia:4691
> BUG=skia:4290
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1671193002
>
> Committed: https://skia.googlesource.com/skia/+/026388a01864c74208ad57d1ba4f711602d101c6

TBR=msarett@google.com,reed@google.com,scroggo@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4691

Review URL: https://codereview.chromium.org/1685963004
2016-02-10 11:25:07 -08:00
scroggo
026388a018 Make SkPicture/SkImageGenerator default to SkCodec
Remove reference to SkImageDecoder from SkPicture. Make the default
InstallPixelRefProc passed to CreateFromStream use
SkImageGenerator::NewFromEncoded instead.

Make SkImageGenerator::NewFromEncoded create an SkCodecImageGenerator.
Remove the old version that used SkImageDecoder.

Remove all versions of lazy_decode_bitmap/LazyDecodeBitmap. The default
now behaves lazily.

Update all clients to use the default.

Move SkImageDecoderGenerator into KtxTest.cpp, and use it directly.

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

Review URL: https://codereview.chromium.org/1671193002
2016-02-10 11:15:21 -08:00
caryclark
64e7533091 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #19 id:380001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
Breaks ASAN bot:

Direct leak of 56 byte(s) in 1 object(s) allocated from:
...
test_CustomTexture

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Debug-ASAN/builds/2676/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b
>
> Committed: https://skia.googlesource.com/skia/+/b8d6e088590160f1198110c2371b802c1d541a36

TBR=bsalomon@chromium.org,cblume@chromium.org,bsalomon@google.com,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1684993002
2016-02-09 16:28:46 -08:00
mtklein
126626e523 Sk4f: add floor()
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685773002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/86c6c4935171a1d2d6a9ffbff37ec6dac1326614

CQ_EXTRA_TRYBOTS=client.skia.android:Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release-Trybot,Test-Android-GCC-Nexus9-GPU-TegraK1-Arm64-Release-Trybot

Review URL: https://codereview.chromium.org/1685773002
2016-02-09 15:41:36 -08:00
mtklein
c023210893 Revert of Sk4f: add floor() (patchset #3 id:40001 of https://codereview.chromium.org/1685773002/ )
Reason for revert:
build break must be this, right?

Original issue's description:
> Sk4f: add floor()
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685773002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/86c6c4935171a1d2d6a9ffbff37ec6dac1326614

TBR=herb@google.com,mtklein@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/1679343004
2016-02-09 15:10:56 -08:00
mtklein
86c6c49351 Sk4f: add floor()
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1685773002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1685773002
2016-02-09 13:46:49 -08:00
erikchen
b8d6e08859 skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

Review URL: https://codereview.chromium.org/1623653002
2016-02-09 13:30:55 -08:00
bungeman
85dc359f74 Remove SkNEW_APPEND_TO_TARRAY.
The use of SkNEW_APPEND_TO_TARRAY is now better served by
SkTArray::emplace_back(...) which should now be used instead. The
existing users of SkNEW_APPEND_TO_TARRAY are converted and the code
relating to SkNEW_APPEND_TO_TARRAY is removed.

TBR=reed
This only removes code. The file should also be made private.

Review URL: https://codereview.chromium.org/1682083002
2016-02-09 11:32:56 -08:00
mtklein
e4c0beed74 sknx refactoring
- trim unused specializations (Sk4i, Sk2d) and apis (SkNx_dup)
  - expand apis a little
    * v[0] == v.kth<0>()
    * SkNx_shuffle can now convert to different-sized vectors, e.g. Sk2f <-> Sk4f
  - remove anonymous namespace

I believe it's safe to remove the anonymous namespace right now.
We're worried about violating the One Definition Rule; the anonymous namespace protected us from that.

In Release builds, this is mostly moot, as everything tends to inline completely.
In Debug builds, violating the ODR is at worst an inconvenience, time spent trying to figure out why the bot is broken.

Now that we're building with SSE2/NEON everywhere, very few bots have even a chance about getting confused by two definitions of the same type or function.  Where we do compile variants depending on, e.g., SSSE3, we do so in static inline functions.  These are not subject to the ODR.

I plan to follow up with a tedious .kth<...>() -> [...] auto-replace.

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

Review URL: https://codereview.chromium.org/1683543002
2016-02-09 10:35:28 -08:00
caryclark
f1d415188f Add unit test to feed valid SVG sequences to make sure that
path strings can be parsed without returning an error.

Draw the output through Skia and SVG to make sure they are
parsed correctly.

R=fmalita@chromium.org
BUG=skia:4549
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1675053002

Review URL: https://codereview.chromium.org/1675053002
2016-02-09 10:30:22 -08:00
fmalita
33ed3ad9f6 Relocate anisotropic mipmap logic to SkMipMap::extractLevel()
Pass a full x/y scale and defer the anisotropic heuristic to SkMipMap.

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

Review URL: https://codereview.chromium.org/1686563002
2016-02-09 08:20:19 -08:00
mtklein
a525cb151b skeleton for float <-> half optimized procs
Nothing fancy yet, just calls the serial code in a loop.

I will try to folow this up with at least some of:
   - SSE2 version of serial code
   - NEON version of serial code
   - NEON version using vcvt.f32.f16/vcvt.f16.f32
   - F16C (between AVX and AVX2) version using vcvtph2ps/vcvtps2ph
The last two are fastest but need runtime detection.

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

Review URL: https://codereview.chromium.org/1686543003
2016-02-09 08:18:10 -08:00
reed
3125565804 extend modecolorfilter to 4f
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1670063002

Review URL: https://codereview.chromium.org/1670063002
2016-02-08 12:56:57 -08:00
mtklein
629f25a7ef fix float <---> uint16_t conversion, with Mike's tests.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1679713002

patch from issue 1679713002 at patchset 1 (http://crrev.com/1679713002#ps1)
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review URL: https://codereview.chromium.org/1676893002
2016-02-08 05:54:38 -08:00
mtklein
2afbe23753 msan: initialize buffer BlurLargeImage blurs
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

BUG=skia:

Review URL: https://codereview.chromium.org/1676103002
2016-02-07 12:23:10 -08:00
bsalomon
f1036b2c66 Revert of skia: Add support for CHROMIUM_image backed textures. (patchset #17 id:340001 of https://codereview.chromium.org/1623653002/ )
Reason for revert:
New unit test is failing on Windows ANGLE bots:
http://build.chromium.org/p/client.skia/builders/Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-ANGLE/builds/1866/steps/dm/logs/stdio

Original issue's description:
> skia: Add support for CHROMIUM_image backed textures.
>
> I created a new abstract base class TextureStorageAllocator that consumers of
> Skia can subclass and pass back to Skia. When a surface is created with a
> pointer to a TextureStorageAllocator, any textures it creates, or that are
> derived from the original surface, will allocate and deallocate storage using
> the methods on TextureStorageAllocator.
>
> BUG=https://code.google.com/p/chromium/issues/detail?id=579664
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002
>
> Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55
>
> Committed: https://skia.googlesource.com/skia/+/7fec91ce6660190f8d7c5eb6f3061e4550cc672b

TBR=bsalomon@chromium.org,cblume@chromium.org,robertphillips@google.com,egdaniel@google.com,reed@google.com,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=https://code.google.com/p/chromium/issues/detail?id=579664

Review URL: https://codereview.chromium.org/1673923003
2016-02-05 17:56:39 -08:00
bsalomon
2fba809120 Fix memory leaks in SurfaceClear_Gpu test
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1672083002

Review URL: https://codereview.chromium.org/1672083002
2016-02-05 13:47:06 -08:00
erikchen
7fec91ce66 skia: Add support for CHROMIUM_image backed textures.
I created a new abstract base class TextureStorageAllocator that consumers of
Skia can subclass and pass back to Skia. When a surface is created with a
pointer to a TextureStorageAllocator, any textures it creates, or that are
derived from the original surface, will allocate and deallocate storage using
the methods on TextureStorageAllocator.

BUG=https://code.google.com/p/chromium/issues/detail?id=579664
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1623653002

Committed: https://skia.googlesource.com/skia/+/92098e691f10a010e7421125ba4d44c02506bb55

Review URL: https://codereview.chromium.org/1623653002
2016-02-05 12:10:55 -08:00
reed
3601f280dc add kRGBA_F16_SkColorType
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1666343002

Review URL: https://codereview.chromium.org/1666343002
2016-02-05 11:18:39 -08:00
yujieqin
9c7a8a4648 Optimize the SkRawStream when the input is an asset stream
BUG=b/26841494
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1645963002

Review URL: https://codereview.chromium.org/1645963002
2016-02-05 08:21:19 -08:00
bsalomon
e63ffef624 Remove deferred clear from SkGpuDevice
Add combining to GrClearBatch

Fix issue with state tracking in GrGLGpu::createTestingOnlyBackendTexture

Add tests for clearing GPU SkSurfaces and add tests for GrDrawContext::clear().

Add comment that SkCanvas::flush will resolve the RT in the GPU case.

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

Review URL: https://codereview.chromium.org/1658823002
2016-02-05 07:17:34 -08:00
robertphillips
b6c65e9995 Add SkSpecialImage & SkSpecialSurface classes
Initial classes.

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

Review URL: https://codereview.chromium.org/1579323002
2016-02-04 10:52:42 -08:00
scroggo
7b5e5536a1 Add SkAndroidCodec::getPixels
This is a synonym for the version of getAndroidPixels that accepts
only three parameters (i.e. no AndroidOptions). It is very similar
to SkCodec::getPixels, so I think the motivation for naming the
version with options differently does not apply here.

Add comments to the header describing defaults.

Update the test to use a template, and delete a lot of redundant code.

Rename a variable to stop shadowing another variable.

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

Review URL: https://codereview.chromium.org/1647153002
2016-02-04 06:14:24 -08:00
robertphillips
9cdb9920fc Clean up GrGLSLFragmentProcessor-derived classes
In some other patches it was observed that many of the GrGLSLFragmentProcessor-derived classes needlessly pass a parameter to their constructors.

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

Review URL: https://codereview.chromium.org/1666773002
2016-02-03 12:25:40 -08:00
scroggo
c5560bef14 Support decoding opaque to *premul
If a client requests unpremul or premul from an opaque SkCodec,
support it. The opaque image can be treated as any of them, though
it will be less efficient to draw than if the client had used
opaque.

Change the filling code (i.e. for incomplete images) to base its color on
the source alpha type. Prior to adding the support to decode opaque to
any, it was fine to use either source or dest (which would have yielded
the same result). If the client requests non-opaque, we do not want this
to switch the fill value from black to transparent. This also allows
simplifying the signatures for getFillValue and onGetFillValue.

In CodexTest, expect the same result when decoding opaque to *premul,
and compare to the opaque version.

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

Review URL: https://codereview.chromium.org/1641273003
2016-02-03 09:42:42 -08:00
senorblanco
afc7cce5d6 Fix for rounded-rect clips with filters.
Don't use the base canvas size to limit raster of complex clips, since
the top canvas size may actually be larger (e.g., a blur filter which
expands the clip bounds to accommodate filter margins). Use the top
canvas bounds instead.

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

Review URL: https://codereview.chromium.org/1657333002
2016-02-02 18:44:16 -08:00
Brian Salomon
2ea6ff7f0d Fix printfs for Windows and undo speculative test disable
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1662533002

Review URL: https://codereview.chromium.org/1662533002 .
2016-02-02 11:34:46 -05:00
Brian Salomon
be0fcb10f1 Speculative fix for windows builders
TBR=robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1651303002

Review URL: https://codereview.chromium.org/1651303002 .
2016-02-01 18:41:58 -05:00
Brian Salomon
a64afd6680 Disable test that is breaking Android and Windows bots.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654283002
BUG=skia:

R=robertphillips@google.com

Review URL: https://codereview.chromium.org/1654283002 .
2016-02-01 16:44:22 -05:00
bsalomon
9d02b264b7 Fix GL readback code to handle rowbytes correctly for non-32bit formats
Update tests to exercise more rowbytes.

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

Review URL: https://codereview.chromium.org/1645043006
2016-02-01 12:49:30 -08:00
bsalomon
8610002ff8 Move SkColorMatrixFilter implementation to core.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648933002

Review URL: https://codereview.chromium.org/1648933002
2016-02-01 12:09:07 -08:00
ethannicholas
3b7af78e81 added a default constructor for GrBatchToXPOverrides
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657803002

Review URL: https://codereview.chromium.org/1657803002
2016-02-01 11:45:45 -08:00
ethannicholas
975765c60a fix for GrPorterDuffTest valgrind error
BUG=skia:4875
TBR=bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1656873002

Review URL: https://codereview.chromium.org/1656873002
2016-02-01 08:07:39 -08:00
bsalomon
8e74f80ca1 Add SkImage factory method that forces image to be resolved to a texture.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1631053003

Review URL: https://codereview.chromium.org/1631053003
2016-01-30 10:01:40 -08:00
reed
9cd016e9b6 allow the caller to specified raster-surface rowbytes.
along the way, simplify how we copy the surface's bitmap

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

Review URL: https://codereview.chromium.org/1643873002
2016-01-30 10:01:06 -08:00
ethannicholas
2279325d53 added support for PLS path rendering
BUG=skia:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002

Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822

Review URL: https://codereview.chromium.org/1541903002
2016-01-30 09:59:10 -08:00
caryclark
703348f5fa fix teeny dashed path bug
If the path dashed is sufficiently small, there may be no
segments generated to dash. Check for an empty segment list.

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

Review URL: https://codereview.chromium.org/1645613006
2016-01-29 09:54:20 -08:00
djsollen
f2b340fc88 Consolidate SK_CRASH and sk_throw into SK_ABORT
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1648343003

Review URL: https://codereview.chromium.org/1648343003
2016-01-29 08:51:04 -08:00
mtklein
bbb6dc80fd kill SkValue
This is clearly not what we're going to do.

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1643753002
2016-01-27 13:08:33 -08:00
mtklein
a766ca87bf de-proc sk_float_rsqrt
This is the first of many little baby steps to have us stop runtime-detecting NEON.

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

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

Review URL: https://codereview.chromium.org/1616013003
2016-01-26 07:40:30 -08:00
bsalomon
e9573317d3 Make A8 readbacks work from non-A8 surfaces
Expand testing of A8 readbacks.

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

Review URL: https://codereview.chromium.org/1613903005
2016-01-25 14:33:25 -08:00
msarett
8e49ca33b0 Disable RAW test when SkRawCodec is not compiled
TBR=scroggo@google.com

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

Review URL: https://codereview.chromium.org/1639533002
2016-01-25 13:10:58 -08:00
msarett
02cb4d469a Disable RAW test on Chrome OS, Windows
TBR=scroggo@google.com

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

Review URL: https://codereview.chromium.org/1633763002
2016-01-25 11:01:34 -08:00
yujieqin
916de9ff18 Add RAW decoding into Skia.
TBR=reed@google.com

BUG=skia:

(Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
(Based on the work from adaubert in https://codereview.chromium.org/1494003003)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003

Committed: https://skia.googlesource.com/skia/+/6bd8639f8c142eedf543f4e5f3b02d2bf11df308

Review URL: https://codereview.chromium.org/1520403003
2016-01-25 08:26:16 -08:00
msarett
c85a9fde77 Revert of Prototype of RAW decoding in Skia. (patchset #32 id:610001 of https://codereview.chromium.org/1520403003/ )
Reason for revert:
A few build failures on Chrome OS/Android.

Original issue's description:
> Add RAW decoding into Skia.
>
> TBR=reed@google.com
>
> BUG=skia:
>
> (Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
> (Based on the work from adaubert in https://codereview.chromium.org/1494003003)
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003
>
> Committed: https://skia.googlesource.com/skia/+/6bd8639f8c142eedf543f4e5f3b02d2bf11df308

TBR=scroggo@google.com,adaubert@google.com,yujieqin@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/1635443002
2016-01-25 06:05:19 -08:00
yujieqin
6bd8639f8c Add RAW decoding into Skia.
TBR=reed@google.com

BUG=skia:

(Based on the work from ebrauer in https://codereview.chromium.org/1459473007)
(Based on the work from adaubert in https://codereview.chromium.org/1494003003)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1520403003

Review URL: https://codereview.chromium.org/1520403003
2016-01-25 05:29:03 -08:00
mtklein
1138be45ea Revert of skstd -> std for unique_ptr (patchset #24 id:460001 of https://codereview.chromium.org/1436033003/ )
Reason for revert:
Still need an answer for SkAdvancedTypefaceMetrics (at least for Google3 iOS build).

Original issue's description:
> skstd -> std for unique_ptr
>
> TBR=reed@google.com
> No public API changes.
>
> BUG=skia:4564
>
> Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50
>
> CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot,Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065
>
> Committed: https://skia.googlesource.com/skia/+/70e8dfca4a7f5bce97b8021a6e378c4828b09c8c
>
> Committed: https://skia.googlesource.com/skia/+/dadfc245cc9a0279ff7b73da3344f2ca5d139907
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1436033003
>
> Committed: https://skia.googlesource.com/skia/+/ccf1de0d9aa75f29829f1c4c462214b991fd8c9e

TBR=bungeman@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4564

Review URL: https://codereview.chromium.org/1626873004
2016-01-24 19:49:24 -08:00
mtklein
ccf1de0d9a skstd -> std for unique_ptr
TBR=reed@google.com
No public API changes.

BUG=skia:4564

Committed: https://skia.googlesource.com/skia/+/755c553c17b82bb5de3d9cc8d3b2a866ff9e9e50

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link-Trybot;client.skia:Perf-Mac10.9-Clang-MacMini6.2-CPU-AVX-x86_64-Release-Trybot,Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Release-Trybot

Committed: https://skia.googlesource.com/skia/+/06189155d987db5c7e69015f6ea87c2168d6a065

Committed: https://skia.googlesource.com/skia/+/70e8dfca4a7f5bce97b8021a6e378c4828b09c8c

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

Review URL: https://codereview.chromium.org/1436033003
2016-01-24 19:18:54 -08:00
reed
3b69b82b22 add 4f support to colorfiltershader
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1625263002

TBR=

Review URL: https://codereview.chromium.org/1625263002
2016-01-24 11:15:14 -08:00
reed
7f225cf32e Revert[2] of expand unitests for color4f
This reverts commit 5f34e8ed82.

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

TBR=

Review URL: https://codereview.chromium.org/1622983002
2016-01-23 19:37:56 -08:00
reed
5f34e8ed82 Revert of expand unitests for color4f (patchset #1 id:1 of https://codereview.chromium.org/1622893002/ )
Reason for revert:
leaking shadercontext in test

Original issue's description:
> expand unitests for color4f
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1622893002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/fac684502b6047ffc7dc2e59bd7e5a7cbfa5bf78

TBR=
# 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/1622923002
2016-01-23 14:19:06 -08:00
reed
fac684502b expand unitests for color4f
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1622893002

TBR=

Review URL: https://codereview.chromium.org/1622893002
2016-01-23 10:15:39 -08:00
msarett
b714fb0199 Add getYUV8Planes() API to SkCodec
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1549473003

Review URL: https://codereview.chromium.org/1549473003
2016-01-22 14:46:42 -08:00
herb
97293c6ce7 Change name from ScaleToSides to SkScaleToSides.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1618283004

Review URL: https://codereview.chromium.org/1618283004
2016-01-22 11:58:55 -08:00
mtklein
ed814f34c7 Revert of de-proc sk_float_rsqrt (patchset #3 id:40001 of https://codereview.chromium.org/1616013003/ )
Reason for revert:
This is somehow blocking the Google3 roll in ways neither Ben nor I understand.  Precautionary revert... will try again Monday.

Original issue's description:
> de-proc sk_float_rsqrt
>
> This is the first of many little baby steps to have us stop runtime-detecting NEON.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1616013003
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/efcc125acd2d71eb077caf6db65fdd6b9eb1dc0d

TBR=reed@google.com,mtklein@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/1629503002
2016-01-22 11:51:40 -08:00
ethannicholas
5366a09ed0 Revert of added support for PLS path rendering (patchset #16 id:360001 of https://codereview.chromium.org/1541903002/ )
Reason for revert:
ASAN failure at src/gpu/GrXferProcessor.cpp:224

Original issue's description:
> added support for PLS path rendering
>
> BUG=skia:3555
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002
>
> Committed: https://skia.googlesource.com/skia/+/7df3f5e127f8016d17b637cc48a6a4718f1a6822

TBR=bsalomon@google.com,egdaniel@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:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1626553002

Review URL: https://codereview.chromium.org/1626553002
2016-01-22 09:45:47 -08:00
benjaminwagner
1c2729c8bb Add SK_SUPPORT_LEGACY_DRAWFILTER guard around calls to SkCanvas::(get|set)DrawFilter.
Fixes Google3 dm build. (Can't enable SK_INTERNAL for Google3 dm without enabling it for all dependents.)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1626543002

Review URL: https://codereview.chromium.org/1626543002
2016-01-22 09:45:14 -08:00
mtklein
efcc125acd de-proc sk_float_rsqrt
This is the first of many little baby steps to have us stop runtime-detecting NEON.

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

Review URL: https://codereview.chromium.org/1616013003
2016-01-22 08:49:26 -08:00
herb
5e0883cf57 Fix bounds of checking if a radii are too long for a side.
BUG=skia:4692,skia:4413
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1617763003

Review URL: https://codereview.chromium.org/1617763003
2016-01-22 08:34:35 -08:00
mtklein
8bf7b79cf9 Refactor swizzle names and types.
- Plant a flag to say "pretend all the inputs are RGBA".
    This is how libpng thinks.
    This is the opposite of what the implementation had been doing,
    so I've rearranged everything to reflect the new orientation.

  - Rewrite the names to be less mysterious looking.  No more Xs.

  - Make the src type uniformly const void*, to allow for 888 (RGB) srcs.

This should be performance and pixel neutral.  (Please revert if it's not.)

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

Review URL: https://codereview.chromium.org/1626463002
2016-01-22 07:42:53 -08:00
djsollen
aa97a84404 Revert of Consolidate SK_CRASH and sk_throw into SK_ABORT (patchset #5 id:80001 of https://codereview.chromium.org/1610823002/ )
Reason for revert:
Chrome is calling SK_CRASH

Original issue's description:
> Consolidate SK_CRASH and sk_throw into SK_ABORT
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1610823002
>
> Committed: https://skia.googlesource.com/skia/+/4c5cd7d527ed29aabfa72aa47b23a4496eeda357

TBR=reed@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/1620333002
2016-01-22 06:50:25 -08:00
ethannicholas
7df3f5e127 added support for PLS path rendering
BUG=skia:3555
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1541903002

Review URL: https://codereview.chromium.org/1541903002
2016-01-22 06:48:46 -08:00
djsollen
4c5cd7d527 Consolidate SK_CRASH and sk_throw into SK_ABORT
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1610823002

Review URL: https://codereview.chromium.org/1610823002
2016-01-22 06:04:55 -08:00
reed
6d3cef930a Revert[2] of float color components
This reverts commit 2a2bdc6984.

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

TBR=
NOTRY=True
Test-Ubuntu-GCC-ShuttleA-GPU-GTX660-x86_64-Release-Trybot  seems wicked slow

Review URL: https://codereview.chromium.org/1622483002
2016-01-22 01:04:29 -08:00
reed
2a2bdc6984 Revert of experiment: float color components (patchset #6 id:100001 of https://codereview.chromium.org/1617813002/ )
Reason for revert:
broke some colormatrix tests

Original issue's description:
> experiment: float color components
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1617813002
>
> Committed: https://skia.googlesource.com/skia/+/353c148d8e8c9031daca34c6f9d6bcc6f08706c7

TBR=fmalita@chromium.org,mtklein@google.com,herb@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/1623453002
2016-01-22 00:04:30 -08:00
reed
353c148d8e experiment: float color components
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1617813002

Review URL: https://codereview.chromium.org/1617813002
2016-01-21 15:29:10 -08:00
halcanary
27a6e86fb1 SkValue: SkXfermode
Implement:
  template<> SkValue SkToValue<SkXfermode>(const SkXfermode*);

  template<> bool SkFromValue<SkXfermode*>(const SkValue&, SkXfermode**);

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

NOTRY=true

Review URL: https://codereview.chromium.org/1585813004
2016-01-21 14:15:10 -08:00
fmalita
55b29b2551 Convert CanvasStateTest to the new saveLayer API
The test needs to still work when SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG is
defined but SK_SUPPORT_LEGACY_SAVEFLAGS is not.

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

Review URL: https://codereview.chromium.org/1610193002
2016-01-20 11:17:40 -08:00
halcanary
76097f8235 SkValue: implementation, unit test
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1604253002

Review URL: https://codereview.chromium.org/1604253002
2016-01-20 10:00:26 -08:00
fs
b1475b0d41 Add SkPath::isLastContourClosed()
Adds a simple method for checking if the last command/verb in the
current contour is a 'close'.

This will simplify determining "closedness" for blink::Path, and aid
in the implementation of algorithms such as:

https://drafts.fxtf.org/motion-1/#motion-processing (second item in list)

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

Review URL: https://codereview.chromium.org/1601103006
2016-01-20 09:51:08 -08:00
caryclark
b6474dd1a5 fix circular dashing
Path measure cannot use the same code approach for quadratics
and cubics. Subdividing cubics repeatedly does not result in
subdivided t values, e.g. a quarter circle cubic divided in
half twice does not have a t value equivalent to 1/4.

Instead, always compute the cubic segment from a pair of
t values.

When finding the length of the cubic through recursive measures,
it is enough to carry the point at a given t to the next
subdivision.

(Chrome suppression has landed already.)

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

Review URL: https://codereview.chromium.org/1602153002
2016-01-19 08:07:50 -08:00
reed
67b09bf6b7 use pixmaps in mipmap api
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1598803002

Review URL: https://codereview.chromium.org/1598803002
2016-01-16 18:50:35 -08:00
mtklein
c33065a93a add SkNx::abs(), for now only implemented for Sk4f
There's no reason we couldn't implement this for all ints and floats;
just don't want to land unused code.

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

Review URL: https://codereview.chromium.org/1590843003
2016-01-15 12:16:40 -08:00
benjaminwagner
2a641eebf6 Fix compile error in Google3 build.
BUG=skia:4803
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1593623002

Review URL: https://codereview.chromium.org/1593623002
2016-01-15 06:21:18 -08:00
msarett
edd2dcf082 Create an SkCodecImageGenerator
BUG=skia:

patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004

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

Review URL: https://codereview.chromium.org/1487683004
2016-01-14 13:12:26 -08:00
djsollen
576c206d29 Update tests to produce more sensible output for Android framework builds.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1590023002

Review URL: https://codereview.chromium.org/1590023002
2016-01-14 12:23:55 -08:00
msarett
8afddabeaf Revert of Create an SkCodecImageGenerator (patchset #10 id:260001 of https://codereview.chromium.org/1487683004/ )
Reason for revert:
Core doesn't know about Codec.

Original issue's description:
> Create an SkCodecImageGenerator
>
> BUG=skia:
>
> patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004
>
> Committed: https://skia.googlesource.com/skia/+/e1102ce1d3d0895e840e756e155ec56b5a1a7540

TBR=reed@google.com,scroggo@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/1582373003
2016-01-14 12:20:45 -08:00
mtklein
f074e70749 sketch SkValue API
I think we may be trying to take too many steps at once.
Let's try starting from an API and evolving from there?

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

Review URL: https://codereview.chromium.org/1589953003
2016-01-14 11:43:13 -08:00
msarett
e1102ce1d3 Create an SkCodecImageGenerator
BUG=skia:

patch from issue 1396323007 at patchset 120001 (http://crrev.com/1396323007#ps120001)
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1487683004

Review URL: https://codereview.chromium.org/1487683004
2016-01-14 11:32:43 -08:00
bsalomon
e5286e0b37 Beginning of support for texture rectangles.
Adds support for importing a RECTANGLE texture into Skia via GrTexureProvider::wrapBackendTexture().

Tests read/writing pixels, copySurface, and clear.

Does not add support for texturing from a RECTANGLE texture as the coords will be incorrectly normalized.

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

Review URL: https://codereview.chromium.org/1583863002
2016-01-14 09:24:09 -08:00
bsalomon
23e566664b Revert of Make A8 readback work in more cases and improve testing. (patchset #5 id:70001 of https://codereview.chromium.org/1584563002/ )
Reason for revert:
Breaking video tests in Chrome.

Original issue's description:
> Make A8 readback work in more cases and improve testing.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584563002
>
> Committed: https://skia.googlesource.com/skia/+/b76afedf11c7fe933954d030048c3222860249e1

TBR=egdaniel@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/1581203005
2016-01-14 07:19:47 -08:00
kkinnunen
702501ddca Simplify path allocation, clean up resources correctly
Simplify path id allocation in NVPR backend. Instead of using
an AVL tree of path id ranges for the first 65535 ids, use just
a simple stategy of overallocation and "bump index".

Fixes the bug where previously overallocated ids were not deleted.

The advantage is that the implementation is simple and all allocations
go through overallocation, not just the first 65535 of the 1-range
allocations.

Removes the logic where paths were cleared with setting path data to
null instead of deleting the whole path. Now deleted paths are just
deleted normally. These operations should have equivalent performance on
command buffer. Deleting the path should enable the driver to do more
maintainance.

Removes the GLNameAllocator, as it was only used for paths. In order for
it to be used for other IDs, it probably would need to be re-written to
support cleanup and arbitrary ranges. Also, the interface would probably
need to be changed to not requiring the block to be allocated before it
could be managed by the structure.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1150243003

Review URL: https://codereview.chromium.org/1150243003
2016-01-13 23:36:45 -08:00
bsalomon
b76afedf11 Make A8 readback work in more cases and improve testing.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584563002

Review URL: https://codereview.chromium.org/1584563002
2016-01-13 12:19:15 -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
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
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
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
Brian Salomon
639475e375 Fix BitmapCopy_Texture test on iOS
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1573273002

Review URL: https://codereview.chromium.org/1573273002 .
2016-01-11 15:15:46 -05: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
herb
7cf12ddb8c Fix radii calculation code to handle large radii.
BUG=472147
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1569403002

Review URL: https://codereview.chromium.org/1569403002
2016-01-11 08:08:56 -08:00
scroggo
b512aaa5c8 Make SkROBuffer::Iter::size() work when exhausted
According to the documentation, this method will return 0 when the Iter
is exhausted. Prior to this CL, it crashes instead.

Prevent a crash with a null fHead, and add a test to verify the
behavior.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1574603002

Review URL: https://codereview.chromium.org/1574603002
2016-01-11 06:38:00 -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
reed
e3b38ce43b unify how canvas checks for null on skia objects (images, blobs, pictures)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568613008

Review URL: https://codereview.chromium.org/1568613008
2016-01-08 09:18:44 -08:00
mtklein
55c86abedc test+bench new swizzle SkOpts
BUG=skia:skia:4767
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1564233002

Review URL: https://codereview.chromium.org/1564233002
2016-01-08 06:32:52 -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
robertphillips
1243b702ee Revert of Fix handling of radii scaling to force the result to always be less (patchset #14 id:250001 of https://codereview.chromium.org/1567723004/ )
Reason for revert:
Fear and doubt of NexusPlayer

Original issue's description:
> Fix handling of radii scaling to force the result to always be less
> than a given side.
> BUG=472147
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567723004
>
> Committed: https://skia.googlesource.com/skia/+/f96bf1a2d091a917bb93f9e9a3a8d53bb39d068e

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

Review URL: https://codereview.chromium.org/1568063002
2016-01-07 14:17:20 -08:00
herb
f96bf1a2d0 Fix handling of radii scaling to force the result to always be less
than a given side.
BUG=472147
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1567723004

Review URL: https://codereview.chromium.org/1567723004
2016-01-07 11:53:16 -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
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
msarett
133eaaacdd Store ninepatch chunks in the png header in CodexTest
We are making a change in Android to store ninepatch chunks in the
png header.  Thus, our ninepatch test should match the Android
framework's use.
https://googleplex-android-review.git.corp.google.com/#/c/832067/

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

Review URL: https://codereview.chromium.org/1553303003
2016-01-07 11:03:25 -08:00
fmalita
c7e211acd0 SkTreatAsSprite should take AA into account
Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
subpixel translations are ignored.  This is incorrect for the anti-aliased
case (drawSprite always pixel-snaps, so we lose edge AA).

The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
bits when AA is requested.

Also remove unused SkTreatAsSpriteFilter.

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

Committed: https://skia.googlesource.com/skia/+/983dc2541a729609037a05eba731b3eb9788c517

Review URL: https://codereview.chromium.org/1566943002
2016-01-07 10:34:46 -08:00
reed
5423ee17ed Revert of SkTreatAsSprite should take AA into account (patchset #5 id:80001 of https://codereview.chromium.org/1566943002/ )
Reason for revert:
Need to use SkLeftShift since the arg could be negative

Original issue's description:
> SkTreatAsSprite should take AA into account
>
> Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
> subpixel translations are ignored.  This is incorrect for the anti-aliased
> case (drawSprite always pixel-snaps, so we lose edge AA).
>
> The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
> bits when AA is requested.
>
> Also remove unused SkTreatAsSpriteFilter.
>
> BUG=skia:4761
> R=reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1566943002
>
> Committed: https://skia.googlesource.com/skia/+/983dc2541a729609037a05eba731b3eb9788c517

TBR=fmalita@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4761

Review URL: https://codereview.chromium.org/1569873003
2016-01-07 09:15:20 -08:00
fmalita
983dc2541a SkTreatAsSprite should take AA into account
Currently we always call SkTreatAsSprite with 0 subpixel bits, which means
subpixel translations are ignored.  This is incorrect for the anti-aliased
case (drawSprite always pixel-snaps, so we lose edge AA).

The CL updates SkTreatAsSprite to take an SkPaint argument and use 8 subpixel
bits when AA is requested.

Also remove unused SkTreatAsSpriteFilter.

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

Review URL: https://codereview.chromium.org/1566943002
2016-01-07 08:02:26 -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
halcanary
53b1c09c13 SkPDF: Change handling of large-numbers in matricies.
re-do http://crrev.com/1438503002 right.

Also, add a unit test that asserts without this change.

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

Review URL: https://codereview.chromium.org/1552263003
2016-01-06 09:02:26 -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
caryclark
ba25ddb7f2 fix nexus player
The path contains test has such large numbers that it is indeterminate
whether it will return true or false. Allow either result, ensuring
that the test itself doesn't crash.

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

Review URL: https://codereview.chromium.org/1565463002
2016-01-05 12:36:09 -08:00
reed
aeab8ea4d7 fix linear gradient assert, by explicitly clamping
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1556993003

Review URL: https://codereview.chromium.org/1556993003
2016-01-05 10:01:38 -08:00
bsalomon
45eefcfec2 Add null check for bmp->tex result in SkImageFilter::filterInputGpu
BUG=chromium:570479
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1555333002

Review URL: https://codereview.chromium.org/1555333002
2016-01-05 08:39:28 -08:00
caryclark
dbaec7323f give up on quad root if infinite
SkPath::contains() uses SkFindUnitQuadRoots to see
which side of a curve a point is on. If the
intermediate exceeds a float, return no found root.

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

Review URL: https://codereview.chromium.org/1556353002
2016-01-05 06:20:09 -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
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
mtklein
279c786409 If we swap its arguments, SkTaskGroup::batch() _is_ sk_parallel_for.
Why have two names if we can get away with one?

This kills off sk_parallel_for_thread_count(), which was only used to avoid forcing a deadlock in OncePtrTest on multicore machines in singlethreaded mode... a really niche use case.  Instead just don't explicitly force a race.

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

Review URL: https://codereview.chromium.org/1552093002
2016-01-04 19:13:19 -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
robertphillips
4abb0c11da Add unit test for crbug.com/570232
This is the promised followup to https://codereview.chromium.org/1539553002/ (Add default ctor to SkMask) and would've caught the bug before it got out into the wild.

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

Review URL: https://codereview.chromium.org/1552303002
2016-01-04 11:20:25 -08:00
kkinnunen
e3c2f80006 Use device-independent text for nvprmsaa4/16 in nanobench and dm
Use device-independent text rendering in nanobench and dm when
using configs nvprmsaa4 or nvprmsaa16.

This was turned on for dm in commit:
"Re-enable nvpr text rendering in DM"
https://codereview.chromium.org/1306733007

This regressed in commit:
"Add config options to run different GPU APIs to dm and nanobench"
https://codereview.chromium.org/1490113005/

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

Review URL: https://codereview.chromium.org/1553453004
2015-12-29 08:57:32 -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
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
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
kkinnunen
dd180e795f Enable NVPR with command buffer
Set Chromium command-line flag --enable-gl-path-rendering
before creating command buffer context. This is needed for
the command buffer to expose NVPR at the moment.

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

Review URL: https://codereview.chromium.org/1538863002
2015-12-21 04:05:53 -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
scroggo
56fbbfe609 Reland of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1532753002/ )
Reason for revert:
The test should now be blacklisted.

Original issue's description:
> Revert of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1514373003/ )
>
> Reason for revert:
> Speculative fix for skbug.com/4709
>
> Original issue's description:
> > Add test for previously unflattenables
> >
> > BUG=skia:4613
> >
> > Committed: https://skia.googlesource.com/skia/+/061aaa79f7d8a2e93962e8296abaae13f0a7a715
>
> TBR=halcanary@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4613
>
> Committed: https://skia.googlesource.com/skia/+/c8f969309cafebeb16ad057f766b61bdc406a8b8

TBR=halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4613

Review URL: https://codereview.chromium.org/1535143002
2015-12-18 07:14:24 -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
scroggo
db7dc09e52 Remove SkImageMinRowBytes
As stated in the comments in crrev.com/1379193002, this method name is
misleading. It returns a larger number than the minimum rowbytes - it
increases to the next four-byte alignment. This has the effect that the
one place that calls it does not support 565 (which is not already
four-byte aligned), but does not serve any other purpose. Remove it and
the only call-site.

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

Review URL: https://codereview.chromium.org/1528383004
2015-12-18 06:56:01 -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
caryclark
9cb5d755e7 fix bugs in path contains
Pull out the logic to check to see if the point is on the edge
so all curve types can share.

Reorder cubic to be like conic and quad so that mixed types
consider the curves consistently.

Don't count on curve points twice if they are on the end
and compute a zero cross product.

Remove logic that checks, when there are no roots, if the
point is closer to the top or the bottom (it's always the top).

Initialize the iterator correctly when it is accessing
the list of on point curves.

Use 'multiply' instead of 'subtract' to see if the vectors
are pointing in opposite directions.

Add more test cases.

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

Review URL: https://codereview.chromium.org/1532003004
2015-12-18 04:35:24 -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
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
fs
c91065d028 Use the unswapped end point y for early out case in winding_line
The x-coordinates are not swapped, so using the swapped y will result
in a comparison with the wrong (end) point.

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

Review URL: https://codereview.chromium.org/1533873002
2015-12-17 09:03:28 -08:00
scroggo
c8f969309c Revert of Add test for previously unflattenables (patchset #1 id:1 of https://codereview.chromium.org/1514373003/ )
Reason for revert:
Speculative fix for skbug.com/4709

Original issue's description:
> Add test for previously unflattenables
>
> BUG=skia:4613
>
> Committed: https://skia.googlesource.com/skia/+/061aaa79f7d8a2e93962e8296abaae13f0a7a715

TBR=halcanary@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4613

Review URL: https://codereview.chromium.org/1532753002
2015-12-16 14:17:58 -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
reed
4657ce2324 remove drawSprite from canvas
BUG=skia:

Review URL: https://codereview.chromium.org/1534443003
2015-12-16 07:52:47 -08:00
bsalomon
f46a124ddd Set GL_PACK_ALIGNMENT before calling glReadPixels
Review URL: https://codereview.chromium.org/1525193002
2015-12-15 12:37:38 -08:00
ethannicholas
c88cb8942e Fix for GrAALinearizingConvexPathRenderer incorrectly drawing non-convex paths
BUG=552080

Review URL: https://codereview.chromium.org/1522973002
2015-12-15 11:01:12 -08:00
halcanary
02faf31080 Tests: reduce verbosity
Review URL: https://codereview.chromium.org/1526943003
2015-12-15 09:20:19 -08:00
mtklein
6f37b4a475 Unify some SkNx code
- one base case and one N=1 case instead of two each (or three with doubles)
 - use SkNx_cast instead of FromBytes/toBytes
 - 4-at-a-time Sk4f::ToBytes becomes a special standalone Sk4f_ToBytes

If I did everything right, this'll be perf- and pixel- neutral.

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

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

Review URL: https://codereview.chromium.org/1526523003
2015-12-14 11:25:18 -08:00
caryclark
364a0074c3 path ops: check for deleted ends
TBR=fmalita@chromium.org
BUG=569540

Review URL: https://codereview.chromium.org/1524803002
2015-12-14 08:43:21 -08:00
caryclark
9aacd9029c If a point is on a path edge, it's in the path, at least for all cases where the path edge is not canceled with another edge through coincidence.
Add test cases for edges and conics, and make sure it all works.

R=reed@google.com
BUG=skia:4669,4265

Review URL: https://codereview.chromium.org/1517883002
2015-12-14 08:38:09 -08:00
reed
4ff653cab2 Revert of Add config options to run different GPU APIs to dm and nanobench (patchset #12 id:220001 of https://codereview.chromium.org/1490113005/ )
Reason for revert:
speculative revert to see if it unblocks the DEPS roll

https://codereview.chromium.org/1529443002

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

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

Review URL: https://codereview.chromium.org/1528473002
2015-12-14 05:58:25 -08:00
kkinnunen
e13ca329fc 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

Review URL: https://codereview.chromium.org/1490113005
2015-12-14 04:49:17 -08:00
benjaminwagner
a1bb8e02fe In SkPixmap.cpp, change SkAlphaMul to SkMulDiv255.
Add a test that we get the same color back after calling SkBitmap::eraseColor, modulo rounding.

Also update some incorrect docs.

BUG=skia:4297

Review URL: https://codereview.chromium.org/1521673002
2015-12-11 14:08:59 -08:00
scroggo
061aaa79f7 Add test for previously unflattenables
BUG=skia:4613

Review URL: https://codereview.chromium.org/1514373003
2015-12-11 10:29:02 -08:00
scroggo
28e80f4013 Fix a crash in SkParsePath::FromSVGString
BUG=skia:3491

Review URL: https://codereview.chromium.org/1515193002
2015-12-11 09:49:57 -08:00
kkinnunen
546eb5c57a Initialize glGen* call id args to zero
Initialize glGenTexture, glGenBuffer call id buffer items to zero before
calls. Otherwise it's not easy to check if the call succeeded or not.

Assert the rule in debug gl context.

Make TesselatingPathRendererTests use debug gl context. It exercises
some of the GenBuffers call sites.

Review URL: https://codereview.chromium.org/1514033002
2015-12-11 00:05:34 -08:00
kkinnunen
55eeae9722 Run debug gl context for DEF_GPU_TEST_FOR_ALL_CONTEXTS
Run debug gl context for tests defined with
DEF_GPU_TEST_FOR_ALL_CONTEXTS.

Review URL: https://codereview.chromium.org/1514023002
2015-12-10 23:19:29 -08:00
halcanary
f2848b6035 default SkPixelSerializer
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.

Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.

SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.

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

Committed: https://skia.googlesource.com/skia/+/808ce2886d732b1055f89c8fb0f1b11b47fcb0ce

Review URL: https://codereview.chromium.org/1507123002
2015-12-10 12:40:23 -08:00
scroggo
565901db95 Switch SkAutoMalloc to SkAutoTMalloc to avoid cast
Make SkAutoTMalloc's interface look more like SkAutoMalloc:
- add free(), which does what you expect
- make reset() return a pointer fPtr

No public API changes (SkAutoTMalloc is in include/private)

BUG=skia:2148

Review URL: https://codereview.chromium.org/1516833003
2015-12-10 10:44:13 -08:00
halcanary
9907371f0a SkPixelSerializer: remove deprecated virtual
Review URL: https://codereview.chromium.org/1512333002
2015-12-10 09:30:57 -08:00
halcanary
712fdf7603 SkDocument::setDCTEncoder() for old versions of webkit
Review URL: https://codereview.chromium.org/1505763003
2015-12-10 08:59:43 -08:00
kkinnunen
5219fd9ff7 Make NVPR a GL context option instead of a GL context
Make NVPR a GL context option instead of a GL context.
This may enable NVPR to be run with command buffer
interface.

No functionality change in DM or nanobench. NVPR can
only be run with normal GL APIs.

BUG=skia:2992

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

Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

Review URL: https://codereview.chromium.org/1448883002
2015-12-10 06:28:13 -08:00
caryclark
3127c99986 ubsan shift fixes
Use an inline function that does a normal shift. When built for the sanitizer, add casts so that the shift is unsigned.

Also make a few fixes to do unsigned shifts or avoid the shift altogether; and add an argument spec to some macros.

R=reed@google.com,mtklein@google.com
BUG=skia:4633

Review URL: https://codereview.chromium.org/1503423003
2015-12-09 12:02:30 -08:00
halcanary
b260d130ca SkBitmap::getColor repsects swizzle
Review URL: https://codereview.chromium.org/1510253002
2015-12-09 10:21:59 -08:00
senorblanco
db64af3b17 Fix filter primitive bounds computations.
Make each filter responsible for expanding its destination
bounds. Previously, we were using a union of all
intermediate bounds sizes via join() calls in many image
filters' computeFastBounds(), due to the fact that those
filters could only produce bitmaps the same size as their
inputs. Now, we compute optimal bounds for each filter as
follows:

1) Pass the (unmodified) clip bounds to the root node
of the DAG in the first recursive call to onFilterImage()
as the Context's fClipBounds.

2) Reverse-map the clip: when recursing up the DAG in
filterInput[GPU](), apply filter-specific expansion to the
clip by calling calling onFilterNodeBounds(... kReverse).
This allows upstream nodes to have a clip that respects the
current node's requirements. This is done via helper
function mapContext().

3) Forward-map the source bitmap: just prior to applying
the crop rect in applyCropRect(), we determine the filter's
preferred bounds by mapping the source bitmap bounds
forwards via onFilterNodeBounds(..., kForward).

NOTE: GMs affected by this change:
fast_slow_blurimagefilter: fast and slow paths now produce the same result
spritebitmap: drawSprite() and drawBitmap() paths now produce the same result
filterfastbounds: fast bounds are optimized; all drop-shadow results now appear
apply-filter: snug and not-snug cases give same results
dropshadowimagefilter: drawSprite() results now show shadows
draw-with-filter: no artifacts on erode edges; blur edges no longer clipped
displacement, imagefiltersbase, imagefiltersclipped, imagefilterscropexpand, imagefiltersscaled, matriximagefilter,
resizeimagefilter, localmatriximagefilter, testimagefilters: fixed incorrect clipping
imagefilterstransformed, morphology: no artifacts on erode edges

BUG=skia:1062,skia:3194,skia:3939,skia:4337,skia:4526

Review URL: https://codereview.chromium.org/1308703007
2015-12-09 10:11:43 -08:00
borenet
9d66696f6b Revert of Make NVPR a GL context option instead of a GL context (patchset #9 id:160001 of https://codereview.chromium.org/1448883002/ )
Reason for revert:
"Could not create surface" on Linux GTX660 bots

Original issue's description:
> Make NVPR a GL context option instead of a GL context
>
> Make NVPR a GL context option instead of a GL context.
> This may enable NVPR to be run with command buffer
> interface.
>
> No functionality change in DM or nanobench. NVPR can
> only be run with normal GL APIs.
>
> BUG=skia:2992
>
> Committed: https://skia.googlesource.com/skia/+/eeebdb538d476c1bfc8b63a946094ca1b505ecd1
>
> Committed: https://skia.googlesource.com/skia/+/64492c43c3faee7ab0f69b1c84e0267616f85e52

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

Review URL: https://codereview.chromium.org/1513703002
2015-12-09 07:03:51 -08:00
halcanary
a2e056773d Revert of default SkPixelSerializer (patchset #2 id:20001 of https://codereview.chromium.org/1507123002/ )
Reason for revert:
I was overconfident.

Original issue's description:
> default SkPixelSerializer
>
> Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.
>
> Add SkImageEncoder::CreatePixelSerializer() to return a
> PixelSerializer that calls into SkImageEncoder::EncodeData.
>
> SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.
>
> Committed: https://skia.googlesource.com/skia/+/b0bd1516bff3f5afcbfd615e805867531657811b
>
> Committed: https://skia.googlesource.com/skia/+/808ce2886d732b1055f89c8fb0f1b11b47fcb0ce

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

Review URL: https://codereview.chromium.org/1511183002
2015-12-09 03:56:02 -08:00
halcanary
808ce2886d default SkPixelSerializer
Add SkImageEncoder::EncodeData(const SkPixmap&, ...) function.

Add SkImageEncoder::CreatePixelSerializer() to return a
PixelSerializer that calls into SkImageEncoder::EncodeData.

SkImage::encode() make use of SkImageEncoder::CreatePixelSerializer.

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

Review URL: https://codereview.chromium.org/1507123002
2015-12-08 19:02:36 -08:00
scroggo
db30be2f94 Make SkCodec support peek() and read()
- Update SkCodec's dox to point out that some of the data must be
  read twice in order to decode
- Add an accessor that reports how much is needed for reading twice
- Make SkCodec default to use peek()
  If an input stream supports peek()ing, peek() instead of reading.
  This way the stream need not implement rewind()
- Make SkCodec use read() + rewind() as a backup
  So that streams without peek() implemented can still function
  properly (assuming they can rewind).
- read everything we may need to determine the format once
  In SkCodec::NewFromStream, peek()/read() 14 bytes, which is enough
  to read all of the types we support. Pass the buffer to each subtype,
  which will have enough info to determine whether it is the right
  type. This simplifies the code and results in less reading and
  rewinding.
  - NOTE: SkWbmpCodec needs the following number of bytes for the header
    + 1 (type)
    + 1 (reserved)
    + 3 (width - bytes needed to support up to 0xFFFF)
    + 3 (height - bytes needed to support up to 0xFFFF)
    = 8
- in SkWebpCodec, support using read + rewind as a backup if peek does
  not work.

A change in Android will add peek() to JavaInputStreamAdapter.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1472123002
2015-12-08 18:54:13 -08:00