external/skia/gyp.git
4 hours agoRestore SkPicture-related guard flags for Chrome master
robertphillips@google.com [Thu, 24 Apr 2014 13:59:18 +0000 (13:59 +0000)]
Restore SkPicture-related guard flags for Chrome

https://codereview.chromium.org/255543004/

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14349 2bbb7eff-a529-9590-31e7-b0007b416f81

5 hours agoRemove 2 SkPicture-related flags Chrome should be able to live without
commit-bot@chromium.org [Thu, 24 Apr 2014 12:51:19 +0000 (12:51 +0000)]
Remove 2 SkPicture-related flags Chrome should be able to live without

R=bsalomon@google.com
TBR=bsalomon@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14347 2bbb7eff-a529-9590-31e7-b0007b416f81

23 hours agoRemove guards Chromium no longer needs
commit-bot@chromium.org [Wed, 23 Apr 2014 19:18:03 +0000 (19:18 +0000)]
Remove guards Chromium no longer needs

Note: Android still needs these guards.

Committed: http://code.google.com/p/skia/source/detail?r=14299

R=bsalomon@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14329 2bbb7eff-a529-9590-31e7-b0007b416f81

45 hours agoAdd gpu fast path for two point conical gradients.
commit-bot@chromium.org [Tue, 22 Apr 2014 20:56:37 +0000 (20:56 +0000)]
Add gpu fast path for two point conical gradients.

Also shader changes should help numerical issues on certain android gpus

BUG=179264
R=bsalomon@google.com

Author: egdaniel@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14316 2bbb7eff-a529-9590-31e7-b0007b416f81

