platform/upstream/libSkiaSharp.git
8 years agoAdd mip support to *DeferredTextureImageData functions.
cblume [Tue, 31 May 2016 16:55:08 +0000 (09:55 -0700)]
Add mip support to *DeferredTextureImageData functions.

As a first step, I want to add the ability to store multiple mip levels
in the opaque object.

I will follow this with using SkMipMap to generate and store the mip
levels and generating the texture from those stored mip levels.

R=bsalomon@chromium.org
CC=ericrk@chromium.org
BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023573002

Review-Url: https://codereview.chromium.org/2023573002

8 years agoFilter out degenerate contours in GrConvexPolyEffect
lsalzman [Tue, 31 May 2016 16:46:00 +0000 (09:46 -0700)]
Filter out degenerate contours in GrConvexPolyEffect

As noticed in a downstream Firefox bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1255062

If a path such as (moveTo, moveTo, lineTo, lineTo, close) is supplied,
and if the non-degenerate contour is convex, the convexity test will
pass, and GrConvexPolyEffect will be used.

However, the path's raw points are used to build the edge list, which
does not filter out degenerate contours. This may cause the polygon to
fail to draw.

This patch ensures that the degenerate contours are filtered out by
using an iterator as the path convexity test does.

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

Review-Url: https://codereview.chromium.org/2018613003

8 years agoAdd missing files for GL unix viewer.
jvanverth [Tue, 31 May 2016 16:39:20 +0000 (09:39 -0700)]
Add missing files for GL unix viewer.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023943004

Review-Url: https://codereview.chromium.org/2023943004

8 years agoFix integer overflow in SkColorSpace
msarett [Tue, 31 May 2016 16:13:04 +0000 (09:13 -0700)]
Fix integer overflow in SkColorSpace

BUG=skia:5361
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2020303002

Review-Url: https://codereview.chromium.org/2020303002

8 years agoAdd new GM to exercise stroked line special case
robertphillips [Tue, 31 May 2016 13:59:18 +0000 (06:59 -0700)]
Add new GM to exercise stroked line special case

This is a companion to: https://codereview.chromium.org/2023693002/ (Handle stroked single line special case in Ganesh)

The idea is to land this CL first so any regressions are visible.

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

Review-Url: https://codereview.chromium.org/2019193002

8 years agoAdd SkLights class
robertphillips [Tue, 31 May 2016 13:56:28 +0000 (06:56 -0700)]
Add SkLights class

The SkLights class is intended to be passed to the drawLitAtlas call (and then on to SkLightingShader).

This CL is calved off of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call).
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1255133004

Review-Url: https://codereview.chromium.org/1255133004

8 years agoRemove unused SkPictureGpuAnalyzer::analyze()
fmalita [Tue, 31 May 2016 13:32:57 +0000 (06:32 -0700)]
Remove unused SkPictureGpuAnalyzer::analyze()

After https://crrev.com/c64bd21780da13051846ae45b54a1e6c6bf6ac52,
Chromium no longer uses analyze().

R=mtklein@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2014983002

Review-Url: https://codereview.chromium.org/2014983002

8 years agoMake SkPngCodec decode progressively.
scroggo [Tue, 31 May 2016 13:30:14 +0000 (06:30 -0700)]
Make SkPngCodec decode progressively.

This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.

Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.

Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.

Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.

DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).

fuzz.cpp:
- Remove reference to kNone_ScanlineOrder

SkCodec:
- Add new APIs:
    - startIncrementalDecode
    - incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()

SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
  SkPngCodec
- Make the interlaced PNG decoder report how many lines were
  initialized during an incomplete decode
- Make initializeSwizzler return a bool instead of an SkCodec::Result
  (It only returned kSuccess or kInvalidInput anyway)

SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO

SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
  method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder

tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
  and compares it to the straightforward method

tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
  sections rather than all at once
- In the method check(), add a parameter for whether the image supports
  the new method of scanline decoding, and be explicit about whether an
  image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
  non-interlaced (except for an image that is too small - one row), but
  the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
  rewinding

BUG=skia:4211

The new version was generally faster than the old version (but not significantly so).

Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/

Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/

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

Review-Url: https://codereview.chromium.org/1997703003

8 years agoFix incorrect sampler locations when using CHROMIUM_bind_uniform_location
kkinnunen [Tue, 31 May 2016 05:30:24 +0000 (22:30 -0700)]
Fix incorrect sampler locations when using CHROMIUM_bind_uniform_location

Fix incorrect sampler locations when using
CHROMIUM_bind_uniform_location.

The extension is not used at the moment, though.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023783002

Review-Url: https://codereview.chromium.org/2023783002

