platform/upstream/libSkiaSharp.git
8 years agomake sure to init the clip operation
Matthew Leibowitz [Fri, 13 May 2016 16:52:01 +0000 (18:52 +0200)]
make sure to init the clip operation

8 years agoAdd support for getting the clip bounds
Matthew Leibowitz [Fri, 13 May 2016 14:52:43 +0000 (16:52 +0200)]
Add support for getting the clip bounds

8 years agoAdded extended clipping features
Matthew Leibowitz [Fri, 13 May 2016 14:30:15 +0000 (16:30 +0200)]
Added extended clipping features

8 years agoRemoved the UTF16/Unicode functions
Matthew Leibowitz [Thu, 12 May 2016 14:44:05 +0000 (16:44 +0200)]
Removed the UTF16/Unicode functions
 - this is done in the managed code now
 - removes the need to change the paint instance

8 years agoMerge pull request #12 from mono/windows-uwp-merge
Matthew Leibowitz [Thu, 12 May 2016 00:16:27 +0000 (02:16 +0200)]
Merge pull request #12 from mono/windows-uwp-merge

Windows UWP Merge

8 years agoAdd this warning to temporarily fix a warning
Matthew Leibowitz [Fri, 6 May 2016 15:24:53 +0000 (17:24 +0200)]
Add this warning to temporarily fix a warning
 - https://github.com/mono/SkiaSharp/issues/58

8 years agoMerge branch 'xamarin-mobile-bindings' into windows-uwp
Matthew Leibowitz [Thu, 5 May 2016 01:34:39 +0000 (03:34 +0200)]
Merge branch 'xamarin-mobile-bindings' into windows-uwp

8 years agoCorrecting the return type of sk_canvas_save and sk_canvas_save_layer to be int...
Matthew Leibowitz [Tue, 19 Apr 2016 21:48:23 +0000 (23:48 +0200)]
Correcting the return type of sk_canvas_save and  sk_canvas_save_layer to be int instead of void

8 years agoMerge pull request #7 from kekekeks/perspex-missing-1
Matthew Leibowitz [Tue, 19 Apr 2016 00:46:56 +0000 (02:46 +0200)]
Merge pull request #7 from kekekeks/perspex-missing-1

Added sk_canvas_draw_round_rect, sk_path_transform, sk_path_clone

8 years agoMerge pull request #9 from mono/xamarin-m49-update
Matthew Leibowitz [Tue, 19 Apr 2016 00:38:20 +0000 (02:38 +0200)]
Merge pull request #9 from mono/xamarin-m49-update

Xamarin m49 Update

8 years agoMerge branch 'chrome/m49' into xamarin-m49-update
Matthew Leibowitz [Mon, 18 Apr 2016 23:25:40 +0000 (01:25 +0200)]
Merge branch 'chrome/m49' into xamarin-m49-update

8 years agoAdded sk_canvas_draw_round_rect, sk_path_transform, sk_path_clone (v2)
Nikita Tsukanov [Mon, 18 Apr 2016 23:20:01 +0000 (02:20 +0300)]
Added sk_canvas_draw_round_rect, sk_path_transform, sk_path_clone (v2)

8 years agoMerge pull request #8 from mono/xamarin-m49-update
Matthew Leibowitz [Mon, 18 Apr 2016 22:27:33 +0000 (00:27 +0200)]
Merge pull request #8 from mono/xamarin-m49-update

Xamarin m49 Update

8 years agoSwap those slashes
Matthew Leibowitz [Mon, 18 Apr 2016 21:24:36 +0000 (23:24 +0200)]
Swap those slashes

8 years agoReverting manual change
Matthew Leibowitz [Mon, 18 Apr 2016 16:58:51 +0000 (18:58 +0200)]
Reverting manual change