46 hours agoRevert of make drawText calls non-virtual, to ease SkFont and TextBlob (https://coder...
commit-bot@chromium.org [Tue, 22 Apr 2014 20:07:30 +0000 (20:07 +0000)]
Revert of make drawText calls non-virtual, to ease SkFont and TextBlob (https://codereview.chromium.org/243853006/)

Reason for revert:
need to test more the code-path where we don't opt into the new virtuals

Original issue's description:
> make drawText calls non-virtual, to ease SkFont and TextBlob
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14307

R=robertphillips@google.com
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14314 2bbb7eff-a529-9590-31e7-b0007b416f81

46 hours agogyp: only include windows *_x64 targets if GYP_GENERATORS includes ninja
commit-bot@chromium.org [Tue, 22 Apr 2014 20:05:35 +0000 (20:05 +0000)]
gyp: only include windows *_x64 targets if GYP_GENERATORS includes ninja

BUG=skia:2442
R=caryclark@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14313 2bbb7eff-a529-9590-31e7-b0007b416f81

46 hours agoReverting Skia r14299 ( Remove guards Chromium no longer needs - https://codereview...
robertphillips@google.com [Tue, 22 Apr 2014 19:53:25 +0000 (19:53 +0000)]
Reverting Skia r14299 ( Remove guards Chromium no longer needs - https://codereview.chromium.org/246403004)

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14311 2bbb7eff-a529-9590-31e7-b0007b416f81

47 hours agomake drawText calls non-virtual, to ease SkFont and TextBlob
commit-bot@chromium.org [Tue, 22 Apr 2014 19:03:02 +0000 (19:03 +0000)]
make drawText calls non-virtual, to ease SkFont and TextBlob

BUG=skia:
R=robertphillips@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14307 2bbb7eff-a529-9590-31e7-b0007b416f81

2 days agoRemove guards Chromium no longer needs
commit-bot@chromium.org [Tue, 22 Apr 2014 16:26:29 +0000 (16:26 +0000)]
Remove guards Chromium no longer needs

Note: Android still needs these guards.

R=bsalomon@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14299 2bbb7eff-a529-9590-31e7-b0007b416f81

2 days agoAdd asADash entry point into SkPathEffect to allow extracting Dash info from PathEffects
commit-bot@chromium.org [Tue, 22 Apr 2014 15:21:18 +0000 (15:21 +0000)]
Add asADash entry point into SkPathEffect to allow extracting Dash info from PathEffects

BUG=skia:
R=bsalomon@google.com, reed@google.com

Author: egdaniel@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14297 2bbb7eff-a529-9590-31e7-b0007b416f81

2 days agoFixes for SkPictureShader.
commit-bot@chromium.org [Mon, 21 Apr 2014 19:33:12 +0000 (19:33 +0000)]
Fixes for SkPictureShader.

Update comment in header to make it more clear that the picture
should be unaltered after creating the shader. We want our shaders
to be immutable, and this supports that.

Make the factory return NULL if the shader would have never drawn
anyway i.e. for a null picture or picture with no width/height.

Addresses comments I brought up in
https://codereview.chromium.org/221923007/#msg16.

BUG=skia:1976
R=reed@google.com, fmalita@chromium.org, robertphillips@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14288 2bbb7eff-a529-9590-31e7-b0007b416f81

3 days agoAdd a .gypi to insulate Chrome from refactorings in src/record.
commit-bot@chromium.org [Mon, 21 Apr 2014 17:08:19 +0000 (17:08 +0000)]
Add a .gypi to insulate Chrome from refactorings in src/record.

Rather than listing out sources explicitly in skia_library.gypi, I'll add this new .gypi to its includes.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14282 2bbb7eff-a529-9590-31e7-b0007b416f81

3 days agoanticipate more optimizations by renaming some files and methods
commit-bot@chromium.org [Mon, 21 Apr 2014 15:03:36 +0000 (15:03 +0000)]
anticipate more optimizations by renaming some files and methods

also, call the new SkRecordOptimize in bench_playback

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14277 2bbb7eff-a529-9590-31e7-b0007b416f81

3 days agoSupport clip to layer flag on Android framework.
commit-bot@chromium.org [Mon, 21 Apr 2014 14:42:38 +0000 (14:42 +0000)]
Support clip to layer flag on Android framework.

This flag is being transitioned out, but the Android framework
still needs it.

R=reed@google.com, fmalita@google.com, robertphillips@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14272 2bbb7eff-a529-9590-31e7-b0007b416f81

6 days agoStaging for cleanup of SkPicture-related headers
robertphillips@google.com [Fri, 18 Apr 2014 18:04:41 +0000 (18:04 +0000)]
Staging for cleanup of SkPicture-related headers

https://codereview.chromium.org/243173002

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14258 2bbb7eff-a529-9590-31e7-b0007b416f81

6 days agorename SkPaintParts.* to SkPaintPart.*
reed@google.com [Fri, 18 Apr 2014 15:14:25 +0000 (15:14 +0000)]
rename SkPaintParts.* to SkPaintPart.*

BUG=skia:
R=caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14255 2bbb7eff-a529-9590-31e7-b0007b416f81

6 days agoStaged removal of SkPicture-derived classes
commit-bot@chromium.org [Thu, 17 Apr 2014 23:35:06 +0000 (23:35 +0000)]
Staged removal of SkPicture-derived classes

This CL removes the SkPicture-derived classes (with a flag to keeps clients working). In the process it also lightens the recording factory function so it is no longer ref counted).

The only interesting bits are in SkPicture* and Sk*Picture.*

R=reed@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14251 2bbb7eff-a529-9590-31e7-b0007b416f81

6 days agoadd SK_SUPPORT_LEGACY_PROCXFERMODE to skia_for_chromium_defines.gypi
commit-bot@chromium.org [Thu, 17 Apr 2014 23:25:50 +0000 (23:25 +0000)]
add SK_SUPPORT_LEGACY_PROCXFERMODE to skia_for_chromium_defines.gypi

R=reed@google.com
TBR=reed@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14250 2bbb7eff-a529-9590-31e7-b0007b416f81

6 days agoRevert of Roll ANGLE. (https://codereview.chromium.org/237173002/)
commit-bot@chromium.org [Thu, 17 Apr 2014 21:31:32 +0000 (21:31 +0000)]
Revert of Roll ANGLE. (https://codereview.chromium.org/237173002/)

Reason for revert:
http://skbug.com/2437

Original issue's description:
> Roll ANGLE.
>
> BUG=skia:2272
>
> Committed: http://code.google.com/p/skia/source/detail?r=14243

R=bsalomon@chromium.org, geofflang@chromium.org
TBR=bsalomon@chromium.org, geofflang@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:2272

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14248 2bbb7eff-a529-9590-31e7-b0007b416f81

7 days agoRoll ANGLE.
commit-bot@chromium.org [Thu, 17 Apr 2014 18:29:06 +0000 (18:29 +0000)]
Roll ANGLE.

BUG=skia:2272
R=bsalomon@chromium.org, bsalomon@google.com

Author: geofflang@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14243 2bbb7eff-a529-9590-31e7-b0007b416f81

7 days agoMore flags needed to build Android framework.
commit-bot@chromium.org [Wed, 16 Apr 2014 23:06:29 +0000 (23:06 +0000)]
More flags needed to build Android framework.

R=djsollen@google.com
TBR=djsollen@google.com
NOTREECHECKS=true
NOTRY=true

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14233 2bbb7eff-a529-9590-31e7-b0007b416f81

7 days agoSupport picture recording in Android framework.
commit-bot@chromium.org [Wed, 16 Apr 2014 22:08:32 +0000 (22:08 +0000)]
Support picture recording in Android framework.

Fixes master-skia build.

R=djsollen@google.com
TBR=djsollen@google.com
NOTREECHECKS=true
NOTRY=true

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14230 2bbb7eff-a529-9590-31e7-b0007b416f81

8 days agoRetract SkPicture::kOptimizeForClippedPlayback_RecordingFlag from public API
commit-bot@chromium.org [Wed, 16 Apr 2014 16:02:10 +0000 (16:02 +0000)]
Retract SkPicture::kOptimizeForClippedPlayback_RecordingFlag from public API

This CL sets the stage for retracting the SkPicture::kOptimizeForClippedPlayback_RecordingFlag flag
from the public API (more work needs to be done in Blink & Chrome). In the new world the only way
to set this flag (and thus instantiate an SkPicture-derived
class) is by passing a factory to the SkPictureRecorder class. This is to get all clients always using
factories so that we can then change the factory call used (i.e., so the factory just creates a BBH) and
do away with the SkPicture-derived classes.

BUG=skia:2315
R=reed@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14221 2bbb7eff-a529-9590-31e7-b0007b416f81

9 days agoFix size of rotated text with FreeType.
bungeman@google.com [Tue, 15 Apr 2014 15:52:07 +0000 (15:52 +0000)]
Fix size of rotated text with FreeType.

This generalizes and shares the solution found for a similar issue with
GDI. The issue is that the text size is applied early, and the rest of
the transformation late. This allows us to isolate and independently
control the text size from the rest of the transformation.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14201 2bbb7eff-a529-9590-31e7-b0007b416f81

9 days agoSkRecord: turn on cull annotation pass in public API.
commit-bot@chromium.org [Mon, 14 Apr 2014 20:33:05 +0000 (20:33 +0000)]
SkRecord: turn on cull annotation pass in public API.

Also, switch Skia internal tools over to use the public headers where
possible.  Where it's not, the tools -Isrc/record explicitly now, and
if it's not obvious, note why they don't use SkRecording.h.

BUG=skia:2378
R=reed@google.com, mtklein@google.com, fmalita@chromium.org

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14191 2bbb7eff-a529-9590-31e7-b0007b416f81

10 days agoMike R: please sanity check SkPostConfig.h
commit-bot@chromium.org [Mon, 14 Apr 2014 17:08:59 +0000 (17:08 +0000)]
Mike R: please sanity check SkPostConfig.h
Mike K: please sanity check Test.cpp and skia_test.cpp

Feel free to look at the rest, but I don't expect any in depth review of path ops innards.

Path Ops first iteration used QuickSort to order segments radiating from an intersection to compute the winding rule.

This revision uses a circular sort instead. Breaking out the circular sort into its own long-lived structure (SkOpAngle) allows doing less work and provides a home for caching additional sorting data.

The circle sort is more stable than the former sort, has a robust ordering and fewer exceptions. It finds unsortable ordering less often. It is less reliant on the initial curve  tangent, using convex hulls instead whenever it can.

Additional debug validation makes sure that the computed structures are self-consistent. A new visualization tool helps verify that the angle ordering is correct.

The 70+M tests pass with this change on Windows, Mac, Linux 32 and Linux 64 in debug and release.

R=mtklein@google.com, reed@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14183 2bbb7eff-a529-9590-31e7-b0007b416f81

10 days agoRemove currently unused code
commit-bot@chromium.org [Mon, 14 Apr 2014 15:02:50 +0000 (15:02 +0000)]
Remove currently unused code

This code is currently unused and is contrary to the way in which we seem to be moving towards accomplishing this (i.e., device-specific optimization passes).

This is a partial revert of r13704 (First version of bitmap use tracking in SkPictureRecord - https://codereview.chromium.org/187833003/)

R=reed@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14179 2bbb7eff-a529-9590-31e7-b0007b416f81

10 days agoMore removal of duplicate framework defines.
commit-bot@chromium.org [Mon, 14 Apr 2014 14:53:58 +0000 (14:53 +0000)]
More removal of duplicate framework defines.

BUG=skia:1975
R=djsollen@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14174 2bbb7eff-a529-9590-31e7-b0007b416f81

10 days agoRemove duplicate skia_android_framework defines.
commit-bot@chromium.org [Mon, 14 Apr 2014 14:53:53 +0000 (14:53 +0000)]
Remove duplicate skia_android_framework defines.

BUG=skia:1975
R=djsollen@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14173 2bbb7eff-a529-9590-31e7-b0007b416f81

10 days agosplit SkPictureRecorder out of SkPicture
robertphillips@google.com [Sun, 13 Apr 2014 19:09:42 +0000 (19:09 +0000)]
split SkPictureRecorder out of SkPicture

https://codereview.chromium.org/214953003/

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14171 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoremove picture-backed surfaces
commit-bot@chromium.org [Fri, 11 Apr 2014 18:34:35 +0000 (18:34 +0000)]
remove picture-backed surfaces

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14159 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoRevert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://coderev...
commit-bot@chromium.org [Fri, 11 Apr 2014 17:15:40 +0000 (17:15 +0000)]
Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
Want to reland the original CL.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

R=reed@google.com, bensong@google.com
TBR=bensong@google.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14156 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoremove guard for getTotalClip
commit-bot@chromium.org [Fri, 11 Apr 2014 15:54:06 +0000 (15:54 +0000)]
remove guard for getTotalClip

TBR=robertphilips@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14153 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoAdd bench_playback, for quick profiling of SKR playback.
commit-bot@chromium.org [Fri, 11 Apr 2014 15:53:39 +0000 (15:53 +0000)]
Add bench_playback, for quick profiling of SKR playback.

It is not completely fair to compare --skr and --noskr numbers.  SKR looks
unfairly good because some optimizations are baked into our SKPs at record
time.  But, at least, by using a kWriteOnly_Mode SkRecorder, we prevent
SkPicturePlayback from compounding that unfairness.  SkRecordDraw must handle
its own playback-time optimizations (quickrejects) on its own.

This code should look suspiciously similar to bench_record.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14151 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoRevert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromi...
commit-bot@chromium.org [Fri, 11 Apr 2014 13:47:30 +0000 (13:47 +0000)]
Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
Chrome's side of define changes not easy to figure out quickly. Reverting this for DEPS roll for now.

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14149 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoDisable SK_GAMMA_SRGB on android builds.
djsollen@google.com [Fri, 11 Apr 2014 13:09:21 +0000 (13:09 +0000)]
Disable SK_GAMMA_SRGB on android builds.

R=bungeman@google.com, scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14148 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoAdd a focused public API for src/record.
commit-bot@chromium.org [Thu, 10 Apr 2014 23:30:59 +0000 (23:30 +0000)]
Add a focused public API for src/record.

BUG=skia:2378
R=reed@google.com, robertphillips@google.com, mtklein@google.com, fmalita@chromium.org

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14146 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoRevert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://coderev...
commit-bot@chromium.org [Thu, 10 Apr 2014 22:49:20 +0000 (22:49 +0000)]
Revert of Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/234243002/)

Reason for revert:
fixes on the chrome side are landing (brettw), keep fingers crossed.

Original issue's description:
> Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)
>
> Reason for revert:
> breaking the Chrome deps roll.
> http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio
>
> Original issue's description:
> > Rename kPMColor_SkColorType to kN32_SkColorType.
> >
> > The new name better represents what this flag means.
> >
> > BUG=skia:2384
> >
> > Committed: http://code.google.com/p/skia/source/detail?r=14117
>
> TBR=reed@google.com,scroggo@google.com
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14144

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14145 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoRevert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromi...
commit-bot@chromium.org [Thu, 10 Apr 2014 22:36:34 +0000 (22:36 +0000)]
Revert of Rename kPMColor_SkColorType to kN32_SkColorType. (https://codereview.chromium.org/227433009/)

Reason for revert:
breaking the Chrome deps roll.
http://build.chromium.org/p/chromium.linux/builders/Linux%20GN%20%28dbg%29/builds/839/steps/compile/logs/stdio

Original issue's description:
> Rename kPMColor_SkColorType to kN32_SkColorType.
>
> The new name better represents what this flag means.
>
> BUG=skia:2384
>
> Committed: http://code.google.com/p/skia/source/detail?r=14117

R=reed@google.com, scroggo@google.com
TBR=reed@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2384

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14144 2bbb7eff-a529-9590-31e7-b0007b416f81

13 days agoCreate SkLayerRasterizer w/o destroying Builder.
commit-bot@chromium.org [Thu, 10 Apr 2014 20:42:53 +0000 (20:42 +0000)]
Create SkLayerRasterizer w/o destroying Builder.

Add a new method to SkLayerRasterizer::Builder that creates a new
SkLayerRasterizer without destroying the Builder. Necessary to
continue to support Android's API.

Also fix a bug where creating a Builder and never calling
detachRasterizer results in not calling the destructor for any SkPaints
in the Builder.

Add tests.

BUG=b/13729784
R=reed@google.com, dominikg@chromium.org

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14139 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoAdd a new bench that tests a simple image filter DAG.
senorblanco@chromium.org [Thu, 10 Apr 2014 16:16:13 +0000 (16:16 +0000)]
Add a new bench that tests a simple image filter DAG.

This bench exercises a blur filter connected to 5 inputs of the same
merge filter.

R=junov@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14135 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agorevert of 14111 to fix build
bensong@google.com [Thu, 10 Apr 2014 12:46:36 +0000 (12:46 +0000)]
revert of 14111 to fix build

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14128 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoSkRecordDraw: skip draw ops when the clip is empty
commit-bot@chromium.org [Wed, 9 Apr 2014 23:30:28 +0000 (23:30 +0000)]
SkRecordDraw: skip draw ops when the clip is empty

   - Adds tests for SkRecordDraw's two main features: cull- and clip- based skipping.
   - Adds full SkCanvas semantic mode to SkRecorder, so it can be used as a target for SkRecordDraw.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14124 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoRename kPMColor_SkColorType to kN32_SkColorType.
commit-bot@chromium.org [Wed, 9 Apr 2014 20:45:29 +0000 (20:45 +0000)]
Rename kPMColor_SkColorType to kN32_SkColorType.

The new name better represents what this flag means.

BUG=skia:2384
R=reed@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14117 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoInitial code for webtry, a web application for allowing users to try out Skia.
commit-bot@chromium.org [Wed, 9 Apr 2014 18:59:44 +0000 (18:59 +0000)]
Initial code for webtry, a web application for allowing users to try out Skia.

Currently running at http://108.170.220.126:8000/

BUG=skia:
R=mtklein@google.com

Author: jcgregorio@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14114 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agono more callers of getTotalClip -- except in android
reed@google.com [Wed, 9 Apr 2014 18:47:28 +0000 (18:47 +0000)]
no more callers of getTotalClip -- except in android

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14111 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoXfermode: SSE2 implementation of multiply_modeproc
commit-bot@chromium.org [Wed, 9 Apr 2014 15:43:46 +0000 (15:43 +0000)]
Xfermode: SSE2 implementation of multiply_modeproc

This patch implements basics for Xfermode SSE optimization. Based on
these basics, SSE2 implementation of multiply_modeproc is provided. SSE2
implementation for other modes will come in future. With this patch
performance of Xfermode_Multiply will improve about 45%. Here are the
data on desktop i7-3770.
before:
Xfermode_Multiply   8888:  cmsecs =     33.30   565:  cmsecs =     45.65
after:
Xfermode_Multiply   8888:  cmsecs =     17.18   565:  cmsecs =     24.87

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=14006

Committed: http://code.google.com/p/skia/source/detail?r=14050

R=mtklein@google.com, robertphillips@google.com

Author: qiankun.miao@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14107 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoFixes to Android.mk generation for arm64.
commit-bot@chromium.org [Wed, 9 Apr 2014 13:34:26 +0000 (13:34 +0000)]
Fixes to Android.mk generation for arm64.

Remove warning about no optimizations for arm64 and rebaseline the
associated test.

Exclude _opts_none.cpps when building arm64, to avoid double definitions.

BUG=skia:1975
R=halcanary@google.com, djsollen@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14104 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoSkRecord: make culling work if SkRecordAnnotateCullingPairs is called.
commit-bot@chromium.org [Tue, 8 Apr 2014 23:31:35 +0000 (23:31 +0000)]
SkRecord: make culling work if SkRecordAnnotateCullingPairs is called.

  - Allow stateful functors; allow visit()/mutate() at a given index; add count().
  - Annotate cull push/pop pairs on the PushCull records.  (tested)
  - Use those annotations to skip ahead in SkRecordDraw.   (not yet tested beyond dm --skr)
  - Make SkRecordDraw a function, move its implementation to a .cpp.

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14101 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoMore SkRecord TODOs:
commit-bot@chromium.org [Tue, 8 Apr 2014 20:17:26 +0000 (20:17 +0000)]
More SkRecord TODOs:

  - add basic test for SkRecorder
  - rejigger GYPs so that the include dir comes along with the dependency

BUG=skia:2378
R=fmalita@chromium.org, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14099 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoStart on some unwritten SkRecord TODOs:
commit-bot@chromium.org [Tue, 8 Apr 2014 17:31:08 +0000 (17:31 +0000)]
Start on some unwritten SkRecord TODOs:

  - add SK_OVERRIDE for SkCanvas methods in SkRecorder
  - start on unit tests, here just for SkRecord itself

BUG=skia:2378
R=fmalita@google.com, mtklein@google.com, fmalita@chromium.org

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14097 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoInitial picture shader implementation
commit-bot@chromium.org [Tue, 8 Apr 2014 15:19:34 +0000 (15:19 +0000)]
Initial picture shader implementation

This CL adds an SkPictureShader class to support SkPicture-based
patterns.

The implementation renders the picture into an SkBitmap tile and then
delegates to SkBitmapProcShader for the actual operation.

R=bsalomon@google.com, reed@google.com, robertphillips@google.com

Committed: http://code.google.com/p/skia/source/detail?r=14085

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14092 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoWIP -- SkFont
reed@google.com [Tue, 8 Apr 2014 15:04:29 +0000 (15:04 +0000)]
WIP -- SkFont

BUG=skia:
R=bungeman@google.com, fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14090 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoRemoves deleted files SkBitmapShader* from gyp/core.gypi.
commit-bot@chromium.org [Tue, 8 Apr 2014 12:24:01 +0000 (12:24 +0000)]
Removes deleted files SkBitmapShader* from gyp/core.gypi.

BUG=skia:
NOTRY=true
R=robertphillips@google.com
TBR=robertphillips@google.com

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14088 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoRevert of Initial picture shader implementation (https://codereview.chromium.org...
commit-bot@chromium.org [Mon, 7 Apr 2014 23:45:31 +0000 (23:45 +0000)]
Revert of Initial picture shader implementation (https://codereview.chromium.org/221923007/)

Reason for revert:
breaking the buildbots. Subsequent CL only addressed CompareGMs but GenerateGMs are also failing.

Original issue's description:
> Initial picture shader implementation
>
> This CL adds an SkPictureShader class to support SkPicture-based
> patterns.
>
> The implementation renders the picture into an SkBitmap tile and then
> delegates to SkBitmapProcShader for the actual operation.
>
> R=reed@google.com,robertphillips@google.com,bsalomon@google.com
>
> Committed: http://code.google.com/p/skia/source/detail?r=14085

R=bsalomon@google.com, reed@google.com, robertphillips@google.com, fmalita@chromium.org
TBR=bsalomon@google.com, fmalita@chromium.org, reed@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: bensong@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14087 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoInitial picture shader implementation
commit-bot@chromium.org [Mon, 7 Apr 2014 23:11:45 +0000 (23:11 +0000)]
Initial picture shader implementation

This CL adds an SkPictureShader class to support SkPicture-based
patterns.

The implementation renders the picture into an SkBitmap tile and then
delegates to SkBitmapProcShader for the actual operation.

R=bsalomon@google.com, reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14085 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoremove SK_SUPPORT_LEGACY_GETCLIPTYPE
commit-bot@chromium.org [Mon, 7 Apr 2014 15:17:37 +0000 (15:17 +0000)]
remove SK_SUPPORT_LEGACY_GETCLIPTYPE

after this lands and sticks, we can remove the assocated code from skia

BUG=skia:
R=robertphillips@google.com, reed@chromium.org

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14074 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoRemove SkResizeImageFilter.
commit-bot@chromium.org [Mon, 7 Apr 2014 15:11:08 +0000 (15:11 +0000)]
Remove SkResizeImageFilter.

Its functionality has been subsumed by SkMatrixImageFilter, and it's no longer
used in Blink.

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14073 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoget iOS building again
commit-bot@chromium.org [Sat, 5 Apr 2014 01:13:43 +0000 (01:13 +0000)]
get iOS building again

1) Disable SampleApp.  Seems like it's totally horked?  SkOSFile_iOS.mm is missing about half the functions needed, and SkOSFile_stdio.cpp is double-providing the others.

2) Drop armv6.

3) Switch from putting headers in sources to putting the corresponding directories in includes.

4)  Force cast the type of glShaderSource.  Something to do with GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE?

After all this,
    env CC=clang CXX=clang++ GYP_DEFINES=skia_os=ios make
builds for me.
BUG=skia:2363
R=bsalomon@google.com, epoger@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14069 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoUpdates to Android.mk generation.
commit-bot@chromium.org [Fri, 4 Apr 2014 21:19:53 +0000 (21:19 +0000)]
Updates to Android.mk generation.

These defines were manually added to the last merge.

BUG=skia:1975
R=djsollen@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14067 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agofix nacl build using ninja
commit-bot@chromium.org [Fri, 4 Apr 2014 18:16:04 +0000 (18:16 +0000)]
fix nacl build using ninja

BUG=skia:2366
NOTREECHECKS=True
NOTRY=True
R=robertphillips@google.com
TBR=robertphillips

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14065 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoRevert of Xfermode: SSE2 implementation of multiply_modeproc (https://codereview...
commit-bot@chromium.org [Thu, 3 Apr 2014 18:53:33 +0000 (18:53 +0000)]
Revert of Xfermode: SSE2 implementation of multiply_modeproc (https://codereview.chromium.org/202903004/)

Reason for revert:
It looks like serialization is broken. The serialize and pipe-cross-process tests are failing and turning (at least the Ubuntu12 and Win7) bots red

Original issue's description:
> Xfermode: SSE2 implementation of multiply_modeproc
>
> This patch implements basics for Xfermode SSE optimization. Based on
> these basics, SSE2 implementation of multiply_modeproc is provided. SSE2
> implementation for other modes will come in future. With this patch
> performance of Xfermode_Multiply will improve about 45%. Here are the
> data on desktop i7-3770.
> before:
> Xfermode_Multiply   8888:  cmsecs =     33.30   565:  cmsecs =     45.65
> after:
> Xfermode_Multiply   8888:  cmsecs =     17.18   565:  cmsecs =     24.87
>
> BUG=
>
> Committed: http://code.google.com/p/skia/source/detail?r=14006
>
> Committed: http://code.google.com/p/skia/source/detail?r=14050

R=mtklein@google.com, qiankun.miao@intel.com
TBR=mtklein@google.com, qiankun.miao@intel.com
NOTREECHECKS=true
NOTRY=true
BUG=

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14053 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoXfermode: SSE2 implementation of multiply_modeproc
commit-bot@chromium.org [Thu, 3 Apr 2014 18:26:40 +0000 (18:26 +0000)]
Xfermode: SSE2 implementation of multiply_modeproc

This patch implements basics for Xfermode SSE optimization. Based on
these basics, SSE2 implementation of multiply_modeproc is provided. SSE2
implementation for other modes will come in future. With this patch
performance of Xfermode_Multiply will improve about 45%. Here are the
data on desktop i7-3770.
before:
Xfermode_Multiply   8888:  cmsecs =     33.30   565:  cmsecs =     45.65
after:
Xfermode_Multiply   8888:  cmsecs =     17.18   565:  cmsecs =     24.87

BUG=

Committed: http://code.google.com/p/skia/source/detail?r=14006

R=mtklein@google.com, robertphillips@google.com

Author: qiankun.miao@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14050 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoPull Gpu shader out of SkTwoPointConicalGradient into own file
commit-bot@chromium.org [Thu, 3 Apr 2014 14:59:19 +0000 (14:59 +0000)]
Pull Gpu shader out of SkTwoPointConicalGradient into own file

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14044 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoAdd a GrLayerCache to GrContext
robertphillips@google.com [Thu, 3 Apr 2014 00:34:27 +0000 (00:34 +0000)]
Add a GrLayerCache to GrContext

https://codereview.chromium.org/217343006/

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14038 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoARM Skia NEON patches - 35 - First AArch64 support
commit-bot@chromium.org [Wed, 2 Apr 2014 15:03:56 +0000 (15:03 +0000)]
ARM Skia NEON patches - 35 - First AArch64 support

Aarch64 support

This change contains the necessary modifications to have Skia build and
run properly on an ARMv8 processor in aarch64 execution state.

Here's a list of the changes:

 - add an arm64 target to the build system + SK_CPU_ARM64 flag

 - MatrixTest was failing when built in Release mode. Fused MAC
   instructions were generated which made some intermediate results
   more accurate. As the test relies on result comparison, the more
   precise results when compared to others led to a gap bigger than
   what was tolerated. As I don't know if some actual skia code relies
   on results being comparable, I've disabled fused MAC instruction
   with -ffp-contract=off for arm64.

 - Modify include/core/SkOnce.h to have barriers work.

 - SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.

 - use existing Xfermode optimisations with modifications that can be
   removed in the future when toolchains are ready. Also save a few
   instructions is two Xfermodes (will apply to ARM too).

 - use existing SkBoxBlur and SkMorphology optimisations.

 - use existing SkBlitMask optimisations

 - use existing BitmapProcState and Convolution optimisations.

Future changes will include:

 - Blitters (only partialy merged upstream)

 - SkUtils (there's little value in sending asm optimisations without
   having them benchmarked on real hardware).

Signed-off-by: Kevin PETIT <kevin.petit@arm.com>
BUG=skia:

Committed: http://code.google.com/p/skia/source/detail?r=13980

R=djsollen@google.com, reed@google.com, mtklein@google.com, halcanary@google.com

Author: kevin.petit@arm.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14025 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoPurge SkPurgeableMemoryBlock.
commit-bot@chromium.org [Tue, 1 Apr 2014 23:50:53 +0000 (23:50 +0000)]
Purge SkPurgeableMemoryBlock.

It was an experiment that is no longer used.

R=mtklein@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14020 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoSkRecord strawman
commit-bot@chromium.org [Tue, 1 Apr 2014 16:24:06 +0000 (16:24 +0000)]
SkRecord strawman

Record performance as measured by bench_record (out/Release/bench_record --skr) improves by at least 1.9x, at most 6.7x, arithmetic mean 2.6x, geometric mean 3.0x.  So, good.

Correctness as measured by DM (out/Debug/dm --skr) is ~ok.  One GM (shadertext2) fails because we're assuming all paint effects are immutable, but SkShaders are still mutable.

To do after this CL:
  - measure playback speed
  - catch up feature-wise to SkPicture
  - match today's playback speed

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

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14010 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoRevert of Xfermode: SSE2 implementation of multiply_modeproc (https://codereview...
commit-bot@chromium.org [Tue, 1 Apr 2014 14:17:44 +0000 (14:17 +0000)]
Revert of Xfermode: SSE2 implementation of multiply_modeproc (https://codereview.chromium.org/202903004/)

Reason for revert:
Breaking builds

Original issue's description:
> Xfermode: SSE2 implementation of multiply_modeproc
>
> This patch implements basics for Xfermode SSE optimization. Based on
> these basics, SSE2 implementation of multiply_modeproc is provided. SSE2
> implementation for other modes will come in future. With this patch
> performance of Xfermode_Multiply will improve about 45%. Here are the
> data on desktop i7-3770.
> before:
> Xfermode_Multiply   8888:  cmsecs =     33.30   565:  cmsecs =     45.65
> after:
> Xfermode_Multiply   8888:  cmsecs =     17.18   565:  cmsecs =     24.87
>
> BUG=
>
> Committed: http://code.google.com/p/skia/source/detail?r=14006

R=mtklein@google.com, qiankun.miao@intel.com
TBR=mtklein@google.com, qiankun.miao@intel.com
NOTREECHECKS=true
NOTRY=true
BUG=

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14007 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoXfermode: SSE2 implementation of multiply_modeproc
commit-bot@chromium.org [Tue, 1 Apr 2014 14:01:32 +0000 (14:01 +0000)]
Xfermode: SSE2 implementation of multiply_modeproc

This patch implements basics for Xfermode SSE optimization. Based on
these basics, SSE2 implementation of multiply_modeproc is provided. SSE2
implementation for other modes will come in future. With this patch
performance of Xfermode_Multiply will improve about 45%. Here are the
data on desktop i7-3770.
before:
Xfermode_Multiply   8888:  cmsecs =     33.30   565:  cmsecs =     45.65
after:
Xfermode_Multiply   8888:  cmsecs =     17.18   565:  cmsecs =     24.87

BUG=
R=mtklein@google.com

Author: qiankun.miao@intel.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14006 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agochange default build (in "make" wrapper) to ninja on all platforms
epoger@google.com [Tue, 1 Apr 2014 07:02:41 +0000 (07:02 +0000)]
change default build (in "make" wrapper) to ninja on all platforms

force-landed from https://codereview.chromium.org/206463007/ ;
the CommitQueue couldn't handle the diff properly for some reason

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@14003 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoActually identify required saveLayers in SkGpuDevice::EXPERIMENTAL_drawPicture
commit-bot@chromium.org [Mon, 31 Mar 2014 17:55:12 +0000 (17:55 +0000)]
Actually identify required saveLayers in SkGpuDevice::EXPERIMENTAL_drawPicture

NOTRY=true
R=bsalomon@google.com, rmistry@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13993 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoRevert of ARM Skia NEON patches - 35 - First AArch64 support (https://codereview...
commit-bot@chromium.org [Fri, 28 Mar 2014 18:05:29 +0000 (18:05 +0000)]
Revert of ARM Skia NEON patches - 35 - First AArch64 support (https://codereview.chromium.org/143423004/)

Reason for revert:
GYP's failing on most (all?) bots.

Original issue's description:
> ARM Skia NEON patches - 35 - First AArch64 support
>
> Aarch64 support
>
> This change contains the necessary modifications to have Skia build and
> run properly on an ARMv8 processor in aarch64 execution state.
>
> Here's a list of the changes:
>
>  - add an arm64 target to the build system + SK_CPU_ARM64 flag
>
>  - MatrixTest was failing when built in Release mode. Fused MAC
>    instructions were generated which made some intermediate results
>    more accurate. As the test relies on result comparison, the more
>    precise results when compared to others led to a gap bigger than
>    what was tolerated. As I don't know if some actual skia code relies
>    on results being comparable, I've disabled fused MAC instruction
>    with -ffp-contract=off for arm64.
>
>  - Modify include/core/SkOnce.h to have barriers work.
>
>  - SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.
>
>  - use existing Xfermode optimisations with modifications that can be
>    removed in the future when toolchains are ready. Also save a few
>    instructions is two Xfermodes (will apply to ARM too).
>
>  - use existing SkBoxBlur and SkMorphology optimisations.
>
>  - use existing SkBlitMask optimisations
>
>  - use existing BitmapProcState and Convolution optimisations.
>
> Future changes will include:
>
>  - Blitters (only partialy merged upstream)
>
>  - SkUtils (there's little value in sending asm optimisations without
>    having them benchmarked on real hardware).
>
> Signed-off-by: Kevin PETIT <kevin.petit@arm.com>
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13980

R=djsollen@google.com, reed@google.com, halcanary@google.com, kevin.petit@arm.com
TBR=djsollen@google.com, halcanary@google.com, kevin.petit@arm.com, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13983 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoARM Skia NEON patches - 35 - First AArch64 support
commit-bot@chromium.org [Fri, 28 Mar 2014 17:56:14 +0000 (17:56 +0000)]
ARM Skia NEON patches - 35 - First AArch64 support

Aarch64 support

This change contains the necessary modifications to have Skia build and
run properly on an ARMv8 processor in aarch64 execution state.

Here's a list of the changes:

 - add an arm64 target to the build system + SK_CPU_ARM64 flag

 - MatrixTest was failing when built in Release mode. Fused MAC
   instructions were generated which made some intermediate results
   more accurate. As the test relies on result comparison, the more
   precise results when compared to others led to a gap bigger than
   what was tolerated. As I don't know if some actual skia code relies
   on results being comparable, I've disabled fused MAC instruction
   with -ffp-contract=off for arm64.

 - Modify include/core/SkOnce.h to have barriers work.

 - SK_CPU_ARM64 implies SK_ARM_NEON_MODE_ALWAYS.

 - use existing Xfermode optimisations with modifications that can be
   removed in the future when toolchains are ready. Also save a few
   instructions is two Xfermodes (will apply to ARM too).

 - use existing SkBoxBlur and SkMorphology optimisations.

 - use existing SkBlitMask optimisations

 - use existing BitmapProcState and Convolution optimisations.

Future changes will include:

 - Blitters (only partialy merged upstream)

 - SkUtils (there's little value in sending asm optimisations without
   having them benchmarked on real hardware).

Signed-off-by: Kevin PETIT <kevin.petit@arm.com>
BUG=skia:
R=djsollen@google.com, reed@google.com, mtklein@google.com, halcanary@google.com

Author: kevin.petit@arm.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13980 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoLazy image decoding to reduce bench_record overhead.
commit-bot@chromium.org [Fri, 28 Mar 2014 16:08:18 +0000 (16:08 +0000)]
Lazy image decoding to reduce bench_record overhead.

We want bench_record to time recording only, and are willing to accept
some time spent playing back the source pictures only out of necessity.

This lets us skip the JPEG and PNG decoding, which are a pretty fair
chunk of time.  Should mean better record numbers at the same --loops.

BUG=skia:
R=tomhudson@chromium.org, halcanary@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13977 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoAdd discard API to SkCanvas, plumb it to glDiscardFramebuffer()
commit-bot@chromium.org [Fri, 28 Mar 2014 16:08:05 +0000 (16:08 +0000)]
Add discard API to SkCanvas, plumb it to glDiscardFramebuffer()

BUG=skia:2349
R=robertphillips@google.com, reed@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13976 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoUpdates to Android.mk generation.
commit-bot@chromium.org [Fri, 28 Mar 2014 15:59:04 +0000 (15:59 +0000)]
Updates to Android.mk generation.

Generate SkUserConfig.
Include arm64 as another build flavor.
Add tests.

gyp/common_conditions.gypi:
Add conditions for Android framework. These will get written into the generated SkUserConfig.

include/core/SkUserConfig.h:
Generated version that will ultimately be checked into Android (but not here).

platform_tools/android/bin/gyp_to_android.py:
Generate SkUserConfig.
Add arm64 (note that arm64 is not currently respected by our gyp files, so it results in use _none.cpp for the various opts).
Reset the common defines, which are now passed to the generated SkUserConfig.

platform_tools/android/gyp_gen/generate_user_config.py:
New script to generate SkUserConfig.h.

platform_tools/android/gyp_gen/gypd_parser.py:
Fix a lint error (unused import).

platform_tools/android/gyp_gen/makefile_writer.py:
Append any remaining DEFINES to LOCAL_CFLAGS (previously this was done during parsing).
Add a warning for arm64 (corresponds to downstream Android.mk).

platform_tools/android/gyp_gen/vars_dict_lib.py:
Add OrderedSet.reset().
Add DEFINES to VarsDict.

platform_tools/android/tests/expectations/:
Add and update expectations files.

platform_tools/android/tests/generate_user_config_tests.py:
New test for generate_user_config.py

platform_tools/android/tests/inputs/SkUserConfig.h:
Input to the new test, so we don't have to update the expectations each time the real SkUserConfig.h changes.

platform_tools/android/tests/makefile_writer_tests.py:
Add a way to rebaseline test_write_local_vars, which has changed.
Refactor EXPECTATIONS_DIR and compare_files into a separate file for sharing with generate_user_config_tests.py.

platform_tools/android/tests/utils.py:
Common code for tests.

platform_tools/android/tests/var_dict_tests.py:
Use a for loop to test the new key (DEFINES) and future proof this test to test any new keys in the future.

BUG=skia:1975
R=djsollen@google.com, halcanary@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13975 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoAdd clip effect for circles
commit-bot@chromium.org [Fri, 28 Mar 2014 15:58:31 +0000 (15:58 +0000)]
Add clip effect for circles

BUG=skia:2181
R=jvanverth@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13974 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoRevert of Implement text rendering with NVPR (https://codereview.chromium.org/196133014/)
commit-bot@chromium.org [Thu, 27 Mar 2014 14:19:17 +0000 (14:19 +0000)]
Revert of Implement text rendering with NVPR (https://codereview.chromium.org/196133014/)

Reason for revert:
This probably caused Win8 test bot fail during gm run:

http://108.170.217.252:10117/builders/Test-Win8-ShuttleA-GTX660-x86-Debug/builds/574

I can not identify any errors from the logs, so maybe it hung or something?

Original issue's description:
> Implement text rendering with NVPR
>
> Use path rendering to render the text from outlines if supported by the
> GPU. Implement this in GrStencilAndCoverTextContext by copying large
> chunks of code from GrBitmapTextContext (drawText) and
> GrDistanceFieldTextContext (drawPosText).
>
> The drawing is implemented with "instanced" path drawing
> functions.
>
> Moves the creation of the "main" text context from SkGpuDevice to the
> GrContext::createTextContext. This is done because the decision of which
> text renderer is optimal can be made only with the internal
> implementation-specific information of the context.
>
> Committed: http://code.google.com/p/skia/source/detail?r=13962

R=jvanverth@google.com, bsalomon@google.com, mtklein@google.com
TBR=bsalomon@google.com, jvanverth@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13963 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoImplement text rendering with NVPR
commit-bot@chromium.org [Thu, 27 Mar 2014 11:26:10 +0000 (11:26 +0000)]
Implement text rendering with NVPR

Use path rendering to render the text from outlines if supported by the
GPU. Implement this in GrStencilAndCoverTextContext by copying large
chunks of code from GrBitmapTextContext (drawText) and
GrDistanceFieldTextContext (drawPosText).

The drawing is implemented with "instanced" path drawing
functions.

Moves the creation of the "main" text context from SkGpuDevice to the
GrContext::createTextContext. This is done because the decision of which
text renderer is optimal can be made only with the internal
implementation-specific information of the context.

R=jvanverth@google.com, bsalomon@google.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13962 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoLet DM work without a GPU.
commit-bot@chromium.org [Wed, 26 Mar 2014 21:26:15 +0000 (21:26 +0000)]
Let DM work without a GPU.

Testing:

/m/s/skia (dm) $ d dm; and env GYP_DEFINES=skia_gpu=0 d dm
ninja: Entering directory `out/Debug'
ninja: no work to do.
(294 GMs, 620 benches) x 4 configs, 245 tests
4507 tasks leftUnsupported vertex-color/texture xfer mode.
Unsupported vertex-color/texture xfer mode.
0 tasks left
416.53user 9.86system 0:47.43elapsed 898%CPU (0avgtext+0avgdata
13353376maxresident)k
0inputs+0outputs (0major+3579906minor)pagefaults 0swaps
ninja: Entering directory `out/Debug'
[909/909] LINK dm
(287 GMs, 612 benches) x 4 configs, 227 tests
0 tasks left
365.24user 7.71system 0:14.55elapsed 2562%CPU (0avgtext+0avgdata
14718912maxresident)k
0inputs+0outputs (0major+3328269minor)pagefaults 0swaps

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13960 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoremove SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG
commit-bot@chromium.org [Wed, 26 Mar 2014 15:55:50 +0000 (15:55 +0000)]
remove SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG

NOTRY=True
TBR=bsalomon

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13954 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoImplement a generic matrix transform image filter.
senorblanco@chromium.org [Tue, 25 Mar 2014 17:35:10 +0000 (17:35 +0000)]
Implement a generic matrix transform image filter.

This will be used in Blink to accommodate matrices that contain
rotation or shearing. This is a generalization of SkResizeImageFilter,
so I've replaced all uses of SkResizeImageFilter in Skia. (It might be
easier to review by diffing it with SkResizeImageFilter, too.)

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13941 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoAdd Gpu Tracing to Ganesh
commit-bot@chromium.org [Tue, 25 Mar 2014 15:17:32 +0000 (15:17 +0000)]
Add Gpu Tracing to Ganesh

BUG=skia:2316
R=bsalomon@google.com, tomhudson@google.com

Author: egdaniel@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13936 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoRemove more flags not needed by android framework.
commit-bot@chromium.org [Tue, 25 Mar 2014 15:14:18 +0000 (15:14 +0000)]
Remove more flags not needed by android framework.

R=djsollen@google.com, reed@google.com

Author: scroggo@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13934 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoAdd GM that tests GrTextureDomain and fix bug where kDecal_Mode gets incorrectly...
commit-bot@chromium.org [Tue, 25 Mar 2014 15:13:18 +0000 (15:13 +0000)]
Add GM that tests GrTextureDomain and fix bug where kDecal_Mode gets incorrectly ignored.

R=robertphillips@google.com

Author: bsalomon@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13933 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agogather GM tests which are disabled on Android
commit-bot@chromium.org [Mon, 24 Mar 2014 20:07:44 +0000 (20:07 +0000)]
gather GM tests which are disabled on Android

BUG=skia:2326
R=borenet@google.com, djsollen@google.com

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13922 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoremove SK_SUPPORT_LEGACY_READPIXELSCONFIG
reed@google.com [Mon, 24 Mar 2014 18:07:24 +0000 (18:07 +0000)]
remove SK_SUPPORT_LEGACY_READPIXELSCONFIG

BUG=skia:

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13914 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agodisable imagefilterscropexpand GM test on Android
commit-bot@chromium.org [Sun, 23 Mar 2014 23:08:18 +0000 (23:08 +0000)]
disable imagefilterscropexpand GM test on Android

BUG=skia:2313
NOTREECHECKS=True
NOTRY=True
R=borenet@google.com, senorblanco@google.com, senorblanco@chromium.org

Author: epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13903 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoFix r13897.
bungeman@google.com [Fri, 21 Mar 2014 23:19:10 +0000 (23:19 +0000)]
Fix r13897.

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13900 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoA remotable font management interface and DirectWrite implementation.
bungeman@google.com [Fri, 21 Mar 2014 22:48:32 +0000 (22:48 +0000)]
A remotable font management interface and DirectWrite implementation.

The introduced SkRemotableFontMgr is a font management interface designed for simple and fast proxy support. SkFontMgr_Indirect bridges a SkRemotableFontMgr and a local SkFontMgr to present a SkFontMgr interface.

This change is to be followed by https://codereview.chromium.org/132113015/ and  https://codereview.chromium.org/206693003 .

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13897 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoAdd removeShuffle to SkTArray and add SkTArray tests.
bungeman@google.com [Fri, 21 Mar 2014 19:39:02 +0000 (19:39 +0000)]
Add removeShuffle to SkTArray and add SkTArray tests.

R=reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13895 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoreplace old SK_TRACE_EVENT macros with new TRACE_EVENT ones, and then remove them...
commit-bot@chromium.org [Thu, 20 Mar 2014 20:00:24 +0000 (20:00 +0000)]
replace old SK_TRACE_EVENT macros with new TRACE_EVENT ones, and then remove them entirely!

BUG=skia:353
R=tomhudson@google.com, epoger@google.com, reed@google.com, egdaniel@google.com, bsalomon@google.com

Author: humper@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13884 2bbb7eff-a529-9590-31e7-b0007b416f81

5 weeks agoAdd reg test for http://crbug.com/348821
commit-bot@chromium.org [Tue, 18 Mar 2014 17:38:34 +0000 (17:38 +0000)]
Add reg test for http://crbug.com/348821

BUG=348821
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13852 2bbb7eff-a529-9590-31e7-b0007b416f81

5 weeks agoFix GPU displacement with expanding crop rects.
senorblanco@chromium.org [Mon, 17 Mar 2014 23:41:40 +0000 (23:41 +0000)]
Fix GPU displacement with expanding crop rects.

Fix GPU displacement with expanding crop rects, and re-enable the
imagefilterscropexpand GM. There were two bugs: the result texture was
being created at input color bitmap size, not the cropped bounds size,
and the matrix in GrContext was not being set to identity before draw.

R=junov@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13844 2bbb7eff-a529-9590-31e7-b0007b416f81

5 weeks agoadd new readPixels with direct memory parameters
commit-bot@chromium.org [Mon, 17 Mar 2014 21:31:26 +0000 (21:31 +0000)]
add new readPixels with direct memory parameters

BUG=skia:
R=scroggo@google.com, bsalomon@google.com, robertphillips@google.com, fmalita@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13840 2bbb7eff-a529-9590-31e7-b0007b416f81

5 weeks agoFast implementation of QuadTree
commit-bot@chromium.org [Mon, 17 Mar 2014 10:38:34 +0000 (10:38 +0000)]
Fast implementation of QuadTree

Rewritten to avoid memory allocations.

BUG=skia:2242
R=tomhudson@google.com, mtklein@google.com, reed@google.com, robertphillips@google.com

Author: iancottrell@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13826 2bbb7eff-a529-9590-31e7-b0007b416f81

5 weeks agoMove SkNoSaveLayerCanvas.h to include/utils
robertphillips@google.com [Sun, 16 Mar 2014 21:59:11 +0000 (21:59 +0000)]
Move SkNoSaveLayerCanvas.h to include/utils

https://codereview.chromium.org/197243005

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13823 2bbb7eff-a529-9590-31e7-b0007b416f81

5 weeks agoSuppress imagefilterscropexpand GM temporarily to fix Win Debug failures.
commit-bot@chromium.org [Fri, 14 Mar 2014 19:02:15 +0000 (19:02 +0000)]
Suppress imagefilterscropexpand GM temporarily to fix Win Debug failures.
NOTREECHECKS=true
NOTRY=true
R=halcanary@google.com

Author: senorblanco@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13812 2bbb7eff-a529-9590-31e7-b0007b416f81

5 weeks agoImplement support for expanding crop rects in image filters
senorblanco@chromium.org [Fri, 14 Mar 2014 17:44:41 +0000 (17:44 +0000)]
Implement support for expanding crop rects in image filters

NOTE: this patch set is based on https://codereview.chromium.org/189913021/,
and needs that patch to land first.

Until now, crop rects in Skia have only been able to reduce
the size of the destination bounds, but not expand them.
SVG semantics require the latter as well. The heart of
the change is in applyCropRect(), which now assigns each
edge, instead of doing an intersection with the crop rect.

In order to support this (and still work well with tiled
drawing) we need to clip the resulting crop rect to the
clipping region of the filters. This uses the Context struct
previously landed from https://codereview.chromium.org/189913021/.

Many of the pixel loops are not yet ready to handle a
destination rect larger than the source rect. So we provide
a convenience version of applyCropRect() which creates an
offscreen and pads it out with transparent black. Once the
pixel loops and shaders have been fixed to support larger
destination bounds, they should be switched back to the
non-drawing version of applyCropRect().

BUG=skia:
R=bsalomon@google.com, reed@google.com

Committed: https://code.google.com/p/skia/source/detail?r=13805

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

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@13809 2bbb7eff-a529-9590-31e7-b0007b416f81