external/skia/include.git
10 hours agoStaging for cleanup of SkPicture-related headers master
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/include@14258 2bbb7eff-a529-9590-31e7-b0007b416f81

25 hours agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Fri, 18 Apr 2014 03:03:54 +0000 (03:03 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

29 hours 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/include@14251 2bbb7eff-a529-9590-31e7-b0007b416f81

31 hours agoRevert of Extract most of the mutable state of SkShader into a separate Context objec...
commit-bot@chromium.org [Thu, 17 Apr 2014 21:09:49 +0000 (21:09 +0000)]
Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/207683004/)

Reason for revert:
Causing memory leaks in Chromium.

Original issue's description:
> Extract most of the mutable state of SkShader into a separate Context object.
>
> SkShader currently stores some state during draw calls via setContext(...).
> Move that mutable state into a separate SkShader::Context class that is
> constructed on demand for the duration of the draw.
>
> Calls to setContext() are replaced with createContext() which returns a context
> corresponding to the shader object or NULL if the parameters to createContext
> are invalid.
>
> TEST=out/Debug/dm
> BUG=skia:1976
>
> Committed: http://code.google.com/p/skia/source/detail?r=14216

R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, dominikg@chromium.org
TBR=dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:1976

Author: bungeman@google.com

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

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

31 hours agoRevert r14218.
bungeman@google.com [Thu, 17 Apr 2014 21:09:00 +0000 (21:09 +0000)]
Revert r14218.

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

37 hours agoOrphan ProcXfermode, with an eye towards removing it
commit-bot@chromium.org [Thu, 17 Apr 2014 15:19:32 +0000 (15:19 +0000)]
Orphan ProcXfermode, with an eye towards removing it

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

Author: reed@google.com

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

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