8 years ago[C API] Moved the Xamarin code into separate files to avoid conflicts
Matthew Leibowitz [Mon, 18 Apr 2016 16:50:32 +0000 (18:50 +0200)]
[C API] Moved the Xamarin code into separate files to avoid conflicts

8 years agoAdded the bits to support WinRT/UWP
Matthew Leibowitz [Thu, 14 Apr 2016 17:55:22 +0000 (19:55 +0200)]
Added the bits to support WinRT/UWP

8 years agoAdding dither functions to sk_paint.
Bill Holmes [Fri, 8 Apr 2016 19:15:10 +0000 (15:15 -0400)]
Adding dither functions to sk_paint.

Sets the dither flag of the SKPaint.

8 years agoAdding verticaltext functions for sk_paint
Bill Holmes [Fri, 8 Apr 2016 18:31:03 +0000 (14:31 -0400)]
Adding verticaltext functions for sk_paint

8 years agoMerge remote-tracking branch 'origin/pr/5' into xamarin-mobile-bindings
Bill Holmes [Fri, 8 Apr 2016 16:07:47 +0000 (12:07 -0400)]
Merge remote-tracking branch 'origin/pr/5' into xamarin-mobile-bindings

closes #5

8 years agoMerge branch 'xamarin-mobile-bindings' into pr/4
Bill Holmes [Fri, 8 Apr 2016 14:12:09 +0000 (10:12 -0400)]
Merge branch 'xamarin-mobile-bindings' into pr/4

closes #4

8 years agoAdding sk_path_add_rect_start to the c api.
Bill Holmes [Fri, 8 Apr 2016 02:31:57 +0000 (22:31 -0400)]
Adding sk_path_add_rect_start to the c api.

8 years agoAdding sk_path_add_arc to the c api.
Bill Holmes [Fri, 8 Apr 2016 01:59:15 +0000 (21:59 -0400)]
Adding sk_path_add_arc to the c api.

8 years agoAdding the 'r' methods to sk_path c api
Bill Holmes [Fri, 8 Apr 2016 01:34:47 +0000 (21:34 -0400)]
Adding the 'r' methods to sk_path c api

 - sk_path_rmove_to
 - sk_path_rline_to
 - sk_path_rquad_to
 - sk_path_rconic_to
 - sk_path_rcubic_to

8 years agoAdd C API for SkPaint::getTextPath and SkPaint::getPosTextPath
Peter Golde [Fri, 25 Mar 2016 21:42:40 +0000 (14:42 -0700)]
Add C API for SkPaint::getTextPath and SkPaint::getPosTextPath

8 years agonew API for setting/getting filter quality
Peter Golde [Sun, 20 Mar 2016 02:28:28 +0000 (19:28 -0700)]
new API for setting/getting filter quality

8 years agoFixing the signature for sk_paint_get_fontmetrics.
Bill Holmes [Tue, 22 Mar 2016 19:02:21 +0000 (15:02 -0400)]
Fixing the signature for sk_paint_get_fontmetrics.

Adding the scale argument
Setting the return value

8 years agoMerge pull request #3 from petergolde/fontmetrics
Bill Holmes [Tue, 22 Mar 2016 15:24:36 +0000 (11:24 -0400)]
Merge pull request #3 from petergolde/fontmetrics

Add C API for SKPaint::getFontMetrics

8 years agoMerge branch 'utf16-bug-fix' into fontmetrics
Peter Golde [Fri, 18 Mar 2016 19:08:06 +0000 (12:08 -0700)]
Merge branch 'utf16-bug-fix' into fontmetrics

8 years agoMerge pull request #2 from petergolde/utf16-bug-fix
Bill Holmes [Fri, 18 Mar 2016 14:54:11 +0000 (10:54 -0400)]
Merge pull request #2 from petergolde/utf16-bug-fix

Fix bug in utf16 C APIs where character count and byte count were confused.

8 years agoFixing the return type of sk_canvas_save.
Bill Holmes [Fri, 18 Mar 2016 13:38:18 +0000 (09:38 -0400)]
Fixing the return type of sk_canvas_save.

