Commit Graph

13683 Commits

Author SHA1 Message Date
bsalomon
a721c81672 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
2014-08-26 11:35:23 -07:00
djsollen
6a9c7b1dbd 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
2014-08-26 11:35:14 -07:00
djsollen
ad726a3196 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
2014-08-26 11:30:15 -07:00
reed
99ae881a7f 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
2014-08-26 11:30:01 -07:00
halcanary
1790e25e18 SkAutoTDelete::operator T*()
R=reed@google.com, bungeman@google.com, mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/506963002
2014-08-26 11:06:25 -07:00
reed
32eb063800 remove commented-out code
TBR=senorblanco@google.com
NOTRY=True

Author: reed@google.com

Review URL: https://codereview.chromium.org/505253002
2014-08-26 11:04:16 -07:00
rmistry
c3cf5a515d 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
2014-08-26 10:43:14 -07:00
rmistry
96b77dee4e 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
2014-08-26 10:41:21 -07:00
halcanary
a4c6094177 SkData to SkStreamAsset to avoid unneeded copying
R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/502193002
2014-08-26 10:38:07 -07:00
rmistry
f2d83caf13 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
2014-08-26 10:30:30 -07:00
reed
680fb9e8f1 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
2014-08-26 09:08:04 -07:00
djsollen
97b49478cf 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
2014-08-26 08:31:24 -07:00
Florin Malita
0b14aa80dd Add text blob gm baselines.
Review URL: https://codereview.chromium.org/504203002
2014-08-26 11:17:02 -04:00
fmalita
b7425173f9 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
2014-08-26 07:56:44 -07:00
qiankun.miao
3d2e50d1aa 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
2014-08-26 07:33:07 -07:00
borenet
6451bc0b02 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
2014-08-26 05:07:35 -07:00
kkinnunen
ec56e45454 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
2014-08-25 22:21:16 -07:00
bungeman
bc818f513b Rebaselines for a6785ccb54 (Add a working SkFontMgr_fontconfig.) 2014-08-25 17:18:53 -04:00
mtklein
131a22b2a2 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
2014-08-25 14:16:15 -07:00
mtklein
68199a2d5f 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
2014-08-25 13:49:29 -07:00
bungeman
a8b53b547f Rebaselines for a6785ccb54 (Add a working SkFontMgr_fontconfig.) 2014-08-25 15:47:55 -04:00
senorblanco
1150a6d151 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
2014-08-25 12:46:58 -07:00
djsollen
5387c83f81 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
2014-08-25 12:03:11 -07:00
bungeman
a6785ccb54 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
2014-08-25 12:00:49 -07:00
humper
5fc226641a 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
2014-08-25 11:17:48 -07:00
Mike Klein
b2a16919d9 gradtext also needed rebaselining from the gamma change
BUG=skia:

Review URL: https://codereview.chromium.org/501113002
2014-08-25 13:50:29 -04:00
bungeman
5e7b4f967b 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
2014-08-25 10:16:01 -07:00
Mike Klein
708f154d7e Rebaseline 565 precision changes and matrixconvolution.
BUG=skia:2797

Review URL: https://codereview.chromium.org/504873002
2014-08-25 13:14:16 -04:00
mtklein
bc97ef4271 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
2014-08-25 10:10:47 -07:00
djsollen
38cb688bd0 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
2014-08-25 09:06:19 -07:00
senorblanco
28648fe4a6 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
2014-08-25 08:06:57 -07:00
bungeman
76db31a2ca XPS to use PathOps for inverse winding paths.
R=caryclark@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/484343003
2014-08-25 07:31:53 -07:00
bungeman
aace9976cd 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
2014-08-25 07:14:03 -07:00
caryclark
2e40381060 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
2014-08-25 06:53:04 -07:00
jbroman
3053dfaefd 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
2014-08-25 06:22:12 -07:00
halcanary
a5c0863d98 remove SkPurgeGlobalDiscardableMemoryPool
BUG=skia:2721
R=reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/495453004
2014-08-25 06:20:13 -07:00
qiankun.miao
045bb7f00b 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
2014-08-25 06:08:25 -07:00
borenet
66ff5f85c6 Update SKP version to 82
Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

Review URL: https://codereview.chromium.org/499893002
2014-08-23 20:48:09 -07:00
borenet
cae0854bd2 Update SKP version to 81
Automatic commit by the RecreateSKPs bot.

TBR=

Author: borenet@google.com

Review URL: https://codereview.chromium.org/497343002
2014-08-22 21:11:56 -07:00
mtklein
b00f54d8b8 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
2014-08-22 13:42:56 -07:00
mtklein
fa115bd454 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
2014-08-22 13:15:38 -07:00
borenet
eb757f6779 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
2014-08-22 12:23:56 -07:00
Ben Wagner
da5a1b8cd8 Add testing flag for XPS for deterministic ids.
BUG=skia:455
R=mtklein@google.com

Review URL: https://codereview.chromium.org/494423002
2014-08-22 15:07:06 -04:00
bsalomon
02e36f2d3f Fix leak of GrResourceCacheEntry
R=robertphillips@google.com
TBR=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/502543002
2014-08-22 12:01:46 -07:00
mtklein
84cab93186 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
2014-08-22 11:58:46 -07:00
mtklein
5f0e82204e 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
2014-08-22 11:44:26 -07:00
Mike Klein
3e42a46385 suppress matrixconvolution
BUG=skia:

Review URL: https://codereview.chromium.org/476283003
2014-08-22 13:09:02 -04:00
mtklein
d910f54443 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
2014-08-22 09:06:34 -07:00
bsalomon
4b4faa6329 Fix leak in multipicturedraw GMs.
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/502493002
2014-08-22 09:02:38 -07:00
fmalita
37ecbaffd1 [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
2014-08-22 09:01:20 -07:00