platform/upstream/libSkiaSharp.git
9 years agoMake GrGpuResources register with GrResourceCache2 after fully constructed.
bsalomon [Tue, 26 Aug 2014 19:51:20 +0000 (12:51 -0700)]
Make GrGpuResources register with GrResourceCache2 after fully constructed.

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoReimplement deserialization of SkImageFilter's uniqueID.
senorblanco [Tue, 26 Aug 2014 19:27:12 +0000 (12:27 -0700)]
Reimplement deserialization of SkImageFilter's uniqueID.

9fa60d ("Simplify flattening to just write enough ... ") simplified just
a tad too much. In particular, it disabled deserialization of
SkImageFilter's uniqueID, which in turn caused the failure of
SkImageFilter's cache, which caused a large regression in Chrome's SVG
filter performance.

The medium-term fix is to switch to the new SkRecordDraw SkPicture
backend, which will make the unique IDs unnecessary.

This change is an "in case of emergecy" CL, in the event that there are
problems switching on the new backend in Chrome. For that reason, it's
minimalist: only the filters used by Chrome are modified, and whitespace
changes are kept to a minimum. In this way, it should be easy to revert
once the new backend goes in.

R=reed@google.com

Author: senorblanco@chromium.org

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

9 years agoCreate Read-only Base class for GrDrawState that holds data members and getters
egdaniel [Tue, 26 Aug 2014 19:24:06 +0000 (12:24 -0700)]
Create Read-only Base class for GrDrawState that holds data members and getters

Base class will but used also in follow up cl that will create an OptDrawState class which will
share much of the same data/functions as DrawState. Thus the base class
BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

9 years agoCopy SkImage expectations for ChromeOS recipes bot
borenet [Tue, 26 Aug 2014 19:20:53 +0000 (12:20 -0700)]
Copy SkImage expectations for ChromeOS recipes bot

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

Author: borenet@google.com

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

9 years agogit-sync-deps: handle recursion and deps_os at the same time
halcanary [Tue, 26 Aug 2014 19:06:47 +0000 (12:06 -0700)]
git-sync-deps: handle recursion and deps_os at the same time

NOTRY=true
R=mtklein@google.com, borenet@google.com

Author: halcanary@google.com

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

9 years agoFallback to moveTo when unable to find the first tangent in cubicTo
piotaixr [Tue, 26 Aug 2014 18:59:04 +0000 (11:59 -0700)]
Fallback to moveTo when unable to find the first tangent in cubicTo

When calling cubicTo(a, b, c) and if the distance between fPrevPt and a
is too small, b is used instead of a to calculate the first tangent,
even if the distance between fPrevPt and b is too small.

In debug mode, this is causing an assertion to fail in
SkPathStroker::preJoinTo() and, in Release, the use of an
unitialized value.

The first patch set is adding a failing test.
The second one add the fix to SkPathStroker::cubicTo()

BUG=skia:2820
R=bsalomon@chromium.org, junov@chromium.org, reed@google.com, caryclark@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

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

9 years agoRemove reliance on linked in GL functions for assembling GLES interfaces.
bsalomon [Tue, 26 Aug 2014 18:35:23 +0000 (11:35 -0700)]
Remove reliance on linked in GL functions for assembling GLES interfaces.

Make Android pull in gl2.h directly to workaround broken eglGetProcAddress for unextended GLES2 functions.

Use interface assembler for angle and iOS.

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoPrevent malformed ICO files from recursively decoding
djsollen [Tue, 26 Aug 2014 18:35:14 +0000 (11:35 -0700)]
Prevent malformed ICO files from recursively decoding

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

Author: djsollen@google.com

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

9 years agoAlways use cpu-features library on android.
djsollen [Tue, 26 Aug 2014 18:30:15 +0000 (11:30 -0700)]
Always use cpu-features library on android.

This CL also removes the debug capability of runtime switching
in/out of NEON mode as it uses deprecated APIs.

BUG=skia:1061
R=tomhudson@google.com

Author: djsollen@google.com

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

9 years agoremove (unused) scale parameter from measureText
reed [Tue, 26 Aug 2014 18:30:01 +0000 (11:30 -0700)]
remove (unused) scale parameter from measureText

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

Author: reed@google.com

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

9 years agoSkAutoTDelete::operator T*()
halcanary [Tue, 26 Aug 2014 18:06:25 +0000 (11:06 -0700)]
SkAutoTDelete::operator T*()

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

Author: halcanary@google.com

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

9 years agoremove commented-out code
reed [Tue, 26 Aug 2014 18:04:16 +0000 (11:04 -0700)]
remove commented-out code

TBR=senorblanco@google.com
NOTRY=True

Author: reed@google.com

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