These methods return ints.

8 years agoMerge pull request #1 from petergolde/path-fill-type
Bill Holmes [Fri, 18 Mar 2016 03:03:32 +0000 (23:03 -0400)]
Merge pull request #1 from petergolde/path-fill-type

Add new C API for setting/getting fill type.

8 years agoMerge branch 'utf16-bug-fix' into fontmetrics
Peter Golde [Wed, 16 Mar 2016 21:26:43 +0000 (14:26 -0700)]
Merge branch 'utf16-bug-fix' into fontmetrics

8 years agoAdd multiply by sizeof UTF16 character, because SkPaint::measureText and SkPaint...
Peter Golde [Wed, 16 Mar 2016 21:26:28 +0000 (14:26 -0700)]
Add multiply by sizeof UTF16 character, because SkPaint::measureText and SkPaint::breakText take a byte count.

8 years agoAdd C API for getting font metrics from an sk_paint_t.
Peter Golde [Tue, 15 Mar 2016 17:27:40 +0000 (10:27 -0700)]
Add C API for getting font metrics from an sk_paint_t.

8 years agoAdd new C API for settign/getting fill type.
Peter Golde [Mon, 14 Mar 2016 20:35:52 +0000 (13:35 -0700)]
Add new C API for settign/getting fill type.

8 years ago[C API] SKImage now can encode with a specified format and quality
Miguel de Icaza [Sun, 6 Mar 2016 04:20:46 +0000 (23:20 -0500)]
[C API] SKImage now can encode with a specified format and quality

8 years ago[C API] SKPaint, added APIs that take UTF16 string, which allow for direct marshaling...
Miguel de Icaza [Sun, 6 Mar 2016 03:16:30 +0000 (22:16 -0500)]
[C API] SKPaint, added APIs that take UTF16 string, which allow for direct marshaling in Mono

8 years agoSkPDF: roll back 53b1c09 and 05b48e2
halcanary [Tue, 1 Mar 2016 20:17:41 +0000 (12:17 -0800)]
SkPDF: roll back 53b1c09 and 05b48e2

See:
https://crrev.com/1552263003
https://crrev.com/1438503002

BUG=skia:257
BUG=skia:734
  BUG=577794

Review URL: https://codereview.chromium.org/1645803003
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1752913002
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true
TBR=tomhudson@google.com

Review URL: https://codereview.chromium.org/1752913002

8 years ago[C API] Added string measuring to SKPaint
Matthew Leibowitz [Mon, 29 Feb 2016 20:05:00 +0000 (22:05 +0200)]
[C API] Added string measuring to SKPaint

8 years ago[C API] Added more SkCanvas members
Matthew Leibowitz [Sat, 6 Feb 2016 04:48:45 +0000 (06:48 +0200)]
[C API] Added more SkCanvas members

8 years ago[C API] Change the method signatures from & to * as this seems to cause issue in...
Matthew Leibowitz [Fri, 5 Feb 2016 19:55:12 +0000 (21:55 +0200)]
[C API] Change the method signatures from & to * as this seems to cause issue in Xcode

8 years ago[C API] Updated the code to match the new chrome\m49 release
Matthew Leibowitz [Thu, 4 Feb 2016 13:58:33 +0000 (15:58 +0200)]
[C API] Updated the code to match the new chrome\m49 release

8 years agoMerge branch 'chrome/m49' into xamarin-mobile-bindings
Matthew Leibowitz [Wed, 3 Feb 2016 21:33:30 +0000 (23:33 +0200)]
Merge branch 'chrome/m49' into xamarin-mobile-bindings

8 years agoFix fuzzer-found deserialization bug in SkPathRef
ajuma [Wed, 3 Feb 2016 18:15:04 +0000 (10:15 -0800)]
Fix fuzzer-found deserialization bug in SkPathRef

