Commit Graph

13824 Commits

Author SHA1 Message Date
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
reed
8367b8cb7a 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
2014-08-22 08:30:20 -07:00
reed
5b2c2c6fd0 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
2014-08-22 08:27:45 -07:00
Mike Klein
4d88bf547f Some early 565 rebaselines.
BUG=skia:2797

Review URL: https://codereview.chromium.org/488453003
2014-08-22 11:23:18 -04:00
fmalita
51bf9573b8 Add some text blob bounds unit tests.
R=robertphillips@google.com

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/498693002
2014-08-22 07:50:46 -07:00
reed
233c295980 fix numerical overflows in 565 blends
BUG=skia:2797
R=mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/474983007
2014-08-22 07:27:14 -07:00
egdaniel
ab78e06830 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
2014-08-22 07:19:35 -07:00
Mike Klein
6f1cd27536 Ignore GMs that will need 565 rebaselines.
BUG=skia:

Review URL: https://codereview.chromium.org/483883004
2014-08-22 10:16:03 -04:00
tfarina
efafe9484f 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
2014-08-22 05:42:44 -07:00
reed
f0f6c405fe 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
2014-08-22 05:08:26 -07:00