9 years agoRevert of Testing TBR'ing public API owners (patchset #1 of https://codereview.chromi...
rmistry [Tue, 26 Aug 2014 17:43:14 +0000 (10:43 -0700)]
Revert of Testing TBR'ing public API owners (patchset #1 of https://codereview.chromium.org/486203009/)

Reason for revert:
Reverting whitespace change

Original issue's description:
> Testing TBR'ing public API owners
>
> BUG=skia:2870
> TBR=xyz,reed
> NOTRY=true
>
> (SkipBuildbotRuns)
>
> Committed: https://skia.googlesource.com/skia/+/96b77dee4e985513abd4042db088bd286fd84383

TBR=
NOTREECHECKS=true
NOTRY=true
BUG=skia:2870

(SkipBuildbotRuns)

Author: rmistry@google.com

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

9 years agoTesting TBR'ing public API owners
rmistry [Tue, 26 Aug 2014 17:41:21 +0000 (10:41 -0700)]
Testing TBR'ing public API owners

BUG=skia:2870
TBR=xyz,reed
NOTRY=true

(SkipBuildbotRuns)

Author: rmistry@google.com

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

9 years agoSkData to SkStreamAsset to avoid unneeded copying
halcanary [Tue, 26 Aug 2014 17:38:07 +0000 (10:38 -0700)]
SkData to SkStreamAsset to avoid unneeded copying

R=mtklein@google.com

Author: halcanary@google.com

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

9 years agoPublic API changes are allowed if an owner is TBR'ed.
rmistry [Tue, 26 Aug 2014 17:30:29 +0000 (10:30 -0700)]
Public API changes are allowed if an owner is TBR'ed.

The following TBR formats are supported:
* TBR=reed
* TBR=reed@google.com
* TBR=xyz,reed
* TBR=xyz,reed@google.com

BUG=skia:2870
R=borenet@google.com

Author: rmistry@google.com

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

9 years agoretool image cache to be generic cache, allowing the client to subclass "Rec", so...
reed [Tue, 26 Aug 2014 16:08:04 +0000 (09:08 -0700)]
retool image cache to be generic cache, allowing the client to subclass "Rec", so they can provide a custom Key and arbitrary Value.

Follow-on CLs

- rename ScaledimageCache to something like GeneralCache
- explore if we can use call-backs or some mechanism to completely hide "lock/unlock", by forcing all clients to support "copying" their value out of the cache as the result of a Find.

R=mtklein@google.com, senorblanco@google.com, bsalomon@google.com, qiankun.miao@intel.com, senorblanco@chromium.org

Author: reed@google.com

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

9 years agoFix overflow when comparing two ints by promoting the sum to 64-bits.
djsollen [Tue, 26 Aug 2014 15:31:24 +0000 (08:31 -0700)]
Fix overflow when comparing two ints by promoting the sum to 64-bits.

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

Author: djsollen@google.com

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

9 years agoAdd text blob gm baselines.
Florin Malita [Tue, 26 Aug 2014 15:17:02 +0000 (11:17 -0400)]
Add text blob gm baselines.

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

9 years agoSkTextBlob plumbing
fmalita [Tue, 26 Aug 2014 14:56:44 +0000 (07:56 -0700)]
SkTextBlob plumbing

Add SkTextBlob serialization + drawTextBlob() overrides.

R=mtklein@google.com, reed@google.com, robertphillips@google.com
BUG=269080

Author: fmalita@chromium.org

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

9 years agoRemove unused header file in SkScaledImageCache.cpp
qiankun.miao [Tue, 26 Aug 2014 14:33:07 +0000 (07:33 -0700)]
Remove unused header file in SkScaledImageCache.cpp

BUG=skia:
R=reed@google.com

Author: qiankun.miao@intel.com

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

9 years agoUpdate SKP version to 84
borenet [Tue, 26 Aug 2014 12:07:35 +0000 (05:07 -0700)]
Update SKP version to 84

Automatic commit by the RecreateSKPs bot.

TBR=
BUG=skia:

Author: borenet@google.com

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

9 years agoImplement NV_path_rendering on OpenGL ES
kkinnunen [Tue, 26 Aug 2014 05:21:16 +0000 (22:21 -0700)]
Implement NV_path_rendering on OpenGL ES

Implement support for NV_path_rendering on OpenGL ES. Use
glProgramPathFragmentInputGenNV function call instead of glPathTexGenNV to
communicate transforms to fragment shader.

The intention is that the NVPR paths will be drawn with the same shader program
as non-NVPR geometry. For NVPR calls, the GPU will skip the vertex shader and
just run the fragment shader.

After program is linked, query the locations of the fragment shader inputs with
glGetResourceLocation. The location will be used to set the transforms with
glProgramPathFragmentInputGenNV.