8 years agoUpdate SKP version
update-skps [Sun, 29 May 2016 08:00:14 +0000 (01:00 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2024513002

Review-Url: https://codereview.chromium.org/2024513002

8 years agoChange parameters to GrPipelineBuilder's ctor
robertphillips [Sat, 28 May 2016 15:51:06 +0000 (08:51 -0700)]
Change parameters to GrPipelineBuilder's ctor

This is just plumbing prep to remove the GrRenderTarget from the GrPipelineBuilder.

Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

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

Review-Url: https://codereview.chromium.org/2015333002

8 years agoAdd interesting features to visualize_color_gamut
msarett [Fri, 27 May 2016 21:01:02 +0000 (14:01 -0700)]
Add interesting features to visualize_color_gamut

(1) Draw triangles onto a D50 color gamut so they are
    actually in the correct place.
(2) Add options to display canonical sRGB and Adobe RGB
    gamuts.
(3) Label the R, G, and B points of the color gamut.
(4) Decode and reencode the input image without color
    correction, so we can compare to the corrected version.

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

Review-Url: https://codereview.chromium.org/2017153002

8 years agoUpdate VC++ version in Windows quick start.
bungeman [Fri, 27 May 2016 19:27:33 +0000 (12:27 -0700)]
Update VC++ version in Windows quick start.

NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2019093002

Review-Url: https://codereview.chromium.org/2019093002

8 years agoRewrite assignment operator on SkBitmap, fix asan
msarett [Fri, 27 May 2016 18:31:55 +0000 (11:31 -0700)]
Rewrite assignment operator on SkBitmap, fix asan

TBR=mtklein@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2020683002

Review-Url: https://codereview.chromium.org/2020683002

8 years agoisolate_android_sdk: Find or download isolate binary, fix infra path
borenet [Fri, 27 May 2016 18:11:22 +0000 (11:11 -0700)]
isolate_android_sdk: Find or download isolate binary, fix infra path

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

Review-Url: https://codereview.chromium.org/2016353003

8 years agoMove forceSRGB to SkCommonFlags.
herb [Fri, 27 May 2016 17:57:58 +0000 (10:57 -0700)]
Move forceSRGB to SkCommonFlags.

This fixes a duplicate symbol problem with the iOS build.

Add common forceSRGB flag.

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

Review-Url: https://codereview.chromium.org/2019073002

8 years agoClean up SkFloatBits
mtklein [Fri, 27 May 2016 17:47:31 +0000 (10:47 -0700)]
Clean up SkFloatBits

- remove dead code
- rewrite float -> int converters

The strategy for the new converters is:
   - convert input to double
   - floor/ceil/round in double space
   - pin that double to [SK_MinS32, SK_MaxS32]
   - truncate that double to int32_t

This simpler strategy does not work:
   - floor/ceil/round in float space
   - pin that float to [SK_MinS32, SK_MaxS32]
   - truncate that float to int32_t

SK_MinS32 and SK_MaxS32 are not representable as floats:
they round to the nearest float, ±2^31, which makes the
pin insufficient for floats near SK_MinS32 (-2^31+1) or
SK_MaxS32 (+2^31-1).

float only has 24 bits of precision, and we need 31.
double can represent all integers up to 50-something bits.

An alternative is to pin in float to ±2147483520, the last
exactly representable float before SK_MaxS32 (127 too small).

Our tests test that we round as floor(x+0.5), which can
return different numbers than round(x) for negative x.
So this CL explicitly uses floor(x+0.5).

I've updated the tests with ±inf and ±NaN, and tried to
make them a little clearer, especially using SK_MinS32
instead of -SK_MaxS32.

I have not timed anything here.  I have never seen any of these
methods in a profile.

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

Review-Url: https://codereview.chromium.org/2012333003

8 years agoMake SkPath::isOval() and SkPath::isRRect return the orientation and starting index.
bsalomon [Fri, 27 May 2016 16:17:04 +0000 (09:17 -0700)]
Make SkPath::isOval() and SkPath::isRRect return the orientation and starting index.

These are tracked in SkPathRef.

Unit tests are updated to test that the returned values are correct.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2012233002

Review-Url: https://codereview.chromium.org/2012233002

8 years agoNow we can use drawer to view the state information of the native app, and set its...
liyuqian [Fri, 27 May 2016 15:52:52 +0000 (08:52 -0700)]
Now we can use drawer to view the state information of the native app, and set its state using the spinner.

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

Committed: https://skia.googlesource.com/skia/+/4e4e30823fba0047b93a56bfcf05c04ca57e82ec

Review-Url: https://codereview.chromium.org/2004633002

8 years agoAdd forceSRGB flag to dm.
herb [Fri, 27 May 2016 15:15:05 +0000 (08:15 -0700)]
Add forceSRGB flag to dm.

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

Review-Url: https://codereview.chromium.org/2011333002

8 years agoUpdate Android SDK
liyuqian [Fri, 27 May 2016 15:08:34 +0000 (08:08 -0700)]
Update Android SDK

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

Review-Url: https://codereview.chromium.org/2016363002

8 years agoAdd SkColorSpace to SkImageInfo
msarett [Fri, 27 May 2016 14:39:02 +0000 (07:39 -0700)]
Add SkColorSpace to SkImageInfo

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

Review-Url: https://codereview.chromium.org/2000713003

8 years agoAdd OpenGL support to Linux viewer
jvanverth [Fri, 27 May 2016 13:47:08 +0000 (06:47 -0700)]
Add OpenGL support to Linux viewer

Also adds a command line option (--vulkan) to choose between
Vulkan and OpenGL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003

Committed: https://skia.googlesource.com/skia/+/10b3815a11c39b154ec7b74a2af43e019b50d48c

Review-Url: https://codereview.chromium.org/2011473003

8 years agoRevert of Add drawer with state information (patchset #8 id:140001 of https://coderev...
kjlubick [Fri, 27 May 2016 13:22:01 +0000 (06:22 -0700)]
Revert of Add drawer with state information (patchset #8 id:140001 of https://codereview.chromium.org/2004633002/ )

Reason for revert:
Broke Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan.  See https://uberchromegw.corp.google.com/i/client.skia.compile/builders/Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan/builds/134/steps/compile_skia%20on%20Ubuntu/logs/stdio.

Original issue's description:
> Now we can use drawer to view the state information of the native app, and set its state using the spinner.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004633002
>
> Committed: https://skia.googlesource.com/skia/+/4e4e30823fba0047b93a56bfcf05c04ca57e82ec

TBR=djsollen@google.com,jvanverth@google.com,liyuqian@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/2016343002

8 years agoRevert of Add OpenGL support to Linux viewer (patchset #5 id:80001 of https://coderev...
kjlubick [Fri, 27 May 2016 13:20:10 +0000 (06:20 -0700)]
Revert of Add OpenGL support to Linux viewer (patchset #5 id:80001 of https://codereview.chromium.org/2011473003/ )

Reason for revert:
Build-Ubuntu-GCC-Arm7-Debug-Android_Vulkan is broken and this patch prevents the revert of the culprit

Original issue's description:
> Add OpenGL support to Linux viewer
>
> Also adds a command line option (--vulkan) to choose between
> Vulkan and OpenGL.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003
>
> Committed: https://skia.googlesource.com/skia/+/10b3815a11c39b154ec7b74a2af43e019b50d48c

TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com,jvanverth@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/2015213002

8 years agoAdd OpenGL support to Linux viewer
jvanverth [Fri, 27 May 2016 12:47:00 +0000 (05:47 -0700)]
Add OpenGL support to Linux viewer

Also adds a command line option (--vulkan) to choose between
Vulkan and OpenGL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2011473003

Review-Url: https://codereview.chromium.org/2011473003

8 years agoRemove VisualBench and its Android implementation.
djsollen [Fri, 27 May 2016 12:39:29 +0000 (05:39 -0700)]
Remove VisualBench and its Android implementation.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018603003

Review-Url: https://codereview.chromium.org/2018603003

8 years agopin before calling acos
caryclark [Fri, 27 May 2016 12:24:37 +0000 (05:24 -0700)]
pin before calling acos

Adobe reports some user crashes in acos(). While the cause is
unknown, it's safe and may help stability to pin the input
in case the arguments drifted slightly outside [-1, 1].

R=reed@google.com
BUG=skia:5222
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2006653006

Review-Url: https://codereview.chromium.org/2006653006

8 years agotoy to play with antialias raytracing
caryclark [Fri, 27 May 2016 12:13:26 +0000 (05:13 -0700)]
toy to play with antialias raytracing

Here's the ray tracer I wrote.
I've commented out the calls to experimental
stroking -- enough of it remains working
to help visualize what you've been talking
to me about.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2014993002

Review-Url: https://codereview.chromium.org/2014993002

8 years agoSilence ASAN int32 overflow warning
fmalita [Fri, 27 May 2016 01:10:24 +0000 (18:10 -0700)]
Silence ASAN int32 overflow warning

It's fine to overflow SK_MaxS32 by one, the subsequent cast ensures
correct clamping.  But we need to cast earlier in order to make ASAN
happy.

TBR=mtklein@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2013243002

Review-Url: https://codereview.chromium.org/2013243002

8 years agoadd --forceSRGB option to nanobench, to get all src images to be SRGB
reed [Thu, 26 May 2016 21:06:43 +0000 (14:06 -0700)]
add --forceSRGB option to nanobench, to get all src images to be SRGB

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

Review-Url: https://codereview.chromium.org/2008333002

8 years agoNow we can use drawer to view the state information of the native app, and set its...
liyuqian [Thu, 26 May 2016 19:43:43 +0000 (12:43 -0700)]
Now we can use drawer to view the state information of the native app, and set its state using the spinner.

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

Review-Url: https://codereview.chromium.org/2004633002

8 years agoadd more SK_WARN_UNUSED_RESULT attributes to functions that ignore out-params if...
reed [Thu, 26 May 2016 19:13:26 +0000 (12:13 -0700)]
add more SK_WARN_UNUSED_RESULT attributes to functions that ignore out-params if they fail

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

TBR=

Review-Url: https://codereview.chromium.org/2012943003

8 years agoTemporarily change GalaxyS3 product.board
borenet [Thu, 26 May 2016 18:21:02 +0000 (11:21 -0700)]
Temporarily change GalaxyS3 product.board

Swarming detects this as "m0" for some reason. Change our requested
dimension until this is fixed.

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

Review-Url: https://codereview.chromium.org/2018513004

8 years agoFix int32 overflow in LinearGradientContext::shade4_dx_clamp
fmalita [Thu, 26 May 2016 18:13:52 +0000 (11:13 -0700)]
Fix int32 overflow in LinearGradientContext::shade4_dx_clamp

The unconditional increment in shade4_dx_clamp can overflow int32

=> n == SK_MinS32
=> count ~= SK_MinS32
=> we skip the main shader loop 'cause count < 0

R=reed@google.com,mtklein@google.com
BUG=chromium:599458
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2010843002

Review-Url: https://codereview.chromium.org/2010843002

8 years agoAdd exact version of qcms used by Chrome for testing and comparison
msarett [Thu, 26 May 2016 18:05:37 +0000 (11:05 -0700)]
Add exact version of qcms used by Chrome for testing and comparison

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

Review-Url: https://codereview.chromium.org/2014023003

8 years agoSrcover for sprite blitters.
herb [Thu, 26 May 2016 17:56:17 +0000 (10:56 -0700)]
Srcover for sprite blitters.

In order for this code to run, the gDefaultProfileIsSRGB flag needs to be true.

min base     min exp    percent   name
5601856   4689911   0.837207  top25desk_espn.skp_1
3491515   3202806   0.917311  top25desk_facebook.skp_1
5110247   4865740   0.952154  top25desk_weather_com.skp_1
605445    585520    0.96709   top25desk_techcrunch_com.skp_1
1007151   986193    0.979191  top25desk_wikipedia__1_tab_.skp_1
5951286   5889979   0.989699  top25desk_sports_yahoo_com_.skp_1
2825583   2804853   0.992663  top25desk_plus_google_com_11003.skp_1
8839265   8823249   0.998188  top25desk_twitter.skp_1
4169125   4168882   0.999942  top25desk_docs___1_open_documen.skp_1
6615327   6620663   1.00081   top25desk_youtube_com.skp_1
4613903   4647583   1.0073    top25desk_wordpress.skp_1
2532280   2554154   1.00864   top25desk_ebay_com.skp_1
4015689   4063584   1.01193   top25desk_google_com__hl_en_q_b.skp_1
9427478   9579203   1.01609   top25desk_answers_yahoo_com.skp_1
7403901   7542770   1.01876   top25desk_booking_com.skp_1
12249953  12528353  1.02273   top25desk_google_com_search_q_c.skp_1
1078648   1111050   1.03004   top25desk_games_yahoo_com.skp_1
7232627   7481555   1.03442   top25desk_pinterest.skp_1
2996819   3112091   1.03846   top25desk_google_com_calendar_.skp_1
2181531   2271677   1.04132   top25desk_amazon_com.skp_1
925245    987545    1.06733   top25desk_blogger.skp_1
4143359   4442607   1.07222   top25desk_linkedin.skp_1
4370962   4744580   1.08548   top25desk_news_yahoo_com.skp_1
4284025   4735094   1.10529   top25desk_mail_google_com_mail_.skp_1

[mtklein] We measured the noise here to be [-5%, +8%], so most of these changes fall within the noise.  We manually confirmed the two above that noise window (yahoo and mail) are also noise... srcover_srgb_srgb() did not figure prominently in their profiles.  The espn and facebook improvements look real.

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

Review-Url: https://codereview.chromium.org/1996683003

8 years agofix security bug
caryclark [Thu, 26 May 2016 16:01:47 +0000 (09:01 -0700)]
fix security bug

This fix is a tradeoff. It changes intersection to
treat a case where one coincident run is intersected at one point
and the other edge is not as continuing to be a span.

The old code tried to treat this as a single point.
The old code is probably right, but this change alone
made the data structures inconsistent. Later, extending
the coincident runs would fail by incorrectly discarding
the single point intersection.

As a result, this fixes the security test and one other, but
makes a different test fail. Isolating the failure uncovered
a reduced case that fails with and without the change, so
there are more serious problems here. Those problems are
addressed in a separate CL.

Many of the test edits below remove ill-thought out debugging
messaging that fire off global state, which isn't usable
in a multi-threaded test environment.

In the end, with this fix, all existing tests (modulo one
new failure and one new non-failure) pass in debug and
in the extended release test suites.

TBR=reed@google.com
BUG=614248
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018513003

Review-Url: https://codereview.chromium.org/2018513003

8 years agoSkPDF/SkColorSpace: use writeToICC
halcanary [Thu, 26 May 2016 15:31:06 +0000 (08:31 -0700)]
SkPDF/SkColorSpace: use writeToICC

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

Review-Url: https://codereview.chromium.org/2012133003

8 years agoComplex clipPath accounting
fmalita [Wed, 25 May 2016 18:31:04 +0000 (11:31 -0700)]
Complex clipPath accounting

Add a clipPath heuristic to SkPathCounter, and extend
SkPictureGpuAnalyzer to support external clipPath() op accounting.

BUG=skia:5347
R=reed@google.com,mtklein@google.com,senorblanco@chromium.org,bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2000423005

Review-Url: https://codereview.chromium.org/2000423005

8 years agoAssign sRGB color space to unmarked jpegs and pngs
msarett [Wed, 25 May 2016 17:13:53 +0000 (10:13 -0700)]
Assign sRGB color space to unmarked jpegs and pngs

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

Review-Url: https://codereview.chromium.org/2009813003

8 years agoWrite ICC profiles from SkColorSpace object
msarett [Wed, 25 May 2016 15:53:40 +0000 (08:53 -0700)]
Write ICC profiles from SkColorSpace object

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

Review-Url: https://codereview.chromium.org/2001203003

8 years agoDon't store resources with a unique key in GrResourceCache's fScratchMap
robertphillips [Tue, 24 May 2016 21:17:12 +0000 (14:17 -0700)]
Don't store resources with a unique key in GrResourceCache's fScratchMap

The reasoning here is that resources with a unique key are never selected from fScratchMap and just clog up the search for an available resource.

This knocks a 200x loop over the SVGbouncingrects case from 264ms down to 164ms.

BUG=603969
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2008083002

Review-Url: https://codereview.chromium.org/2008083002

8 years agoMake Sk32ToBool inline again to silence compiler warning.
bsalomon [Tue, 24 May 2016 20:23:56 +0000 (13:23 -0700)]
Make Sk32ToBool inline again to silence compiler warning.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007753003

Review-Url: https://codereview.chromium.org/2007753003

8 years agoCMake: skia_link_arguments.txt repects BUILD_SHARED_LIBS
halcanary [Tue, 24 May 2016 18:23:23 +0000 (11:23 -0700)]
CMake: skia_link_arguments.txt repects BUILD_SHARED_LIBS

.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007093002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2007093002

8 years agoSkColorSpace tweaks
msarett [Tue, 24 May 2016 17:16:53 +0000 (10:16 -0700)]
SkColorSpace tweaks

***Move includes to the correct file
***Add "const"
***Use std::move for more efficient refs and unrefs

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

Review-Url: https://codereview.chromium.org/2005263002

8 years agoCMake: control static/shared the normal CMake way.
mtklein [Tue, 24 May 2016 16:44:05 +0000 (09:44 -0700)]
CMake: control static/shared the normal CMake way.

This flips the default build mode to create a static libskia.

To create a shared libskia, pass -DBUILD_SHARED_LIBS=1 when running cmake.

BUG=skia:5341
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2009503002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2009503002

8 years agoUse nullptr instead of 0 in call to FontConfig.
bungeman [Tue, 24 May 2016 15:08:20 +0000 (08:08 -0700)]
Use nullptr instead of 0 in call to FontConfig.

Review-Url: https://codereview.chromium.org/2000253005

8 years agopthread_once -> SkOnce
mtklein [Tue, 24 May 2016 14:01:48 +0000 (07:01 -0700)]
pthread_once -> SkOnce

one fewer sync primitive...

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

Review-Url: https://codereview.chromium.org/2003163004

8 years agoRemove extra DNG images and use smaller HTC.dng
scroggo [Tue, 24 May 2016 13:23:47 +0000 (06:23 -0700)]
Remove extra DNG images and use smaller HTC.dng

Update SK_IMAGE_VERSION to 7. This removes the following files from
dm testing:

lg_g4_iso_800.dng
Fuji_X20.dng

These DNG images are very large, and cause us to use a lot of memory in
testing. Moreover, they do not test anything that is not covered by
HTC.dng

In addition, use the smaller version of HTC.dng (which is already in
use in dm) in nanobench.

BUG=skia:5307
BUG=skia:5283
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007033002

Review-Url: https://codereview.chromium.org/2007033002

8 years agoRemove sRGB overrides on GrTextureParams. Use GrPaint flags instead.
brianosman [Tue, 24 May 2016 13:18:48 +0000 (06:18 -0700)]
Remove sRGB overrides on GrTextureParams. Use GrPaint flags instead.

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

Review-Url: https://codereview.chromium.org/2002253002

8 years agogyp: supress more warnings for zlib
halcanary [Tue, 24 May 2016 12:23:52 +0000 (05:23 -0700)]
gyp: supress more warnings for zlib

TBR=

Review-Url: https://codereview.chromium.org/2008763003

8 years agoRevert of Blacklist HTC.dng on 32-bit Win CPU bots (patchset #1 id:1 of https://coder...
scroggo [Mon, 23 May 2016 21:35:52 +0000 (14:35 -0700)]
Revert of Blacklist HTC.dng on 32-bit Win CPU bots (patchset #1 id:1 of https://codereview.chromium.org/1995703002/ )

Reason for revert:
We think we have independently fixed this problem by using a smaller image for HTC.dng

Original issue's description:
> Blacklist HTC.dng on 32-bit Win CPU bots
>
> BUG=skia:5318
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1995703002
>
> Committed: https://skia.googlesource.com/skia/+/62efdbde9987df3422f677a1a7c8f355791c1ae4

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

Review-Url: https://codereview.chromium.org/2004203002

8 years agogyp: clean up warnings with clang-3.8
halcanary [Mon, 23 May 2016 21:02:54 +0000 (14:02 -0700)]
gyp: clean up warnings with clang-3.8

Also: update zlib DEPS.

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

Review-Url: https://codereview.chromium.org/2002233002

8 years agoAdd bubbles GM for drawing/blending 50 circles.
fmenozzi [Mon, 23 May 2016 20:54:22 +0000 (13:54 -0700)]
Add bubbles GM for drawing/blending 50 circles.

Positions, radii, and colors are determined pseudo-randomly.

R=tomhudson@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004173002

Review-Url: https://codereview.chromium.org/2004173002

8 years agoI have found a more efficient way of detecting 1 and 0 alpha in SSE2. In addition...
herb [Mon, 23 May 2016 20:50:12 +0000 (13:50 -0700)]
I have found a more efficient way of detecting 1 and 0 alpha in SSE2. In addition, I found a stall on an execution unit for the lea instruction and rearranged to code to avoid that.

Before
 1,362.01 LinearSrcOvericonstrip.pngVSkOptsSSE41
 2,132.54 LinearSrcOvericonstrip.pngVSkOptsDefault
 1,717.77 LinearSrcOvericonstrip.pngVSkOptsNonSimdCore
 3,525.14 LinearSrcOvericonstrip.pngVSkOptsTrivial
11,181.78 LinearSrcOvericonstrip.pngVSkOptsBruteForce
   644.77 LinearSrcOvermandrill_512.pngVSkOptsSSE41
   682.51 LinearSrcOvermandrill_512.pngVSkOptsDefault
 1,169.65 LinearSrcOvermandrill_512.pngVSkOptsNonSimdCore
 2,486.45 LinearSrcOvermandrill_512.pngVSkOptsTrivial
11,635.94 LinearSrcOvermandrill_512.pngVSkOptsBruteForce
   217.76 LinearSrcOverplane.pngVSkOptsSSE41
   437.09 LinearSrcOverplane.pngVSkOptsDefault
   275.91 LinearSrcOverplane.pngVSkOptsNonSimdCore
   481.70 LinearSrcOverplane.pngVSkOptsTrivial
 1,504.66 LinearSrcOverplane.pngVSkOptsBruteForce
   323.90 LinearSrcOverbaby_tux.pngVSkOptsSSE41
   497.49 LinearSrcOverbaby_tux.pngVSkOptsDefault
   456.08 LinearSrcOverbaby_tux.pngVSkOptsNonSimdCore
   786.46 LinearSrcOverbaby_tux.pngVSkOptsTrivial
 2,554.65 LinearSrcOverbaby_tux.pngVSkOptsBruteForce
   484.83 LinearSrcOveryellow_rose.pngVSkOptsSSE41
   821.86 LinearSrcOveryellow_rose.pngVSkOptsDefault
   655.37 LinearSrcOveryellow_rose.pngVSkOptsNonSimdCore
 1,323.80 LinearSrcOveryellow_rose.pngVSkOptsTrivial
 5,802.61 LinearSrcOveryellow_rose.pngVSkOptsBruteForce

After changes to sse2 and sse4.1
  1,343.12 LinearSrcOvericonstrip.pngVSkOptsSSE41
  1,441.17 LinearSrcOvericonstrip.pngVSkOptsDefault
  1,679.97 LinearSrcOvericonstrip.pngVSkOptsNonSimdCore
  3,481.05 LinearSrcOvericonstrip.pngVSkOptsTrivial
 10,979.99 LinearSrcOvericonstrip.pngVSkOptsBruteForce
    574.17 LinearSrcOvermandrill_512.pngVSkOptsSSE41
    641.40 LinearSrcOvermandrill_512.pngVSkOptsDefault
  1,169.44 LinearSrcOvermandrill_512.pngVSkOptsNonSimdCore
  2,359.84 LinearSrcOvermandrill_512.pngVSkOptsTrivial
 12,106.02 LinearSrcOvermandrill_512.pngVSkOptsBruteForce
    209.95 LinearSrcOverplane.pngVSkOptsSSE41
    249.12 LinearSrcOverplane.pngVSkOptsDefault
    270.36 LinearSrcOverplane.pngVSkOptsNonSimdCore
    466.30 LinearSrcOverplane.pngVSkOptsTrivial
  1,431.14 LinearSrcOverplane.pngVSkOptsBruteForce
    309.70 LinearSrcOverbaby_tux.pngVSkOptsSSE41
    354.86 LinearSrcOverbaby_tux.pngVSkOptsDefault
    442.69 LinearSrcOverbaby_tux.pngVSkOptsNonSimdCore
    764.12 LinearSrcOverbaby_tux.pngVSkOptsTrivial
  2,756.16 LinearSrcOverbaby_tux.pngVSkOptsBruteForce
    457.70 LinearSrcOveryellow_rose.pngVSkOptsSSE41
    500.50 LinearSrcOveryellow_rose.pngVSkOptsDefault
    677.84 LinearSrcOveryellow_rose.pngVSkOptsNonSimdCore
  1,301.50 LinearSrcOveryellow_rose.pngVSkOptsTrivial
  5,786.40 LinearSrcOveryellow_rose.pngVSkOptsBruteForce

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

Review-Url: https://codereview.chromium.org/1998373002

8 years agoAdd Xlib support to viewer
jvanverth [Mon, 23 May 2016 20:13:36 +0000 (13:13 -0700)]
Add Xlib support to viewer

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

Review-Url: https://codereview.chromium.org/1999213002

8 years agoEnable stencil wrap ops on vulkan
egdaniel [Mon, 23 May 2016 19:34:38 +0000 (12:34 -0700)]
Enable stencil wrap ops on vulkan

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

Review-Url: https://codereview.chromium.org/2002213002

8 years agoMove inval dedup to Window for wider usages.
liyuqian [Mon, 23 May 2016 17:52:34 +0000 (10:52 -0700)]
Move inval dedup to Window for wider usages.

It turns out that the inval dedup is not just useful for Android.  Hence
we move it up to the Window level so more OSes such as Linux, Windows
can also use it.

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

Review-Url: https://codereview.chromium.org/2001153002

8 years agoTest color correction in DM
msarett [Mon, 23 May 2016 17:21:17 +0000 (10:21 -0700)]
Test color correction in DM

This will allow me to test and visualize some assumptions
on parsing and applying color profiles.  Also, it should
help me find and fix bugs.

This is certainly not an optimized implementation, and, as
far as I know, it doesn't take any shortcuts to improve
performance.  We'll probably want to do both of these
once we know where it fits in the pipeline.

Right now this test is only run on an arbitrary set of ~100
images from the top 10k skps.  I'll continue to add more
"interesting" images and probably tweak the code as
necessary.

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

Review-Url: https://codereview.chromium.org/1995233003

8 years agoUpdate image testing to version 6
msarett [Mon, 23 May 2016 17:19:26 +0000 (10:19 -0700)]
Update image testing to version 6

This replaces the old HTC.dng test image (~40 MB) with a much smaller
HTC.dng (~125 kb).

This should limit OOM errors on our bots and improve the speed of the
tests suite.

BUG=skia:5283
BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004113002

Review-Url: https://codereview.chromium.org/2004113002

8 years agoEnable tri-linear and NPOT-tiling support in Vulkan
brianosman [Mon, 23 May 2016 17:15:27 +0000 (10:15 -0700)]
Enable tri-linear and NPOT-tiling support in Vulkan

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

Review-Url: https://codereview.chromium.org/2004123002

8 years agoAdd vksrgb config to dm (Vulkan sRGB). Fix help formatting of vk.
brianosman [Mon, 23 May 2016 17:11:07 +0000 (10:11 -0700)]
Add vksrgb config to dm (Vulkan sRGB). Fix help formatting of vk.

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

Review-Url: https://codereview.chromium.org/2005863002

8 years agoMake SkColorSpace a public API
msarett [Mon, 23 May 2016 16:29:29 +0000 (09:29 -0700)]
Make SkColorSpace a public API

I've trimmed uniqueID for now, and added some comments.

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

Review-Url: https://codereview.chromium.org/1996973002

8 years agoSkTypes: use constexpr when appropriate
halcanary [Mon, 23 May 2016 16:11:58 +0000 (09:11 -0700)]
SkTypes: use constexpr when appropriate

motivation: https://codereview.chromium.org/2000853003

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

Review-Url: https://codereview.chromium.org/2004073002

8 years agofiddle: srand(0) before draw(canvas)
halcanary [Mon, 23 May 2016 16:02:38 +0000 (09:02 -0700)]
fiddle: srand(0) before draw(canvas)

TBR=

Review-Url: https://codereview.chromium.org/2003043002

8 years agoPretend that Adreno4xx doesn't have sRGB write control.
brianosman [Mon, 23 May 2016 13:23:27 +0000 (06:23 -0700)]
Pretend that Adreno4xx doesn't have sRGB write control.

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

Review-Url: https://codereview.chromium.org/1998953003

8 years agoUpdate SKP version
update-skps [Sun, 22 May 2016 07:35:10 +0000 (00:35 -0700)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2004773002

Review-Url: https://codereview.chromium.org/2004773002

8 years agoRemove unnecessary check
scroggo [Fri, 20 May 2016 21:27:16 +0000 (14:27 -0700)]
Remove unnecessary check

Follow-on from crrev.com/1996993003

No need to check the alpha type. If the color type is gray, the
source alpha type will be opaque.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002723002

Review-Url: https://codereview.chromium.org/2002723002

8 years agoFinish supporting decoding opaque to non-opaque
scroggo [Fri, 20 May 2016 20:56:13 +0000 (13:56 -0700)]
Finish supporting decoding opaque to non-opaque

When decoding to 565 or Gray, allow the client to incorrectly ask for premul.

When checking whether it's possible to decode to 565, return whether the
source is opaque.

In DM, allow decoding to 565 or Gray, even if the client also asked for premul.

This fixes a bug introduced in crrev.com/1999593003 when we stopped ever
requesting Opaque, resulting in us not testing 565 or Gray.

BUG=skia:4616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1996993003

Review-Url: https://codereview.chromium.org/1996993003

8 years agoSave comparisons for release.
liyuqian [Fri, 20 May 2016 19:41:49 +0000 (12:41 -0700)]
Save comparisons for release.

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

Review-Url: https://codereview.chromium.org/1997003003

8 years agoUse SkASSERTResult to avoid unused local variables
liyuqian [Fri, 20 May 2016 18:41:01 +0000 (11:41 -0700)]
Use SkASSERTResult to avoid unused local variables

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

Review-Url: https://codereview.chromium.org/2003653002

8 years agoRemove custom bundle ID for iOS
stephana [Fri, 20 May 2016 18:20:38 +0000 (11:20 -0700)]
Remove custom bundle ID for iOS

BUG=skia:
R=borenet
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1998273002

Review-Url: https://codereview.chromium.org/1998273002

8 years agoRetract GrRenderTarget from GrTestTarget
robertphillips [Fri, 20 May 2016 18:14:33 +0000 (11:14 -0700)]
Retract GrRenderTarget from GrTestTarget

Split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

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

Review-Url: https://codereview.chromium.org/2004433002

8 years agoOnly decode opaque to premul in DM image
scroggo [Fri, 20 May 2016 18:08:27 +0000 (11:08 -0700)]
Only decode opaque to premul in DM image

Previously, we would test decoding an opaque SkCodec to all three:
kUnpremul,
kPremul,
kOpaque

The image should look the same in all three cases. We already test for
that in CodecTest [1], where we require that the result matches exactly.
CodecTest runs on a smaller set of images, but it covers a variety of
opaque images. No need to test on all opaque images.

Running locally on my Mac laptop, the following command:

    dm --src image --images resources/

dropped from:
5932 srcs
11.2s

to:

3544 srcs
6.69s

for a 40% speedup.

BUG=skia:5307

[1] https://skia.googlesource.com/skia/+/master/tests/CodecTest.cpp#119
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1999593003

Review-Url: https://codereview.chromium.org/1999593003

8 years agogyp (third_party) warning changes for ccache
halcanary [Fri, 20 May 2016 17:36:50 +0000 (10:36 -0700)]
gyp (third_party) warning changes for ccache

Also fix a broken unit test in MatrixTest.cpp.

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

Review-Url: https://codereview.chromium.org/2002663002

8 years agoWhen building circle blur profile evaluate kernel vertically once per column
bsalomon [Fri, 20 May 2016 16:11:17 +0000 (09:11 -0700)]
When building circle blur profile evaluate kernel vertically once per column

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

Review-Url: https://codereview.chromium.org/1991413002

8 years agoMake LinearSrcOverBench not crash in constructor when resource path is missing
bsalomon [Fri, 20 May 2016 15:54:23 +0000 (08:54 -0700)]
Make LinearSrcOverBench not crash in constructor when resource path is missing
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1998113003

Review-Url: https://codereview.chromium.org/1998113003

8 years agoStop creating CodecSrcs with unused scale
scroggo [Fri, 20 May 2016 15:38:54 +0000 (08:38 -0700)]
Stop creating CodecSrcs with unused scale

Only JPEG and WEBP support native scaling, so only create a CodecSrc
with a scale for those types.

If I run

    dm --src image --images resources

this cuts down the number of Srcs from 11063 to 8032. All of these
trimmed Srcs would have failed quickly for each Sink (3 Sinks with the
above flags), but this will avoid creating them.

It drops the runtime on my mac from 13.2s to 11.4s, for about a 14%
speedup.

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

Review-Url: https://codereview.chromium.org/1999103002

8 years agoAdjust size of imagemakewithfilter GM.
senorblanco [Fri, 20 May 2016 14:59:09 +0000 (07:59 -0700)]
Adjust size of imagemakewithfilter GM.

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

Review-Url: https://codereview.chromium.org/2003453003

8 years agoCorrect gesture scale and translation
liyuqian [Fri, 20 May 2016 14:32:19 +0000 (07:32 -0700)]
Correct gesture scale and translation

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

Review-Url: https://codereview.chromium.org/1996613002

8 years agoFix leak in SkImage_Gpu::onMakeSubset().
senorblanco [Fri, 20 May 2016 14:27:38 +0000 (07:27 -0700)]
Fix leak in SkImage_Gpu::onMakeSubset().

BUG=skia:5327
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2003573002

Review-Url: https://codereview.chromium.org/2003573002

8 years agoFix android scripts now that the $HOST is always lowercase.
djsollen [Fri, 20 May 2016 14:03:17 +0000 (07:03 -0700)]
Fix android scripts now that the $HOST is always lowercase.

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

Review-Url: https://codereview.chromium.org/1992873003

8 years agoGrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext)
robertphillips [Fri, 20 May 2016 13:38:43 +0000 (06:38 -0700)]
GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext)

This is split out of: https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

BUG=skia:

Review-Url: https://codereview.chromium.org/1993403002

8 years agoReduce the number of BRDSrcs run in DM
scroggo [Fri, 20 May 2016 13:02:42 +0000 (06:02 -0700)]
Reduce the number of BRDSrcs run in DM

Testing to e.g. Index8 is useful, but not usefully different across
all sampleSizes and Modes. (Same for Gray.) Drop several Srcs.

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

Review-Url: https://codereview.chromium.org/1990173003

8 years agoAdd OpenGL context to Viewer.
jvanverth [Fri, 20 May 2016 13:01:06 +0000 (06:01 -0700)]
Add OpenGL context to Viewer.

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

Committed: https://skia.googlesource.com/skia/+/56a11e4d6f3d436a3c2497c9c9e71a117d78a93f

Review-Url: https://codereview.chromium.org/1978573003

8 years agoFix Gold trybot results URL
rmistry [Fri, 20 May 2016 10:50:01 +0000 (03:50 -0700)]
Fix Gold trybot results URL

BUG=skia:5324
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1996103002

Review-Url: https://codereview.chromium.org/1996103002

8 years agoMake GrAtlasTextBlob::run own effects it points to.
bsalomon [Thu, 19 May 2016 23:23:47 +0000 (16:23 -0700)]
Make GrAtlasTextBlob::run own effects it points to.

BUG=chromium:608566

Currently the run has bare pointers and the effects can be destroyed while a run is pointing at them.

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

Review-Url: https://codereview.chromium.org/1993213003

8 years agoMake circle blur profile computation separable
bsalomon [Thu, 19 May 2016 22:52:34 +0000 (15:52 -0700)]
Make circle blur profile computation separable

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

Review-Url: https://codereview.chromium.org/1996653002

8 years agoImage filters: implement SkImage::makeWithFilter().
senorblanco [Thu, 19 May 2016 21:50:29 +0000 (14:50 -0700)]
Image filters: implement SkImage::makeWithFilter().

This API provides a way to directly filter a subregion of an SkImage
(usually texture-backed), and returns an SkImage which may include
extra padding, along with a size to indicate the active region.

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

Review-Url: https://codereview.chromium.org/1964043002

8 years agoMake an embeddable container to hold linear pipelines.
herb [Thu, 19 May 2016 21:19:23 +0000 (14:19 -0700)]
Make an embeddable container to hold linear pipelines.

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

Review-Url: https://codereview.chromium.org/1998793002

8 years agoRetract GrRenderTarget from GLProgramsTest
robertphillips [Thu, 19 May 2016 21:01:05 +0000 (14:01 -0700)]
Retract GrRenderTarget from GLProgramsTest

Split out of https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder)

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

Review-Url: https://codereview.chromium.org/1997773002

8 years agoAttempt to improve lifetime management of SkGlyphCache in Ganesh atlas text code.
bsalomon [Thu, 19 May 2016 19:51:46 +0000 (12:51 -0700)]
Attempt to improve lifetime management of SkGlyphCache in Ganesh atlas text code.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1983353003

Review-Url: https://codereview.chromium.org/1983353003

8 years agoMake GrAppliedClip friendless
robertphillips [Thu, 19 May 2016 18:36:25 +0000 (11:36 -0700)]
Make GrAppliedClip friendless

GrAppliedClip is a pretty amiable class but not so good about setting boundaries. It is probably for the best that it breaks things off with GrClipMaskManager before the drama of https://codereview.chromium.org/1988923002/ (Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder) begins.

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

Review-Url: https://codereview.chromium.org/1993263002

8 years agoRemove mutex for retrieving default typeface.
bungeman [Thu, 19 May 2016 18:23:55 +0000 (11:23 -0700)]
Remove mutex for retrieving default typeface.

This mutex was added due to FontConfigTypeface::LegacyCreateTypeface
being non-thread safe. This method no longer exists and the logic was
moved to SkFontMgr_FCI::onLegacyCreateTypeface which has access to an
appropriate mutex ("Clean up SkFontConfigInterface implementation.",
0265707c191a31dfde08dd1cd7011c1fe5b8e643).

Review-Url: https://codereview.chromium.org/1994703003

8 years agoPropagate filter mode when rendering Alpha8 bitmaps
brianosman [Thu, 19 May 2016 15:43:55 +0000 (08:43 -0700)]
Propagate filter mode when rendering Alpha8 bitmaps

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

Review-Url: https://codereview.chromium.org/1988023009

8 years agoDelete workaround for matching bitmap and pixel ref rowbytes
msarett [Thu, 19 May 2016 14:50:24 +0000 (07:50 -0700)]
Delete workaround for matching bitmap and pixel ref rowbytes

We now handle this in:
https://googleplex-android-review.git.corp.google.com/#/c/1051261/

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

Review-Url: https://codereview.chromium.org/1992143003

8 years agoAssert complex precondition in SkGlyphCache::Visit.
bungeman [Thu, 19 May 2016 14:43:52 +0000 (07:43 -0700)]
Assert complex precondition in SkGlyphCache::Visit.

SkGlyphCache::Visit takes a descriptor and a typeface, but it is implied
that the fFontID in the descriptor is the id of the typeface. This seems
to be handled correctly by current callers but this is a subtle
requirement which if violated could lead to subtle bugs.

Review-Url: https://codereview.chromium.org/1992053002

8 years agoUpdate Skia milestone to 53 after 52 branch
hcm [Thu, 19 May 2016 12:26:57 +0000 (05:26 -0700)]
Update Skia milestone to 53 after 52 branch

TBR=reed@google.com

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

Review-Url: https://codereview.chromium.org/1993203002

8 years agoRevert of Don't allow uncacheable paths in tessellated path renderer (patchset #2...
bsalomon [Wed, 18 May 2016 20:52:05 +0000 (13:52 -0700)]
Revert of Don't allow uncacheable paths in tessellated path renderer (patchset #2 id:20001 of https://codereview.chromium.org/1990793003/ )

Reason for revert:
Caused innershapes test to be rendered incorrectly on the N10. This might be a driver bug.

Original issue's description:
> Don't allow uncacheable paths in tessellated path renderer
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990793003
>
> Committed: https://skia.googlesource.com/skia/+/aebd0fd32f8fde610de03b4f1e6d11ce24bfb73d

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

Review-Url: https://codereview.chromium.org/1993923002