39 hours agoRevert of Add flipped gradient branch to two point conical gradient (https://coderevi...
commit-bot@chromium.org [Thu, 17 Apr 2014 13:57:31 +0000 (13:57 +0000)]
Revert of Add flipped gradient branch to two point conical gradient (https://codereview.chromium.org/227623004/)

Reason for revert:
Breaking all CompareGMs

Original issue's description:
> Add flipped gradient branch to two point conical gradient
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14235

R=bsalomon@google.com, mtklein@google.com
TBR=bsalomon@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: egdaniel@google.com

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

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

39 hours agoAdd flipped gradient branch to two point conical gradient
commit-bot@chromium.org [Thu, 17 Apr 2014 13:28:06 +0000 (13:28 +0000)]
Add flipped gradient branch to two point conical gradient

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

Author: egdaniel@google.com

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

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

2 days agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Thu, 17 Apr 2014 03:05:10 +0000 (03:05 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

2 days agoReverting r14225 (Fix SK_SUPPORT_DEPRECATED_RECORD_FLAGS handling - https://coderevie...
robertphillips@google.com [Wed, 16 Apr 2014 17:10:12 +0000 (17:10 +0000)]
Reverting r14225 (Fix SK_SUPPORT_DEPRECATED_RECORD_FLAGS handling - https://codereview.chromium.org/237673017/) due to compiler complaints

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

2 days agoFix SK_SUPPORT_DEPRECATED_RECORD_FLAGS handling
robertphillips@google.com [Wed, 16 Apr 2014 17:00:05 +0000 (17:00 +0000)]
Fix SK_SUPPORT_DEPRECATED_RECORD_FLAGS handling

https://codereview.chromium.org/237673017/

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

2 days agoread/write function_ptrs as just void*, and not as 'array of bytes'
commit-bot@chromium.org [Wed, 16 Apr 2014 16:24:08 +0000 (16:24 +0000)]
read/write function_ptrs as just void*, and not as 'array of bytes'

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

Author: reed@google.com

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

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

2 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/include@14221 2bbb7eff-a529-9590-31e7-b0007b416f81

2 days agofix #if SK_DEBUG -- should be #ifdef SK_DEBUG
reed@google.com [Wed, 16 Apr 2014 13:44:43 +0000 (13:44 +0000)]
fix #if SK_DEBUG -- should be #ifdef SK_DEBUG

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

2 days agoremove legacy filter-flags, and store FilterLevel directly
commit-bot@chromium.org [Wed, 16 Apr 2014 12:58:02 +0000 (12:58 +0000)]
remove legacy filter-flags, and store FilterLevel directly

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

Author: reed@google.com

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

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

2 days agoExtract most of the mutable state of SkShader into a separate Context object.
commit-bot@chromium.org [Wed, 16 Apr 2014 10:16:39 +0000 (10:16 +0000)]
Extract most of the mutable state of SkShader into a separate Context object.

SkShader currently stores some state during draw calls via setContext(...).
Move that mutable state into a separate SkShader::Context class that is
constructed on demand for the duration of the draw.

Calls to setContext() are replaced with createContext() which returns a context
corresponding to the shader object or NULL if the parameters to createContext
are invalid.

TEST=out/Debug/dm
BUG=skia:1976
R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com

Author: dominikg@chromium.org

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

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

3 days agoAdd cast for warning as error on Windows from r14201.
bungeman@google.com [Tue, 15 Apr 2014 16:08:29 +0000 (16:08 +0000)]
Add cast for warning as error on Windows from r14201.

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

3 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/include@14201 2bbb7eff-a529-9590-31e7-b0007b416f81

3 days agoMake sure SkDrawLooper objects can only be allocated on the heap.
commit-bot@chromium.org [Tue, 15 Apr 2014 15:48:36 +0000 (15:48 +0000)]
Make sure SkDrawLooper objects can only be allocated on the heap.

Make constructors of SkLayerDrawLooper and SkBlurDrawLooper non-public.
Remove addLayer* methods from SkLayerDrawLooper. SkLayerDrawLooper::Builder is
used to create new objects.
Provide factory method for creating SkBlurDrawLooper.

BUG=2141
R=scroggo@google.com, reed@google.com, djsollen@google.com

Author: dominikg@chromium.org

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

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

3 days agoAdd GL_CHROMIUM_map_sub functions to GrGLInterface and bit to GrGLCaps.
commit-bot@chromium.org [Tue, 15 Apr 2014 15:37:51 +0000 (15:37 +0000)]
Add GL_CHROMIUM_map_sub functions to GrGLInterface and bit to GrGLCaps.

BUG=skia:2402
R=robertphillips@google.com

Author: bsalomon@google.com

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

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

4 days agoMove distance field generation to the glyph cache.
commit-bot@chromium.org [Mon, 14 Apr 2014 22:05:07 +0000 (22:05 +0000)]
Move distance field generation to the glyph cache.

Distance fields are currently created in GrTextStrike, which is the wrong place. This moves that to the glyph cache where it belongs.

As part of my testing, I found that when we fall back to paths in the GrDistanceFieldTextContext it was not scaling them properly, so that's fixed in here too.

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

Author: jvanverth@google.com

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

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

4 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/include@14191 2bbb7eff-a529-9590-31e7-b0007b416f81

4 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/include@14183 2bbb7eff-a529-9590-31e7-b0007b416f81

4 days agoAllow clients to specify an external SkImageFilter cache.
senorblanco@chromium.org [Mon, 14 Apr 2014 15:51:48 +0000 (15:51 +0000)]
Allow clients to specify an external SkImageFilter cache.

This change allows external callers to substitute their own
SkImageFilter cache for the default intra-frame cache in Skia. This
allows the caller to perform inter-frame caching for example, by the
maintaining a persistent cache between frames and doing custom
invalidation.

R=reed@google.com

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

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

4 days agoresize canvas for GM + typo
commit-bot@chromium.org [Mon, 14 Apr 2014 15:02:19 +0000 (15:02 +0000)]
resize canvas for GM + typo

This change resized the canvas for some GM cases. It is better to show the visual difference in viewer.html for these cases after the CL applied.

BUG=skia:2375
R=reed@google.com, djsollen@google.com

Author: yunchao.he@intel.com

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

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

5 days agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Mon, 14 Apr 2014 03:04:57 +0000 (03:04 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

5 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/include@14171 2bbb7eff-a529-9590-31e7-b0007b416f81

7 days agoImplement intra-frame cacheing in image filters.
commit-bot@chromium.org [Fri, 11 Apr 2014 18:57:00 +0000 (18:57 +0000)]
Implement intra-frame cacheing in image filters.

When image filters are processed within Skia, they simply do
a blind recursion. This has the side-effect of turning the
DAG into a tree. I.e., nodes visited more than once during
the traversal will be processed more than once.

This change implements a very simple cacheing scheme: a
cache is created before traversing the DAG, and handed
into the processing traversal. Before recursing into a child
in SkImageFilter::filterImage(), the cache is checked for a
hit, and early-out is performed. Otherwise, the node is
processed, and its result bitmap and location (offset) are
cached, but only if it contains two or more children and
thus will be visited again during the traversal.

Currently, the child count is approximated with the
refcount. This is good enough in most cases (and exactly
correct for the Chrome use case). We could add an exact
child count to the image filter, but this will require
violating the immutability of image filters slightly in
order to bump the child count as nodes are connected. I
leave it up to the reviewer to decide which is better.

R=reed@google.com

Author: senorblanco@chromium.org

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

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

7 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/include@14159 2bbb7eff-a529-9590-31e7-b0007b416f81

7 days agoMark our territory with (C).
commit-bot@chromium.org [Fri, 11 Apr 2014 18:33:31 +0000 (18:33 +0000)]
Mark our territory with (C).

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

Author: mtklein@chromium.org

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

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

7 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/include@14156 2bbb7eff-a529-9590-31e7-b0007b416f81

7 days agoUpdate bench to be able to preprocess skps
commit-bot@chromium.org [Fri, 11 Apr 2014 15:54:14 +0000 (15:54 +0000)]
Update bench to be able to preprocess skps

This allows benchmarking of optimization improvements and plumbs in the purging API. The purging is necessary so we don't magically get faster because the saveLayers are always pre-generated.

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

Author: robertphillips@google.com

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

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

7 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/include@14149 2bbb7eff-a529-9590-31e7-b0007b416f81

8 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/include@14146 2bbb7eff-a529-9590-31e7-b0007b416f81

8 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/include@14145 2bbb7eff-a529-9590-31e7-b0007b416f81

8 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/include@14144 2bbb7eff-a529-9590-31e7-b0007b416f81

8 days agoClean up the default gamma settings.
bungeman@google.com [Thu, 10 Apr 2014 22:26:29 +0000 (22:26 +0000)]
Clean up the default gamma settings.

This makes it a compile error to specify both SK_GAMMA_EXPONENT
and SK_GAMMA_SRGB. It also ensures that SK_GAMMA_EXPONENT will
be set consistently.

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

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

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

8 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/include@14139 2bbb7eff-a529-9590-31e7-b0007b416f81

8 days agoAdd MakeEmpty to GrIRect16
commit-bot@chromium.org [Thu, 10 Apr 2014 18:36:19 +0000 (18:36 +0000)]
Add MakeEmpty to GrIRect16

The GrLayerCache will use this capability.

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

Author: robertphillips@google.com

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

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

9 days agoReal fix for SK_API / Windows shared lib problems.
mtklein@google.com [Wed, 9 Apr 2014 22:54:57 +0000 (22:54 +0000)]
Real fix for SK_API / Windows shared lib problems.

Ben reviewed this over my shoulder, and we tested on his machine.

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

9 days agoImplement drawDRRect for GPU
commit-bot@chromium.org [Wed, 9 Apr 2014 21:26:11 +0000 (21:26 +0000)]
Implement drawDRRect for GPU

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

Author: bsalomon@google.com

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

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

9 days 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/include@14117 2bbb7eff-a529-9590-31e7-b0007b416f81

9 days agoDefine SK_CPU_X86 on x86 machines.
commit-bot@chromium.org [Wed, 9 Apr 2014 16:50:55 +0000 (16:50 +0000)]
Define SK_CPU_X86 on x86 machines.

Use this to only register flattening for SkSSE2ProcCoeffXfermode::CreateProc when it's linked.

BUG=skia:

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

Author: mtklein@chromium.org

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

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

10 days agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Wed, 9 Apr 2014 03:04:11 +0000 (03:04 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

10 days agofix warning by removing padding field
reed@google.com [Tue, 8 Apr 2014 15:29:10 +0000 (15:29 +0000)]
fix warning by removing padding field

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

10 days 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/include@14092 2bbb7eff-a529-9590-31e7-b0007b416f81

10 days 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/include@14090 2bbb7eff-a529-9590-31e7-b0007b416f81

10 days agoRelax the assert in SkReadBuffer::setPictureVersion().
fmalita@google.com [Tue, 8 Apr 2014 14:11:26 +0000 (14:11 +0000)]
Relax the assert in SkReadBuffer::setPictureVersion().

I'm hitting this with SkPictureShader serialization because there can be
multiple pictures deserialized from the same buffer.

I think we can relax the assert to allow setting the same version
multiple times.

(Alternatively, we could guard all the callers - but since setting the
same version is a no-op, that seems overkill)

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

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

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

11 days 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/include@14087 2bbb7eff-a529-9590-31e7-b0007b416f81

11 days 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/include@14085 2bbb7eff-a529-9590-31e7-b0007b416f81

11 days agoremove SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG
commit-bot@chromium.org [Mon, 7 Apr 2014 21:33:06 +0000 (21:33 +0000)]
remove SK_SUPPORT_LEGACY_COMPATIBLEDEVICE_CONFIG
remove SK_SUPPORT_LEGACY_GETDEVICECAPABILITIES

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

Author: reed@google.com

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

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

11 days agoSkNonCopyable should be used with private inheritance.
commit-bot@chromium.org [Mon, 7 Apr 2014 19:34:38 +0000 (19:34 +0000)]
SkNonCopyable should be used with private inheritance.

This is mostly s/public SkNoncopyable/SkNoncopyable/g.

Two classes (SkDrawLooper::Context and SkPicture::OperationList) don't actually work with SkNoncopyable because they introduce a virtual destructor.  I added SkNoncopyableVirtual to make them work as intended.  Sort of questionable whether they really need to be noncopyable in the first place, but I guess it doesn't hurt to keep the behavior the same.

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

Author: mtklein@chromium.org

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

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

11 days agoConvert SkPicture's generation ID to a unique ID
commit-bot@chromium.org [Mon, 7 Apr 2014 18:26:22 +0000 (18:26 +0000)]
Convert SkPicture's generation ID to a unique ID

This CL addresses linger code review comments on r14037 (Add generation ID to SkPicture https://codereview.chromium.org/222683002/)

R=reed@google.com

Author: robertphillips@google.com

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

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

11 days 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/include@14073 2bbb7eff-a529-9590-31e7-b0007b416f81

11 days agoRemove deprecated function.
commit-bot@chromium.org [Mon, 7 Apr 2014 14:00:31 +0000 (14:00 +0000)]
Remove deprecated function.

We have switched Android to call decodeSubset, so this function
is no longer necessary.

R=reed@google.com

Author: scroggo@google.com

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

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

2 weeks agoRevert to old behavior regarding SK_CPU_ARM and update documentation around SK_CPU_AR...
commit-bot@chromium.org [Thu, 3 Apr 2014 23:39:46 +0000 (23:39 +0000)]
Revert to old behavior regarding SK_CPU_ARM and update documentation around SK_CPU_ARM64 on iOS.

R=robertphillips@google.com

Author: djsollen@google.com

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

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

2 weeks agoFix ios build in chromium when targeting multiple architectures
djsollen@google.com [Thu, 3 Apr 2014 17:50:01 +0000 (17:50 +0000)]
Fix ios build in chromium when targeting multiple architectures

R=robertphillips@google.com

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

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

2 weeks agoAdd more big endian platforms
commit-bot@chromium.org [Thu, 3 Apr 2014 16:38:01 +0000 (16:38 +0000)]
Add more big endian platforms

This patch adds more platforms to the list that have the BIGENDIAN defines set.

Downstream users are using parts of SKIA on BigEndian machines.

R=cmp@chromium.org, bungeman@google.com, bsalomon@google.com, reed@google.com, sergeyberezin@chromium.org

Author: steve@ssinger.info

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

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

2 weeks agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Thu, 3 Apr 2014 03:04:26 +0000 (03:04 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

2 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/include@14038 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoAdd generation ID to SkPicture
robertphillips@google.com [Wed, 2 Apr 2014 23:51:13 +0000 (23:51 +0000)]
Add generation ID to SkPicture

https://codereview.chromium.org/222683002/

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

2 weeks agoArithmetic mode now has the option of not validating the output color, which will...
commit-bot@chromium.org [Wed, 2 Apr 2014 19:32:15 +0000 (19:32 +0000)]
Arithmetic mode now has the option of not validating the output color, which will allow multiple arithmetic operations to be done sequentially, without intermediate clamping. This is required for mimicking blink's current behavior.

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

Author: sugoi@chromium.org

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

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

2 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/include@14025 2bbb7eff-a529-9590-31e7-b0007b416f81

2 weeks agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Wed, 2 Apr 2014 03:05:59 +0000 (03:05 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

2 weeks agoFix SkXfermodeImageFilter when an input is cropped out.
senorblanco@chromium.org [Tue, 1 Apr 2014 19:15:23 +0000 (19:15 +0000)]
Fix SkXfermodeImageFilter when an input is cropped out.

If one of inputs to SkXfermodeImageFilter draws nothing, either due to
it being cropped out upstream, or within the filter itself, the filter
should still draw the other input, since otherwise the result will be incorrect.

For the GPU path, since we can't detect this case in
canFilterImageGPU() without recursing, we'll just drop to
the generic path if either input is empty, since we can't use the effect in that case anyway.

While we're at it, let's drop to the generic path if the
xfermode can't be expressed as an effect, since the code
here was doing a 2-pass render in that case anyway, which
is equivalent to what the (xfermode == NULL) case was doing
anyway.

R=bsalomon@google.com, sugoi@chromium.org

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

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

2 weeks agoMinor changes to GrFontCache system.
commit-bot@chromium.org [Tue, 1 Apr 2014 16:25:11 +0000 (16:25 +0000)]
Minor changes to GrFontCache system.

The main change is parameterizing the GrAtlasMgr so it can have a different sized backing texture and a different number of plots. This is in support of the saveLayer cache which has a smaller backing texture and only one plot.

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

Author: robertphillips@google.com

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

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

2 weeks agoFold SkTSetBit into SkOTSet*Bit.
commit-bot@chromium.org [Tue, 1 Apr 2014 16:11:53 +0000 (16:11 +0000)]
Fold SkTSetBit into SkOTSet*Bit.

BUG=b/13729420
R=bungeman@google.com, mtklein@google.com, bsalomon@google.com, reed@google.com

Author: mtklein@chromium.org

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

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

2 weeks agoSkPerlinNoiseShader::CreateTubulenceNoise() is misspelled
commit-bot@chromium.org [Tue, 1 Apr 2014 16:09:37 +0000 (16:09 +0000)]
SkPerlinNoiseShader::CreateTubulenceNoise() is misspelled

Add missing 'r'.

BUG=skia:2329
R=bsalomon@google.com, hcm@google.com, sugoi@chromium.org

Author: siglesias@igalia.com

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

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

2 weeks agoAdd GL_ARB_invalidate_subdata functions to GrGLInterface.
bsalomon@google.com [Tue, 1 Apr 2014 13:07:29 +0000 (13:07 +0000)]
Add GL_ARB_invalidate_subdata functions to GrGLInterface.

BUG=skia:1541
R=egdaniel@google.com

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

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

2 weeks agoPass the IDWriteFactory instead of relying on a global creator.
bungeman@google.com [Mon, 31 Mar 2014 19:18:07 +0000 (19:18 +0000)]
Pass the IDWriteFactory instead of relying on a global creator.

There are different variations or implementations of IDWriteFactory
with different behaviors. Allow the user to specify the factory to use.

R=scottmg@chromium.org

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

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

2 weeks agoRemove scaleToFit from DashPathEffect
commit-bot@chromium.org [Mon, 31 Mar 2014 18:52:51 +0000 (18:52 +0000)]
Remove scaleToFit from DashPathEffect

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

Author: egdaniel@google.com

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

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

2 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/include@13993 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoThread picture version through to SkReadBuffer.
commit-bot@chromium.org [Fri, 28 Mar 2014 18:05:47 +0000 (18:05 +0000)]
Thread picture version through to SkReadBuffer.

This will let code outside SkPicture* fork its read code based on the picture version.

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

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk/include@13984 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/include@13983 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoSK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.h
commit-bot@chromium.org [Fri, 28 Mar 2014 17:58:28 +0000 (17:58 +0000)]
SK_SUPPORT_LEGACY_GRTYPES to hide duplicate types from SkTypes.h

BUG=skia:
R=bsalomon@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk/include@13982 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/include@13980 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/include@13976 2bbb7eff-a529-9590-31e7-b0007b416f81

3 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/include@13963 2bbb7eff-a529-9590-31e7-b0007b416f81

3 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/include@13962 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoremove all references to legacy Config8888
reed@google.com [Wed, 26 Mar 2014 13:44:58 +0000 (13:44 +0000)]
remove all references to legacy Config8888

BUG=skia:
R=bsalomon@google.com

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

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

3 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/include@13941 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoConsolidate SkCanvas matrix virtuals.
commit-bot@chromium.org [Tue, 25 Mar 2014 17:32:26 +0000 (17:32 +0000)]
Consolidate SkCanvas matrix virtuals.

Remove didTranslate, didScale, didRotate & didSkew, and rely on
didConcat instead. Subclasses can sniff the matrix type if they want to
differentiate.

(work in progress)

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

Author: fmalita@chromium.org

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

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

3 weeks agoRevert "Revert of implement readPixels and writePixels natively, w/o using the (depre...
reed@google.com [Tue, 25 Mar 2014 16:20:24 +0000 (16:20 +0000)]
Revert "Revert of implement readPixels and writePixels natively, w/o using the (deprecated) (https://codereview.chromium.org/199733016/)"

This reverts commit 9a90bd16dc6756395c422adf0f24560d033ed9ea.

BUG=skia:
R=bsalomon@google.com

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

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

3 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/include@13936 2bbb7eff-a529-9590-31e7-b0007b416f81

3 weeks agoRevert of implement readPixels and writePixels natively, w/o using the (deprecated...
commit-bot@chromium.org [Tue, 25 Mar 2014 13:38:44 +0000 (13:38 +0000)]
Revert of implement readPixels and writePixels natively, w/o using the (deprecated) (https://codereview.chromium.org/199733016/)

Reason for revert:
Android bots segfaulting in tests.

Original issue's description:
> implement readPixels and writePixels natively, w/o using the (deprecated)
> SkCanvas::Config8888 enum.
>
> Revert "Revert "hide Config8888 entirely". Broke a bunch of builds."
>
> This reverts commit 763277ba157fef0f651004bb98a189e9f1ac730b.
>
> Needs chrome to remove the READPIXELS guard from skia's .gyp
>
> Committed: https://code.google.com/p/skia/source/detail?r=13931

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

Author: mtklein@google.com

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

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

3 weeks agoimplement readPixels and writePixels natively, w/o using the (deprecated)
reed@google.com [Tue, 25 Mar 2014 12:00:30 +0000 (12:00 +0000)]
implement readPixels and writePixels natively, w/o using the (deprecated)
SkCanvas::Config8888 enum.

Revert "Revert "hide Config8888 entirely". Broke a bunch of builds."

This reverts commit 763277ba157fef0f651004bb98a189e9f1ac730b.

Needs chrome to remove the READPIXELS guard from skia's .gyp

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

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

3 weeks agoSkPaint: eliminate some dead bytes in 64-bit build.
commit-bot@chromium.org [Mon, 24 Mar 2014 23:03:11 +0000 (23:03 +0000)]
SkPaint: eliminate some dead bytes in 64-bit build.

+ memcpy-based copy constructor was hiding this gap -> manual copy constructor.
+ Split tests for finer-grained failures.

BUG=skia:

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

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

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

Author: mtklein@chromium.org

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

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

3 weeks agoAdd new experimental API to SkPicture to get "id" of current op
commit-bot@chromium.org [Mon, 24 Mar 2014 19:40:49 +0000 (19:40 +0000)]
Add new experimental API to SkPicture to get "id" of current op

When gathering information about a picture (in the new SkDevice::EXPERIMENTAL_optimize entry point) it is necessary to be able to correlate the gathered information with the command in the SkPicture (so the information can later be combined with the similarly indexed information from the BBH). This entry point exposes that information to friend classes.

R=reed@google.com

Author: robertphillips@google.com

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

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

3 weeks agoClean up SkOnce usage in SkFontMgr_Indirect.
bungeman@google.com [Mon, 24 Mar 2014 18:38:25 +0000 (18:38 +0000)]
Clean up SkOnce usage in SkFontMgr_Indirect.

R=mtklein@google.com

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

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

3 weeks agoHave SkTArray state that it default-initializes.
bungeman@google.com [Mon, 24 Mar 2014 15:55:01 +0000 (15:55 +0000)]
Have SkTArray state that it default-initializes.

The current comments in SkTArray lead one to believe that it is default
constructing all types. However, it is not calling the default
constructor for primitive types, it is actually default-initializing.

R=bsalomon@google.com

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

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

4 weeks agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Sat, 22 Mar 2014 03:02:27 +0000 (03:02 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

4 weeks agoFix r13897.
bungeman@google.com [Sat, 22 Mar 2014 00:25:34 +0000 (00:25 +0000)]
Fix r13897.

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

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

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

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

git-svn-id: http://skia.googlecode.com/svn/trunk/include@13898 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/include@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/include@13895 2bbb7eff-a529-9590-31e7-b0007b416f81

4 weeks agoSanitizing source files in Housekeeper-Nightly
skia.committer@gmail.com [Fri, 21 Mar 2014 03:02:42 +0000 (03:02 +0000)]
Sanitizing source files in Housekeeper-Nightly

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

4 weeks agoRevert of SkPaint: eliminate some dead bytes in 64-bit build. (https://codereview...
commit-bot@chromium.org [Fri, 21 Mar 2014 01:40:07 +0000 (01:40 +0000)]
Revert of SkPaint: eliminate some dead bytes in 64-bit build. (https://codereview.chromium.org/203203003/)

Reason for revert:
Huh, some Android tests are still failing despite the fix.  IntelRhB, Xoom... that's weird.

Original issue's description:
> SkPaint: eliminate some dead bytes in 64-bit build.
>
> + memcpy-based copy constructor was hiding this gap -> manual copy constructor.
> + Split tests for finer-grained failures.
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=13856
>
> Committed: http://code.google.com/p/skia/source/detail?r=13887

R=reed@google.com, mtklein@chromium.org
TBR=mtklein@chromium.org, reed@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: mtklein@google.com

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

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

4 weeks agoSkPaint: eliminate some dead bytes in 64-bit build.
commit-bot@chromium.org [Thu, 20 Mar 2014 23:02:35 +0000 (23:02 +0000)]
SkPaint: eliminate some dead bytes in 64-bit build.

+ memcpy-based copy constructor was hiding this gap -> manual copy constructor.
+ Split tests for finer-grained failures.

BUG=skia:

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

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

Author: mtklein@chromium.org

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

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

4 weeks agoFix cull nesting assertion.
commit-bot@chromium.org [Thu, 20 Mar 2014 20:25:14 +0000 (20:25 +0000)]
Fix cull nesting assertion.

Cull rects are in local coordinates and cannot be compared directly.

No wonder it was so hard enforcing this in Blink :o

This moves the validation logic into SkCanvas, using a device-space
cull stack (debug build only).

There are still some Blink bugs causing violations, so for now I'd like
to keep this as an error message only.

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

Author: fmalita@chromium.org

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

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