[Cherry pick of 0735de67c8a0812ae2fd103ae1bd7f2157c6a0b2 to chrome/m49.]

This fixes a bug in SkPathRef::CreateFromBuffer found by
fuzzing SkPaintImageFilter.

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

Review URL: https://codereview.chromium.org/1653003004
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1665613003

8 years agoFix zero-sized blur with crop rect.
Stephen White [Wed, 3 Feb 2016 14:38:46 +0000 (09:38 -0500)]
Fix zero-sized blur with crop rect.

[Cherry-pick of 6404981b0c3984ba91b3bda35e60c6c8a8a773c2 to chrome/m49.]

Neither the GPU nor CPU paths were correctly handling the crop rect
in this case.

NOTE: this change adds a new test case to the imageblurcropped GM, so
it will have to be rebaselined.

BUG=skia:4876
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657773002
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1663533003 .

8 years ago[C API] Added more methods for SkStream
Matthew Leibowitz [Mon, 1 Feb 2016 22:05:48 +0000 (00:05 +0200)]
[C API] Added more methods for SkStream

8 years agoImage filters: fix srcOffset handling in asFragmentProcessor() path.
Stephen White [Fri, 29 Jan 2016 14:08:44 +0000 (09:08 -0500)]
Image filters: fix srcOffset handling in asFragmentProcessor() path.

[Cherry-pick of eae84c2e0e2126374cd488a1c8a3e18169145635 to M49 branch.]

Filters such as SkMatrixConvolutionImageFilter which use the
asFragmentProcessor() path were not correctly handling srcOffset.
It is correctly applied to the bounds, but the srcRect and dstRect
were computed from the pre-offset bounds.

The fix is to move them to just above where they're used in drawing.

Note: this change adds a new test case to the imagefiltersgraph GM,
so it will have to be rebaselined post-landing.

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

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

Review URL: https://codereview.chromium.org/1650433004 .

8 years ago[C API] Added more features:
Matthew Leibowitz [Thu, 28 Jan 2016 02:02:13 +0000 (04:02 +0200)]
[C API] Added more features:
 - SkData
 - SkMaskFilter
 - SkColorFilter
 - SkImageFilter::CropRect
 - SkImageFilter
 - SkPaint
 - SkShader

8 years ago[C API] Improves support for bitmaps
Matthew Leibowitz [Mon, 25 Jan 2016 20:16:28 +0000 (22:16 +0200)]
[C API] Improves support for bitmaps

8 years agoFix bounds computations for SkDisplacementMapEffect with negative scale.
Stephen White [Sun, 24 Jan 2016 22:46:10 +0000 (17:46 -0500)]
Fix bounds computations for SkDisplacementMapEffect with negative scale.

[Cherrypick of 00502373c8d38b091fe1b9ba15b8510bcc0375bc to M49 branch.]

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

Review URL: https://codereview.chromium.org/1616663003
NOTREECHECKS=true
NOTRY=true
NOPRESUBMIT=true

Review URL: https://codereview.chromium.org/1626093002 .

8 years ago[C API] More work to get the rest of the SkImageDecoder members available
Matthew Leibowitz [Sat, 23 Jan 2016 16:43:49 +0000 (18:43 +0200)]
[C API] More work to get the rest of the SkImageDecoder members available

8 years ago[C API] Fixed some issues with the bitmap management
Matthew Leibowitz [Fri, 22 Jan 2016 00:13:34 +0000 (02:13 +0200)]
[C API] Fixed some issues with the bitmap management

8 years ago[C API] Allocate memory for bitmap dimensions
Matthew Leibowitz [Thu, 21 Jan 2016 14:15:13 +0000 (16:15 +0200)]
[C API] Allocate memory for bitmap dimensions

8 years ago[C API] Added support for bitmaps
Matthew Leibowitz [Thu, 21 Jan 2016 01:52:33 +0000 (03:52 +0200)]
[C API] Added support for bitmaps