The functions and their workings are documented in:

glProgramPathFragmentInputGenNV
https://www.opengl.org/registry/specs/NV/path_rendering.txt
(note: addition as of API version 1.3)

glGetResourceLocation
https://www.opengl.org/registry/specs/ARB/program_interface_query.txt
http://www.opengl.org/registry/doc/glspec44.core.pdf
(function is in core Open GL 4.4)

Note: glProgramPathFragmentInputGenNV could be used also for OpenGL. However,
using seems to trigger a bug in the driver. Disable this feature on OpenGL at
least until the driver is fixed and released. The bug manifests in shadertext
test, where the lower-left text pair is missing. Valgrind catches a bad read
for the test and causes the context to OOM reproducibly.

R=bsalomon@google.com, cdalton@nvidia.com, joshualitt@google.com, joshualitt@chromium.org

Author: kkinnunen@nvidia.com

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

9 years agoRebaselines for a6785ccb540 (Add a working SkFontMgr_fontconfig.)
bungeman [Mon, 25 Aug 2014 21:18:04 +0000 (17:18 -0400)]
Rebaselines for a6785ccb540 (Add a working SkFontMgr_fontconfig.)

9 years agoBound everything except drawText().
mtklein [Mon, 25 Aug 2014 21:16:15 +0000 (14:16 -0700)]
Bound everything except drawText().

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

Author: mtklein@chromium.org

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

9 years agoUnfurl catch-all bounds(). This makes it a little easier to track progress.
mtklein [Mon, 25 Aug 2014 20:49:29 +0000 (13:49 -0700)]
Unfurl catch-all bounds().  This makes it a little easier to track progress.

I think we've worked out the SaveLayer bounds as of crrev.com/496963003, so
remove that TODO.

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

Author: mtklein@chromium.org

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

9 years agoRebaselines for a6785ccb540 (Add a working SkFontMgr_fontconfig.)
bungeman [Mon, 25 Aug 2014 19:47:15 +0000 (15:47 -0400)]
Rebaselines for a6785ccb540 (Add a working SkFontMgr_fontconfig.)

9 years agoFix recursive computation of filter bounds for drop shadow,
senorblanco [Mon, 25 Aug 2014 19:46:58 +0000 (12:46 -0700)]
Fix recursive computation of filter bounds for drop shadow,
morphology, blur.

[Reland with fixed tests.]

Because we're computing "backwards" from a clip rect of destination
pixels to be filled to the required source pixels, we should use tail
recursion rather than head recursion in onFilterBounds().

This actually only makes a difference for drop-shadow, where
the computation is non-commutative. Blur and morphology commute, but I
moved them to tail recursion anyway for clarity (so all onFilterBounds
use tail recursion).

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

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