8 years ago[C API] Moved the enums into different files for easier re-use
Matthew Leibowitz [Thu, 21 Jan 2016 01:35:55 +0000 (03:35 +0200)]
[C API] Moved the enums into different files for easier re-use

8 years agoRevert of these _procs_arm are not used when we have NEON (patchset #1 id:1 of https...
mtklein [Thu, 14 Jan 2016 21:49:17 +0000 (13:49 -0800)]
Revert of these _procs_arm are not used when we have NEON (patchset #1 id:1 of https://codereview.chromium.org/1587983004/ )

Reason for revert:
Breaks Chrome roll:

https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/8391/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> these _procs_arm are not used when we have NEON
>
> BUG=skia:4798
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1587983004
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/349dcc99b69f27ab834232796371e678625078e0

TBR=msarett@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:4798

Review URL: https://codereview.chromium.org/1589633005

8 years agoCreate an SkCodecImageGenerator
msarett [Thu, 14 Jan 2016 21:12:26 +0000 (13:12 -0800)]
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

8 years agofix SkGpuDevice::drawBitmapRect to always update clips
lsalzman [Thu, 14 Jan 2016 21:06:41 +0000 (13:06 -0800)]
fix SkGpuDevice::drawBitmapRect to always update clips

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

Review URL: https://codereview.chromium.org/1584073007

8 years agoUpdate tests to produce more sensible output for Android framework builds.
djsollen [Thu, 14 Jan 2016 20:23:54 +0000 (12:23 -0800)]
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

8 years agoRevert of Create an SkCodecImageGenerator (patchset #10 id:260001 of https://coderevi...
msarett [Thu, 14 Jan 2016 20:20:45 +0000 (12:20 -0800)]
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

8 years agoVisualBench: Make the Android SDL app start without cmdline arguments
kkinnunen [Thu, 14 Jan 2016 19:54:13 +0000 (11:54 -0800)]
VisualBench: Make the Android SDL app start without cmdline arguments

Make the Android SDL VisualBench start even if it is started without
command-line arguments.

Also makes it start when started by pressing the icon.

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

Review URL: https://codereview.chromium.org/1573913008

8 years agosketch SkValue API
mtklein [Thu, 14 Jan 2016 19:43:13 +0000 (11:43 -0800)]
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

8 years agoCreate an SkCodecImageGenerator
msarett [Thu, 14 Jan 2016 19:32:43 +0000 (11:32 -0800)]
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

8 years agothese _procs_arm are not used when we have NEON
mtklein [Thu, 14 Jan 2016 19:16:47 +0000 (11:16 -0800)]
these _procs_arm are not used when we have NEON

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

Review URL: https://codereview.chromium.org/1587983004

8 years agoAdd skeleton for kilobench experiments
joshualitt [Thu, 14 Jan 2016 19:05:22 +0000 (11:05 -0800)]
Add skeleton for kilobench experiments

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

Review URL: https://codereview.chromium.org/1582903002

8 years agoVirtualize Frames in GrAuditTrail
joshualitt [Thu, 14 Jan 2016 18:58:07 +0000 (10:58 -0800)]
Virtualize Frames in GrAuditTrail

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

Review URL: https://codereview.chromium.org/1581943004

8 years agoremove unused SkBitmapFilter::Allocate
reed [Thu, 14 Jan 2016 18:40:29 +0000 (10:40 -0800)]
remove unused SkBitmapFilter::Allocate

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

TBR=

Review URL: https://codereview.chromium.org/1589683004

8 years agoadd explicit bench for raw bitmapscaler
reed [Thu, 14 Jan 2016 18:10:56 +0000 (10:10 -0800)]
add explicit bench for raw bitmapscaler

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

patch from issue 1586803003 at patchset 20001 (http://crrev.com/1586803003#ps20001)

TBR=

Review URL: https://codereview.chromium.org/1588113002

8 years agoAdd Audittrail for path renderers
joshualitt [Thu, 14 Jan 2016 17:58:36 +0000 (09:58 -0800)]
Add Audittrail for path renderers

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

Review URL: https://codereview.chromium.org/1588683002

8 years agoBeginning of support for texture rectangles.
bsalomon [Thu, 14 Jan 2016 17:24:09 +0000 (09:24 -0800)]
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

8 years agoVisualBench: Use first succeeding EGL API
kkinnunen [Thu, 14 Jan 2016 17:12:01 +0000 (09:12 -0800)]
VisualBench: Use first succeeding EGL API

Fix initialization of the app window by
using the first EGL context that succeeds, not the last one.

Fixes the window creation in some cases on devices that support
OpenGL and OpenGL ES.

Also check EGL call results.

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

Review URL: https://codereview.chromium.org/1582313002

8 years agoexpand gm to exercise miplevels and various scalers
reed [Thu, 14 Jan 2016 17:11:51 +0000 (09:11 -0800)]
expand gm to exercise miplevels and various scalers

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

TBR=

Review URL: https://codereview.chromium.org/1574233003

8 years agoRevert of Make A8 readback work in more cases and improve testing. (patchset #5 id...
bsalomon [Thu, 14 Jan 2016 15:19:47 +0000 (07:19 -0800)]
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

8 years agoSampleApp: Make android_install_app and android_launch_app work consistently
kkinnunen [Thu, 14 Jan 2016 14:07:40 +0000 (06:07 -0800)]
SampleApp: Make android_install_app and android_launch_app work consistently

Make android_install_app work more consistently:
* App can be "SampleApp" or "VisualBench"

Make android_launch_app work more consistently:
* Parameters to SampleApp are passed correctly
* SampleApp is actually launched

The parameters to "am" need to be quoted, since the command
is run on the device shell.

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

Review URL: https://codereview.chromium.org/1589883002

8 years agoRefactor to use GrWrapTextureInBitmap more
robertphillips [Thu, 14 Jan 2016 14:03:29 +0000 (06:03 -0800)]
Refactor to use GrWrapTextureInBitmap more

Too many wrap_texture methods!

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

Review URL: https://codereview.chromium.org/1584933002

8 years agoSampleApp: Cleanup SkOSWindow_SDL
kkinnunen [Thu, 14 Jan 2016 13:37:51 +0000 (05:37 -0800)]
SampleApp: Cleanup SkOSWindow_SDL

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

Removes dead code.

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

Review URL: https://codereview.chromium.org/1578173002

8 years agosome fuzz hacking
mtklein [Thu, 14 Jan 2016 12:59:42 +0000 (04:59 -0800)]
some fuzz hacking

Try to start faster:
 - remove flags dependency
 - print nothing
 - strip unused symbols from the binary on Mac (smaller binary)
 - only create one fuzz object
 - only run one DEF_FUZZ
I am not sure if any of these things mattered, but I thought you may like to look.

Good stuff:
 - make nextU() / nextF() work
 - drop nextURange() / nextFRange() for now
 - add nextB() for a single byte

As you may have guessed, I have figured out how to use afl-fuzz on my laptop.

Syntax to run becomes:
  $ afl-fuzz ... out/Release/fuzz <DEF_FUZZ name> @@

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

Review URL: https://codereview.chromium.org/1581203003

8 years agoSimplify path allocation, clean up resources correctly
kkinnunen [Thu, 14 Jan 2016 07:36:45 +0000 (23:36 -0800)]
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

8 years agoMake android scripts not warn about ADB in newer SDKs
kkinnunen [Thu, 14 Jan 2016 06:53:55 +0000 (22:53 -0800)]
Make android scripts not warn about ADB in newer SDKs

The older SDK says:
$ adb version
Android Debug Bridge version 1.0.32

The newer SDK says:
$ adb version
Android Debug Bridge version 1.0.32
Revision eac51f2bb6a8-android

Removes the shebang as the file is not intended to be
run, and the copyright would render it useless.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1583793002

Review URL: https://codereview.chromium.org/1583793002

8 years agoMake sure we export symbols for Windows
Matthew Leibowitz [Thu, 14 Jan 2016 04:39:51 +0000 (06:39 +0200)]
Make sure we export symbols for Windows

8 years agoThe correct declaration for Windows is _WIN32 (underscore first)
Matthew Leibowitz [Thu, 14 Jan 2016 04:38:43 +0000 (06:38 +0200)]
The correct declaration for Windows is _WIN32 (underscore first)

8 years agoOptimized premultiplying swizzles for NEON
msarett [Wed, 13 Jan 2016 22:31:59 +0000 (14:31 -0800)]
Optimized premultiplying swizzles for NEON

Improves decode performance for RGBA encoded PNGs.

Swizzle Time on Nexus 9 (with clang):
SwapPremul 0.44x
Premul     0.44x
Decode Time On Nexus 9 (with clang):
ZeroInit Decodes 0.85x
Regular  Decodes 0.86x

Swizzle Time on Nexus 6P (with clang)
SwapPremul 0.14x
Premul     0.14x
Decode Time On Nexus 6P (with clang):
ZeroInit Decodes 0.93x
Regular  Decodes 0.95x

Notes:
ZeroInit means memory is zero initialized, and we do not write to
memory for large sections of zero pixels (memory use opt for Android).

A profile on Nexus 9 shows that the premultiplication step of PNG
decoding is now ~5% of decode time (down from ~20%).

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

Review URL: https://codereview.chromium.org/1577703006

8 years agoFix SkXfermodeImageFilter GPU fast path for differing sizes.
senorblanco [Wed, 13 Jan 2016 21:48:54 +0000 (13:48 -0800)]
Fix SkXfermodeImageFilter GPU fast path for differing sizes.

The GPU fast path was not doing the correct thing for input bitmaps of
differing sizes. This change brings the fast path in line with the
slow path: use the union of foreground and background bounds as bounds,
offset the draw context by the bounds translation, and translate the
foreground and background independently by their respective offsets.

Finally, we add a texture domain for the background fragment
processor, since we may access texels outside its domain.

Note: this adds two new test cases to the xfermodeimagefilter GM, so
those will need to be rebaselined.

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

Review URL: https://codereview.chromium.org/1588633002

8 years agoFix fuzzer-found deserialization bugs
ajuma [Wed, 13 Jan 2016 21:46:31 +0000 (13:46 -0800)]
Fix fuzzer-found deserialization bugs

This fixes deserialization bugs found by fuzzing SkPaintImageFilter.

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

Review URL: https://codereview.chromium.org/1589533002

8 years agoAllow Resize to be called w/ a preallocated pixmap
reed [Wed, 13 Jan 2016 21:36:31 +0000 (13:36 -0800)]
Allow Resize to be called w/ a preallocated pixmap

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

Review URL: https://codereview.chromium.org/1588653002

8 years agoRemove remaining users of draw*Rect calls
joshualitt [Wed, 13 Jan 2016 21:35:35 +0000 (13:35 -0800)]
Remove remaining users of draw*Rect calls

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

Review URL: https://codereview.chromium.org/1579223003

8 years agoAdd new fuzz binary.
mtklein [Wed, 13 Jan 2016 20:57:57 +0000 (12:57 -0800)]
Add new fuzz binary.

This is designed to have short startup time, for maximum fuzzing throughput.

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

Review URL: https://codereview.chromium.org/1589563002

8 years agoMove some program building utils from GL to GLSL
egdaniel [Wed, 13 Jan 2016 20:19:30 +0000 (12:19 -0800)]
Move some program building utils from GL to GLSL

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

Review URL: https://codereview.chromium.org/1535603006

8 years agoMake A8 readback work in more cases and improve testing.
bsalomon [Wed, 13 Jan 2016 20:19:15 +0000 (12:19 -0800)]
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

8 years agomicro fix for rrects bug using GrDrawContext
joshualitt [Wed, 13 Jan 2016 19:23:26 +0000 (11:23 -0800)]
micro fix for rrects bug using GrDrawContext

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

Review URL: https://codereview.chromium.org/1582933002

8 years agoRemove size check from SkCodec
msarett [Wed, 13 Jan 2016 18:54:20 +0000 (10:54 -0800)]
Remove size check from SkCodec

This check is useless because it is vulnerable to integer overflow.

Also, I don't think this is the right way to solve the problem
of "too large" images.  For example, many image specs allow images
larger than this, so we should too.

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

Review URL: https://codereview.chromium.org/1580113002

8 years agoReland of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview...
benjaminwagner [Wed, 13 Jan 2016 18:45:19 +0000 (10:45 -0800)]
Reland of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview.chromium.org/1580923002/ )

Reason for revert:
Internal cl/111468120 is now ready to go.

Original issue's description:
> Revert of Move BUILD.public to public.bzl. (patchset #1 id:1 of https://codereview.chromium.org/1577353002/ )
>
> Reason for revert:
> Corresponding google-private changes not ready.
>
> Original issue's description:
> > Move BUILD.public to public.bzl.
> >
> > This allows building with bazel (see http://bazel.io).
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1577353002
> >
> > Committed: https://skia.googlesource.com/skia/+/eeebfff54877b24151570c4f02b2299e3f9ef967
>
> TBR=benjaminwagner@google.com,mtklein@google.com
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/330043c073de2ee63faa1caa3cb4170da68a79f2

TBR=mtklein@google.com,iroth@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/1584563004

8 years agoremove CreateLightingFilter from SkColorFilter
reed [Wed, 13 Jan 2016 18:43:09 +0000 (10:43 -0800)]
remove CreateLightingFilter from SkColorFilter

All callers have converted over to SkColorMatrixFilter

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

Review URL: https://codereview.chromium.org/1583923002

8 years agoRemove two varieties of drawNonAARect from GrDrawTarget
joshualitt [Wed, 13 Jan 2016 18:08:27 +0000 (10:08 -0800)]
Remove two varieties of drawNonAARect from GrDrawTarget

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

Review URL: https://codereview.chromium.org/1584703003

8 years agoAdd CodecZeroInit test to DMSrcSink
msarett [Wed, 13 Jan 2016 17:31:39 +0000 (09:31 -0800)]
Add CodecZeroInit test to DMSrcSink

This should not cause any diffs on Gold.

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

Review URL: https://codereview.chromium.org/1577853004

8 years agoremove unused SkGlobalInitialization_none.cpp
reed [Wed, 13 Jan 2016 17:05:27 +0000 (09:05 -0800)]
remove unused SkGlobalInitialization_none.cpp

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

NOTRY=True
TBR=

Review URL: https://codereview.chromium.org/1583873002

8 years agoreorg global initialization, separating core from optional
reed [Wed, 13 Jan 2016 16:47:54 +0000 (08:47 -0800)]
reorg global initialization, separating core from optional

Chrome will be changed to just inherit our files, with no need to have their own copy. see https://codereview.chromium.org/1581533007/

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

Review URL: https://codereview.chromium.org/1580873002

8 years agoHide drawBatch on GrDrawTarget from test Methods
joshualitt [Wed, 13 Jan 2016 15:47:38 +0000 (07:47 -0800)]
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

8 years agoGrAuditTrail hooks in GrContext + GrDrawContext
joshualitt [Wed, 13 Jan 2016 14:45:40 +0000 (06:45 -0800)]
GrAuditTrail hooks in GrContext + GrDrawContext

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

Review URL: https://codereview.chromium.org/1580023002