9 years agoRevert of Benchmark designed to exercise fractional image scale/translation (patchset...
djsollen [Mon, 25 Aug 2014 19:03:11 +0000 (12:03 -0700)]
Revert of Benchmark designed to exercise fractional image scale/translation (patchset #2 of https://codereview.chromium.org/491793003/)

Reason for revert:
fires asserts on Linux Debug builds

http://108.170.220.120:10115/builders/Test-Ubuntu12-ShuttleA-GTX660-x86_64-Debug/builds/1910

Original issue's description:
> Benchmark designed to exercise fractional image scale/translation
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5fc226641a0926dddbf70ba784f344881f4c05b9

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

Author: djsollen@google.com

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

9 years agoAdd a working SkFontMgr_fontconfig.
bungeman [Mon, 25 Aug 2014 19:00:49 +0000 (12:00 -0700)]
Add a working SkFontMgr_fontconfig.

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

Author: bungeman@google.com

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

9 years agoBenchmark designed to exercise fractional image scale/translation
humper [Mon, 25 Aug 2014 18:17:48 +0000 (11:17 -0700)]
Benchmark designed to exercise fractional image scale/translation

BUG=skia:
R=reed@google.com

Author: humper@google.com

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

9 years agogradtext also needed rebaselining from the gamma change
Mike Klein [Mon, 25 Aug 2014 17:50:29 +0000 (13:50 -0400)]
gradtext also needed rebaselining from the gamma change

BUG=skia:

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

9 years agoRequire length in sk_wchar_to_string.
bungeman [Mon, 25 Aug 2014 17:16:01 +0000 (10:16 -0700)]
Require length in sk_wchar_to_string.

This information is already available at all call sites and allows
the call to WideCharToMultiByte to not overwrite the '\0' in the
writable_str() which isn't really writable.

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

Author: bungeman@google.com

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

9 years agoRebaseline 565 precision changes and matrixconvolution.
Mike Klein [Mon, 25 Aug 2014 17:14:16 +0000 (13:14 -0400)]
Rebaseline 565 precision changes and matrixconvolution.

BUG=skia:2797

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

9 years agoDocument return value of SkPaint::operator==.
mtklein [Mon, 25 Aug 2014 17:10:47 +0000 (10:10 -0700)]
Document return value of SkPaint::operator==.

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

Author: mtklein@chromium.org

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

9 years agoRevert of Fix recursive computation of filter bounds for drop shadow, (patchset ...
djsollen [Mon, 25 Aug 2014 16:06:19 +0000 (09:06 -0700)]
Revert of Fix recursive computation of filter bounds for drop shadow, (patchset #1 of https://codereview.chromium.org/481273005/)

Reason for revert:
This CL is currently breaking the Win7 and Win8 bots on some of the new tests (in DM).

Original issue's description:
> Fix recursive computation of filter bounds for drop shadow,
> morphology, blur.
>
> Because we're computing "backwards" from a clip rect of destination
> pixels to be filled to the required source pixels, we should use tail
> recursion rather than head recursion in onFilterBounds().
>
> This actually only makes a difference for drop-shadow, where
> the computation is non-commutative. Blur and morphology commute, but I
> moved them to tail recursion anyway for clarity (so all onFilterBounds
> use tail recursion).
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/28648fe4a69b0cee8df42b5966e4e645c3aabefb

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

Author: djsollen@google.com

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

9 years agoFix recursive computation of filter bounds for drop shadow,
senorblanco [Mon, 25 Aug 2014 15:06:57 +0000 (08:06 -0700)]
Fix recursive computation of filter bounds for drop shadow,
morphology, blur.

Because we're computing "backwards" from a clip rect of destination
pixels to be filled to the required source pixels, we should use tail
recursion rather than head recursion in onFilterBounds().

This actually only makes a difference for drop-shadow, where
the computation is non-commutative. Blur and morphology commute, but I
moved them to tail recursion anyway for clarity (so all onFilterBounds
use tail recursion).

BUG=skia:
R=bsalomon@google.com

Author: senorblanco@chromium.org

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

9 years agoXPS to use PathOps for inverse winding paths.
bungeman [Mon, 25 Aug 2014 14:31:53 +0000 (07:31 -0700)]
XPS to use PathOps for inverse winding paths.

R=caryclark@google.com

Author: bungeman@google.com

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

9 years agoReverse swap order in DirectWrite typeface.
bungeman [Mon, 25 Aug 2014 14:14:02 +0000 (07:14 -0700)]
Reverse swap order in DirectWrite typeface.

C++ forbids temporaries to bind to non-const references.
VC++ allows you to do so anyway, but it makes clang on Windows sad.

R=reed@google.com

Author: bungeman@google.com

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

9 years agoadd const to arrays of member functions
caryclark [Mon, 25 Aug 2014 13:53:04 +0000 (06:53 -0700)]
add const to arrays of member functions

running 'size ./out/Release/libskia_core.a' revealed a couple of
places where path ops chose poorly and declared arrays of member
functions to be unnecessarily writable.

R=reed@android.com
TBR=reed

Author: caryclark@google.com

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

9 years agoAdd SK_API to SkTextBlob and SkTextBlobBuilder.
jbroman [Mon, 25 Aug 2014 13:22:12 +0000 (06:22 -0700)]
Add SK_API to SkTextBlob and SkTextBlobBuilder.

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

Author: jbroman@chromium.org

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

9 years agoremove SkPurgeGlobalDiscardableMemoryPool
halcanary [Mon, 25 Aug 2014 13:20:13 +0000 (06:20 -0700)]
remove SkPurgeGlobalDiscardableMemoryPool

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

Author: halcanary@google.com

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

9 years agoClean up useless comments in SkScaledImageCache.h
qiankun.miao [Mon, 25 Aug 2014 13:08:25 +0000 (06:08 -0700)]
Clean up useless comments in SkScaledImageCache.h

BUG=skia:
R=reed@google.com

Author: qiankun.miao@intel.com

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

9 years agoUpdate SKP version to 82
borenet [Sun, 24 Aug 2014 03:48:08 +0000 (20:48 -0700)]
Update SKP version to 82

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoUpdate SKP version to 81
borenet [Sat, 23 Aug 2014 04:11:56 +0000 (21:11 -0700)]
Update SKP version to 81

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoDon't leak the shader by reffing twice in SkRectShaderImageFilter.
mtklein [Fri, 22 Aug 2014 20:42:56 +0000 (13:42 -0700)]
Don't leak the shader by reffing twice in SkRectShaderImageFilter.

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

Author: mtklein@chromium.org

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

9 years agoDisable Neon optimization of bad S32A/D565 blend.
mtklein [Fri, 22 Aug 2014 20:15:38 +0000 (13:15 -0700)]
Disable Neon optimization of bad S32A/D565 blend.

BUG=skia:2797

Committed: https://skia.googlesource.com/skia/+/84cab93186fbe3e87d931fea73cb31b70ff5017b

R=mtklein@google.com

Author: mtklein@chromium.org

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

9 years agoCopy Ubuntu12 RenderSKPs expectations for Recipes bot
borenet [Fri, 22 Aug 2014 19:23:56 +0000 (12:23 -0700)]
Copy Ubuntu12 RenderSKPs expectations for Recipes bot

This is in preparation for implementing the render_skps workflow in recipes.

BUG=skia:761
R=epoger@google.com, stephana@google.com
TBR=epoger, stephana

Author: borenet@google.com

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

9 years agoAdd testing flag for XPS for deterministic ids.
Ben Wagner [Fri, 22 Aug 2014 19:07:06 +0000 (15:07 -0400)]
Add testing flag for XPS for deterministic ids.

BUG=skia:455
R=mtklein@google.com

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

9 years agoFix leak of GrResourceCacheEntry
bsalomon [Fri, 22 Aug 2014 19:01:46 +0000 (12:01 -0700)]
Fix leak of GrResourceCacheEntry

R=robertphillips@google.com
TBR=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agoDisable Neon optimization of bad S32A/D565 blend.
mtklein [Fri, 22 Aug 2014 18:58:46 +0000 (11:58 -0700)]
Disable Neon optimization of bad S32A/D565 blend.

BUG=skia:2797
R=mtklein@google.com

Author: mtklein@chromium.org

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

9 years agoSupport comment groups in SkRecord.
mtklein [Fri, 22 Aug 2014 18:44:26 +0000 (11:44 -0700)]
Support comment groups in SkRecord.

This should fix the failing paint-command-log-nodes.html layout test.

BUG=406425
R=tomhudson@chromium.org

Author: mtklein@chromium.org

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

9 years agosuppress matrixconvolution
Mike Klein [Fri, 22 Aug 2014 17:09:02 +0000 (13:09 -0400)]
suppress matrixconvolution

BUG=skia:

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

9 years agoFix saveLayer() with a pixel-moving filter vs SkBBoxHierarchyRecord / SkRecordDraw
mtklein [Fri, 22 Aug 2014 16:06:34 +0000 (09:06 -0700)]
Fix saveLayer() with a pixel-moving filter vs SkBBoxHierarchyRecord / SkRecordDraw

In SkBBoxHierarchyRecord:
  Since the bounds we pass to saveLayer are in the pre-filtering
  coordinate space, they aren't correct for determining the actual
  device pixels touched by the saveLayer in this case.

  The easiest fix for now is to pass the clip bounds, since the final
  draw done in restore() will never draw outside the clip.

In SkRecordDraw:
  We do adjust the bounds passed to saveLayer, so we just need to make
  sure that when we're using a paint that may affect transparent black,
  we ignore the calculated bounds of draw ops and use the clip intersected
  with those adjusted bounds.

See originally crrev.com/497773002

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

Author: mtklein@chromium.org

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

9 years agoFix leak in multipicturedraw GMs.
bsalomon [Fri, 22 Aug 2014 16:02:38 +0000 (09:02 -0700)]
Fix leak in multipicturedraw GMs.

R=robertphillips@google.com

Author: bsalomon@google.com

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

9 years ago[SkTextBlob] Merge run font data at draw time.
fmalita [Fri, 22 Aug 2014 16:01:19 +0000 (09:01 -0700)]
[SkTextBlob] Merge run font data at draw time.

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

Author: fmalita@chromium.org

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

9 years agoextend SkShader to report a luminance-color to be used for gamma correction
reed [Fri, 22 Aug 2014 15:30:20 +0000 (08:30 -0700)]
extend SkShader to report a luminance-color to be used for gamma correction

BUG=skia:590
R=bungeman@google.com

Author: reed@google.com

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

9 years agodisable neon proc that is triggering asserts
reed [Fri, 22 Aug 2014 15:27:45 +0000 (08:27 -0700)]
disable neon proc that is triggering asserts

BUG=skia:2845
R=mtklein@google.com

Author: reed@google.com

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

9 years agoSome early 565 rebaselines.
Mike Klein [Fri, 22 Aug 2014 15:23:18 +0000 (11:23 -0400)]
Some early 565 rebaselines.

BUG=skia:2797

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

9 years agoAdd some text blob bounds unit tests.
fmalita [Fri, 22 Aug 2014 14:50:45 +0000 (07:50 -0700)]
Add some text blob bounds unit tests.

R=robertphillips@google.com

Author: fmalita@chromium.org

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

9 years agofix numerical overflows in 565 blends
reed [Fri, 22 Aug 2014 14:27:14 +0000 (07:27 -0700)]
fix numerical overflows in 565 blends

BUG=skia:2797
R=mtklein@google.com

Author: reed@google.com

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

9 years agoStore vertex size in DrawState when setVertexAttribs is called
egdaniel [Fri, 22 Aug 2014 14:19:35 +0000 (07:19 -0700)]
Store vertex size in DrawState when setVertexAttribs is called

This will avoid recalculating vertex size throughout code, and will allow
for a set original vertex size once optimizations start removing VA's

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

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

9 years agoIgnore GMs that will need 565 rebaselines.
Mike Klein [Fri, 22 Aug 2014 14:16:03 +0000 (10:16 -0400)]
Ignore GMs that will need 565 rebaselines.

BUG=skia:

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

9 years agoCleanup: Remove BenchTool xcode project file.
tfarina [Fri, 22 Aug 2014 12:42:44 +0000 (05:42 -0700)]
Cleanup: Remove BenchTool xcode project file.

BUG=None
TEST=None
R=mtklein@google.com

Author: tfarina@chromium.org

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

9 years agofix leak in new createproc
reed [Fri, 22 Aug 2014 12:08:26 +0000 (05:08 -0700)]
fix leak in new createproc

BUG=skia:
R=caryclark@google.com, mike@reedtribe.org, mtklein@google.com

Author: reed@chromium.org

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

9 years agoadd tool generated whitespace
caryclark [Fri, 22 Aug 2014 11:55:14 +0000 (04:55 -0700)]
add tool generated whitespace

the rebaseline tool adds whitespace at the end of lines in the json file.
While harmless, git flags this as something worth fixing. Fixing it causes
the rebaseline tool to generate a new difference with the whitespace.

Checking the whitespace back in to avoid future back-and-forth.

TBR=
NOTRY=true
NOTREECHECKS=true

Author: caryclark@google.com

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

9 years agofix remaining arm64 expectations
caryclark [Fri, 22 Aug 2014 11:48:12 +0000 (04:48 -0700)]
fix remaining arm64 expectations

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

Author: caryclark@google.com

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

9 years agoAdd ability to output ImageBaseGSUrl to render_picture and use in rebaseline server.
rmistry [Fri, 22 Aug 2014 11:46:30 +0000 (04:46 -0700)]
Add ability to output ImageBaseGSUrl to render_picture and use in rebaseline server.

BUG=skia:2230
R=epoger@google.com

Author: rmistry@google.com

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

9 years agocreate sk_tools::Expectation class, similar to skiagm::Expectations class
epoger [Fri, 22 Aug 2014 06:21:32 +0000 (23:21 -0700)]
create sk_tools::Expectation class, similar to skiagm::Expectations class

The overarching goal here is for our "gm" and "render_pictures" tools to handle
image expectations/actuals in the same way, sharing the same code, so their
results can be processed through a single pipeline.

By adding an Expectation class within tools/image_expectations.h, similar to
the Expectations class in gm/gm_expectations.h, we get one step closer to
that goal.

R=stephana@google.com
TBR=stephana

Author: epoger@google.com

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

9 years agoUpdate SKP version to 80
borenet [Fri, 22 Aug 2014 04:13:51 +0000 (21:13 -0700)]
Update SKP version to 80

Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

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

9 years agoInitial refactor of shaderbuilder to prepare for geometry shaders
joshualitt [Fri, 22 Aug 2014 03:18:45 +0000 (20:18 -0700)]
Initial refactor of shaderbuilder to prepare for geometry shaders

gitignore for eclipse

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

Author: joshualitt@chromium.org

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

9 years agoRevert of Revert back to SkPictureData pictures. Huge perf regression. (patchset...
mtklein [Fri, 22 Aug 2014 00:10:14 +0000 (17:10 -0700)]
Revert of Revert back to SkPictureData pictures.  Huge perf regression. (patchset #1 of https://codereview.chromium.org/496603002/)

Reason for revert:
Try again now that we have --bbh on nanobench and it's looking decent.

Original issue's description:
> Revert back to SkPictureData pictures.  Huge perf regression.
>
> http://skiaperf.com/#108
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4082d290eea2f70caa82120ff3bc4fbdccbf206c

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/496173002

9 years ago1.5x -> 2x text size for y pad.
mtklein [Thu, 21 Aug 2014 23:39:12 +0000 (16:39 -0700)]
1.5x -> 2x text size for y pad.

This will expand the cheat to just big enough to pass an assertion coming
from our GDI bot.  Currently failing:
  -6.000000 -1.500000 6.000000 1.500000 vs. -1.000000 -2.000000 3.000000 1.000000
Will become (-8 -2 8 2) vs. (-1 -2 3 1).

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

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

9 years agoAdd --bbh (default true) to nanobench.
mtklein [Thu, 21 Aug 2014 22:51:22 +0000 (15:51 -0700)]
Add --bbh (default true) to nanobench.

Chrome's using a bounding box, so it's a good idea for our
bots to do so too.

When set, we'll create an SkTileGrid to match the
parameters of --clip, and so should always hit its fast
path.

This will impose a small overhead (querying the BBH) on all
SKPs, but make large SKPs render more quickly.  E.g. on
GPU desk_pokemonwiki should show about a 30% improvement,
tabl_mozilla about 40%, and one very long page from my
personal suite, askmefast.com, gets 5x faster.

(The performance changes are not the point of the CL, but
something we should be aware of.)

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

Author: mtklein@chromium.org

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

9 years agoAdd some SkTextBlob builder tests.
fmalita [Thu, 21 Aug 2014 22:03:04 +0000 (15:03 -0700)]
Add some SkTextBlob builder tests.

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

Author: fmalita@chromium.org

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

9 years agoIgnore small text sizes in the text bounding assert.
mtklein [Thu, 21 Aug 2014 21:46:49 +0000 (14:46 -0700)]
Ignore small text sizes in the text bounding assert.

Seems we sometimes give back unduely large metrics for 0 text size.

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

Author: mtklein@chromium.org

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

9 years agoFix surface leak in multidraw GMs.
bsalomon [Thu, 21 Aug 2014 21:40:36 +0000 (14:40 -0700)]
Fix surface leak in multidraw GMs.

TBR=robertphillips@google.com

Author: bsalomon@google.com

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

9 years agofix android framework build for nanobench
djsollen [Thu, 21 Aug 2014 20:17:50 +0000 (13:17 -0700)]
fix android framework build for nanobench

R=mtklein@google.com, tomhudson@chromium.org, tomhudson@google.com

Author: djsollen@google.com

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

9 years agogit-sync-deps handles recursive DEPS
halcanary [Thu, 21 Aug 2014 20:17:43 +0000 (13:17 -0700)]
git-sync-deps handles recursive DEPS

NOTRY=true
R=mtklein@google.com, borenet@google.com

Author: halcanary@google.com

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

9 years agoSkMultiPictureDraw API
robertphillips [Thu, 21 Aug 2014 20:12:42 +0000 (13:12 -0700)]
SkMultiPictureDraw API

This CL adds a new API to optimize across multiple SkPicture draw calls.

Note that multiple pictures rendered at once (i.e., picture piles) should be flattened into a single new picture that includes the required clipping on the different layers.

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

Author: robertphillips@google.com

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

9 years agoFix root level Android.mk to now point to the correct nanobench makefile
djsollen [Thu, 21 Aug 2014 20:12:34 +0000 (13:12 -0700)]
Fix root level Android.mk to now point to the correct nanobench makefile

R=mtklein@google.com

Author: djsollen@google.com

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

9 years agoSplit up monolithic EXPERIMENTAL_drawPicture method
robertphillips [Thu, 21 Aug 2014 20:07:35 +0000 (13:07 -0700)]
Split up monolithic EXPERIMENTAL_drawPicture method

This is prep for the new multi-picture API.

This is split out of (Add new API to allow layer hoisting/atlasing across picture piles - https://codereview.chromium.org/474623002/)

R=bsalomon@google.com

Author: robertphillips@google.com

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

9 years agoInstall a hook to swap between SkPicture backends with a single define.
mtklein [Thu, 21 Aug 2014 20:07:27 +0000 (13:07 -0700)]
Install a hook to swap between SkPicture backends with a single define.

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

Author: mtklein@chromium.org

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

9 years agoCleanup FDO options.
djsollen [Thu, 21 Aug 2014 20:02:27 +0000 (13:02 -0700)]
Cleanup FDO options.

R=tomhudson@google.com

Author: djsollen@google.com

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

9 years agoAdd GrResourceCache2.
bsalomon [Thu, 21 Aug 2014 20:02:13 +0000 (13:02 -0700)]
Add GrResourceCache2.

Currently it just replaces GrGpu as the owner of the linked list of resources.

Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f

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

Author: bsalomon@google.com

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

9 years agoupdate expectations for Nexus 10 Debug
caryclark [Thu, 21 Aug 2014 19:37:55 +0000 (12:37 -0700)]
update expectations for Nexus 10 Debug

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

Author: caryclark@google.com

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

9 years agoremember to init fOrigPos in legacy constructor
reed [Thu, 21 Aug 2014 19:32:40 +0000 (12:32 -0700)]
remember to init fOrigPos in legacy constructor

NOTREECHECKS=True
R=caryclark@google.com, mtklein@google.com

Author: reed@google.com

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

9 years agoDoes this fix things?
mtklein [Thu, 21 Aug 2014 18:52:36 +0000 (11:52 -0700)]
Does this fix things?

NOTREECHECKS=true
CQ_EXTRA_TRYBOTS=tryserver.skia:Test-Win7-ShuttleA-HD2000-x86-Debug-Trybot
BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

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

9 years agouse globals to register custom effects
reed [Thu, 21 Aug 2014 17:53:34 +0000 (10:53 -0700)]
use globals to register custom effects

NOTREECHECKS=True
NOTRY=True
R=mtklein@google.com, caryclark@google.com, bungeman@google.com

Author: reed@google.com

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

9 years agorename gradients private BitmapCache to GradientBitmapCache
reed [Thu, 21 Aug 2014 17:50:25 +0000 (10:50 -0700)]
rename gradients private BitmapCache to GradientBitmapCache

R=caryclark@google.com
NOTREECHECKS=True

Author: reed@google.com

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

9 years agoexpose generalized imagecache key
reed [Thu, 21 Aug 2014 16:46:49 +0000 (09:46 -0700)]
expose generalized imagecache key

BUG=skia:
R=mtklein@google.com, halcanary@google.com, qiankun.miao@intel.com

Author: reed@google.com

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

9 years agoOur SkPicture::Analysis visitors should recurse into nested pictures.
mtklein [Thu, 21 Aug 2014 16:11:37 +0000 (09:11 -0700)]
Our SkPicture::Analysis visitors should recurse into nested pictures.

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

Author: mtklein@chromium.org

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

9 years agotemporary rebaseline on arm64
halcanary [Thu, 21 Aug 2014 16:03:50 +0000 (09:03 -0700)]
temporary rebaseline on arm64

Affects all blur tests.

BUG=skia:2845
NOTRY=true
R=caryclark@google.com

Author: halcanary@google.com

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

9 years agoSkTextBlob
fmalita [Thu, 21 Aug 2014 15:53:26 +0000 (08:53 -0700)]
SkTextBlob

Initial implementation.

R=bungeman@google.com, jbroman@chromium.org, mtklein@google.com, reed@google.com, robertphillips@google.com

Author: fmalita@chromium.org

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

9 years agoSimplify flattening to just write enough to call the factory/public-constructor for...
reed [Thu, 21 Aug 2014 14:59:51 +0000 (07:59 -0700)]
Simplify flattening to just write enough to call the factory/public-constructor for the class. We want to *not* rely on private constructors, and not rely on calling through the inheritance hierarchy for either flattening or unflattening(CreateProc).

Refactoring pattern:

1. guard the existing constructor(readbuffer) with the legacy build-flag
2. If you are a instancable subclass, implement CreateProc(readbuffer) to create a new instances from the buffer params (or return NULL).

If you're a shader subclass
1. You must read/write the local matrix if your class accepts that in its factory/constructor, else ignore it.

R=robertphillips@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org, sugoi@chromium.org

Author: reed@google.com

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

9 years agoupdate gm expectations for Nexus 10
caryclark [Thu, 21 Aug 2014 14:43:43 +0000 (07:43 -0700)]
update gm expectations for Nexus 10

the Android version was updated, introducing a new GPU driver

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

Author: caryclark@google.com

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

9 years agoTemporarily adjust Matrix.isSimilarity test tolerance on 64-bit ARM devices
djsollen [Thu, 21 Aug 2014 14:40:42 +0000 (07:40 -0700)]
Temporarily adjust Matrix.isSimilarity test tolerance on 64-bit ARM devices

BUG=skia:2405
R=halcanary@google.com, jvanverth@google.com, reed@google.com

Author: djsollen@google.com

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

9 years agoUpdate FDO options to match what is needed by the framework
djsollen [Thu, 21 Aug 2014 14:38:31 +0000 (07:38 -0700)]
Update FDO options to match what is needed by the framework

R=tomhudson@google.com

Author: djsollen@google.com

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

9 years agoRemove unecessary check from android framework build
djsollen [Thu, 21 Aug 2014 14:33:40 +0000 (07:33 -0700)]
Remove unecessary check from android framework build

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

Author: djsollen@google.com

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

9 years agoUse medium filtering when downscaling bitmap glyphs in FreeType host
djsollen [Thu, 21 Aug 2014 14:33:20 +0000 (07:33 -0700)]
Use medium filtering when downscaling bitmap glyphs in FreeType host

This enable Android to save space on emoji glyphs

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

Author: djsollen@google.com

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