platform/upstream/libSkiaSharp.git
9 years agoPDF : New factory function for SkPDFDevice
halcanary [Fri, 20 Feb 2015 14:17:26 +0000 (06:17 -0800)]
PDF : New factory function for SkPDFDevice

SkPDFDevice now has factory function that matches what callers need.

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

9 years agoPDF: remove unused SkPDFDevice::setDCTEncoder()
halcanary [Fri, 20 Feb 2015 13:57:11 +0000 (05:57 -0800)]
PDF: remove unused SkPDFDevice::setDCTEncoder()

All image compression currently uses (losseless) Deflate, not
Jpeg.  See http://crrev.com/935843007

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

9 years agoRevert of Make SkPixelRef::isLocked() debug-only, remove related dead code. (patchset...
reed [Fri, 20 Feb 2015 04:00:33 +0000 (20:00 -0800)]
Revert of Make SkPixelRef::isLocked() debug-only, remove related dead code. (patchset #1 id:1 of https://codereview.chromium.org/940083002/)

Reason for revert:
Broke callers in chrome

../../skia/ext/platform_canvas_unittest.cc:421:56: error: no member named 'isLocked' in 'SkPixelRef'
  EXPECT_TRUE(platform_bitmap->GetBitmap().pixelRef()->isLocked());

Original issue's description:
> Make SkPixelRef::isLocked() debug-only, remove related dead code.
>
> DM's okay locally with no diffs, no failures.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/8e65712486c66108677a9b0a55ad3e7ca94db555

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

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

9 years agoPDF: Remove SkPDFDeviceFlattener
halcanary [Fri, 20 Feb 2015 02:55:05 +0000 (18:55 -0800)]
PDF: Remove SkPDFDeviceFlattener

There are no clients.

TBR=mtklein@google.com

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

9 years agoRemove unused parameters to SkDocument::CreatePDF
halcanary [Fri, 20 Feb 2015 02:50:05 +0000 (18:50 -0800)]
Remove unused parameters to SkDocument::CreatePDF

All image compression currently uses (losseless) Deflate, not Jpeg.

All clients simply use SkDocument::CreatePDF(stream).

SampleApp and SkLua still use SkDocument::CreatePDF(path).

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

9 years agoMake SkPixelRef::isLocked() debug-only, remove related dead code.
mtklein [Fri, 20 Feb 2015 02:50:00 +0000 (18:50 -0800)]
Make SkPixelRef::isLocked() debug-only, remove related dead code.

DM's okay locally with no diffs, no failures.

BUG=skia:

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

9 years agoRename onGetPixelsEnum back to onGetPixels.
scroggo [Fri, 20 Feb 2015 02:44:58 +0000 (18:44 -0800)]
Rename onGetPixelsEnum back to onGetPixels.

Replace the old signature of onGetPixels (return bool) to return an
enum (Result). Remove onGetPixelsEnum.

Add a define for onGetPixelsEnum to onGetPixels. This is for staging
in Chromium, where some implementations override onGetPixelsEnum.

Add the define in skia_for_chromium_defines. Remove
SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN, which is no longer needed by
Chromium.

BUG=skia:3257

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

9 years ago[SkSVGDevice] Fix whitespace text handling
fmalita [Fri, 20 Feb 2015 02:44:51 +0000 (18:44 -0800)]
[SkSVGDevice] Fix whitespace text handling

SVG ignores leading/trailing whitespace and consolidates mid-text
(http://www.w3.org/TR/SVG/text.html#WhiteSpace). This can cause our
x/y position indices to get out of whack.

Implement a text builder which is SVG whitespace-munging-aware and
performs the needed x/y position list adjustments.

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

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

9 years agouse geometric ave for choosing mip level
reed [Fri, 20 Feb 2015 02:39:49 +0000 (18:39 -0800)]
use geometric ave for choosing mip level

requires https://codereview.chromium.org/937233002/

BUG=skia:

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

9 years agoAllow either the old or new version of ADB on mac.
djsollen [Fri, 20 Feb 2015 02:39:40 +0000 (18:39 -0800)]
Allow either the old or new version of ADB on mac.

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

9 years agoSpeculative fix for nexus player unit test failure
bsalomon [Thu, 19 Feb 2015 20:05:58 +0000 (12:05 -0800)]
Speculative fix for nexus player unit test failure

TBR=robertphillips@google.com

NOTREECHECKS=true

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

9 years agogm to illustrate mipmap layer choice
reed [Thu, 19 Feb 2015 19:39:46 +0000 (11:39 -0800)]
gm to illustrate mipmap layer choice

BUG=skia:
NOTREECHECKS=True
TBR=

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

9 years agoHandle the case when the GrResourceCache timestamp wraps.
bsalomon [Thu, 19 Feb 2015 19:38:44 +0000 (11:38 -0800)]
Handle the case when the GrResourceCache timestamp wraps.

NOTREECHECKS=true

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

9 years agogm to test hairlines which fill RenderTarget
joshualitt [Thu, 19 Feb 2015 18:25:21 +0000 (10:25 -0800)]
gm to test hairlines which fill RenderTarget

BUG=skia:

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

9 years agoRecycle stencil buffers across render targets.
bsalomon [Thu, 19 Feb 2015 17:09:00 +0000 (09:09 -0800)]
Recycle stencil buffers across render targets.

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

9 years agoRevert of notify resource caches when pixelref genID goes stale (patchset #4 id:60001...
mtklein [Thu, 19 Feb 2015 16:53:52 +0000 (08:53 -0800)]
Revert of notify resource caches when pixelref genID goes stale (patchset #4 id:60001 of https://codereview.chromium.org/825263005/)

Reason for revert:
Crazy failures.

http://build.chromium.org/p/client.skia/builders/Test-Mac10.8-MacMini4.1-GeForce320M-x86_64-Debug/builds/1428/steps/dm/logs/stdio

Original issue's description:
> notify resource caches when pixelref genID goes stale
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4675819b9dbb3ad71ec851776e5de26d342f29fe

TBR=bsalomon@google.com,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoPDF: why do we have flags no one uses (or can use)?
mtklein [Thu, 19 Feb 2015 16:29:24 +0000 (08:29 -0800)]
PDF: why do we have flags no one uses (or can use)?

BUG=skia:

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

9 years agoUpdate fontcache gm to actually stress font atlas
jvanverth [Thu, 19 Feb 2015 16:28:02 +0000 (08:28 -0800)]
Update fontcache gm to actually stress font atlas

BUG=skia:

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

9 years agoAllow resources' unique keys to be changed.
bsalomon [Thu, 19 Feb 2015 16:24:16 +0000 (08:24 -0800)]
Allow resources' unique keys to be changed.

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

9 years agonotify resource caches when pixelref genID goes stale
reed [Thu, 19 Feb 2015 16:22:54 +0000 (08:22 -0800)]
notify resource caches when pixelref genID goes stale

BUG=skia:

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

9 years agoRevert of disable gammatext gm for a while, looking for other flakes (patchset #1...
bungeman [Thu, 19 Feb 2015 15:45:14 +0000 (07:45 -0800)]
Revert of disable gammatext gm for a while, looking for other flakes (patchset #1 id:1 of https://codereview.chromium.org/725303002/)

Reason for revert:
We now have gold!!!

Original issue's description:
> disable gammatext gm for a while, looking for other flakes
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/64c04882701d9ee3bbbf23d8c02c8d96c5a51719

TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoClarify desired behavior of FontConfigTypeface::LegacyCreateTypeface.
bungeman [Thu, 19 Feb 2015 15:29:28 +0000 (07:29 -0800)]
Clarify desired behavior of FontConfigTypeface::LegacyCreateTypeface.

This should have no real effect on behavior, but cleans up some names
and removes an unused parameter. This is a step toward separating the
SkTypeface cache from the request cache.

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

9 years agomove SkPDFD*.h from include to src
halcanary [Thu, 19 Feb 2015 15:26:12 +0000 (07:26 -0800)]
move SkPDFD*.h from include to src

CQ_INCLUDE_TRYBOTS=client.skia:Mac Builder-Trybot,Linux Builder-Trybot,Win Builder-Trybot

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

9 years agoRename GrContentKey to GrUniqueKey
bsalomon [Thu, 19 Feb 2015 15:24:21 +0000 (07:24 -0800)]
Rename GrContentKey to GrUniqueKey

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

9 years agoDo not clear the source device in SkGpuDevice::drawDevice
kkinnunen [Thu, 19 Feb 2015 15:20:40 +0000 (07:20 -0800)]
Do not clear the source device in SkGpuDevice::drawDevice

Do not clear the source device in SkGpuDevice::drawDevice based on
the status whether the destination device needs a clear.

Source device clear is flushed in SkGpuDevice::accessRenderTarget()
and target device clear is flushed in CHECK_SHOULD_DRAW(draw).

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

9 years agoAvoid wrong memory access due to double substitution and %%
kkinnunen [Thu, 19 Feb 2015 14:32:12 +0000 (06:32 -0800)]
Avoid wrong memory access due to double substitution and %%

Use the form SkDebugf("%s", arbitraryString) instead of
SkDebugf(arbitraryString).

Fixes the case where SkString::appendf-ing a string with "%%" and then
printing the string with SkDebugf would cause uninitialized read and
corrupted debug print.

ninja -C out/Debug tools && valgrind --leak-check=full
./out/Debug/render_pictures --config gpu  -w q -r ...

...

==7307== Conditional jump or move depends on uninitialised value(s)
==7307==    at 0x6908475: __printf_fp (printf_fp.c:1180)
==7307==    by 0x6904267: vfprintf (vfprintf.c:1629)
==7307==    by 0x6906E53: buffered_vfprintf (vfprintf.c:2313)
==7307==    by 0x690188D: vfprintf (vfprintf.c:1316)
==7307==    by 0x67E8F5: SkDebugf(char const*, ...) (SkDebug_stdio.cpp:18)
==7307==    by 0x7983F1: GrContext::printCacheStats() const (GrTest.cpp:54)
==7307==    by 0x408ECF: tool_main(int, char**) (render_pictures_main.cpp:480)
==7307==    by 0x40913E: main (render_pictures_main.cpp:511)
==7307==
Budget: 2048 items 100663296 bytes
Entry Count: current 652 (651 budgeted, 0 wrapped, 297 locked, 638 scratch 32 0.000000ull), high 652
Entry Bytes: current 51087658 (budgeted 49826658, 49 0.000000ull, 1261000 unbudgeted) high 51087658

(observe "ull" instead of "% full")

(from mtklein)
This CL is not editing public API.
TBR=reed@google.com

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

9 years agoFixing possible out of bound memory access
sugoi [Thu, 19 Feb 2015 13:32:08 +0000 (05:32 -0800)]
Fixing possible out of bound memory access

This was a bug found by ASAN. When width is very small, we can have something like width == 1 and rowBytes == 8. Using "2 * yWidth" (2) would be smaller than rowBytesY (8), so we could read memory out of bounds. This issue has a separate fix in blink (crbug.com/458861).

BUG=skia:

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

9 years agoRemove FontConfigTypeface::getFamilyName().
bungeman [Wed, 18 Feb 2015 21:22:26 +0000 (13:22 -0800)]
Remove FontConfigTypeface::getFamilyName().

This method is hiding a method of the same name from the superclass.
This is confusing and error prone, and doesn't really add anything.

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

9 years agomanaging chromes use section of docs
hcm [Wed, 18 Feb 2015 20:56:40 +0000 (12:56 -0800)]
managing chromes use section of docs

BUG=skia:

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

9 years agoRuntime configuration section of docs
hcm [Wed, 18 Feb 2015 20:55:04 +0000 (12:55 -0800)]
Runtime configuration section of docs

Preview here: http://skiadocs.com:8000/dev/runtime/?cl=940663002

BUG=skia:

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

9 years agoPass Rendertarget into context.
joshualitt [Wed, 18 Feb 2015 20:29:52 +0000 (12:29 -0800)]
Pass Rendertarget into context.

Adding Jim for text context stuff, and Steven for image blur stuff.

BUG=skia:

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

9 years agoUse uint16s for texture coordinates when rendering text.
jvanverth [Wed, 18 Feb 2015 19:36:35 +0000 (11:36 -0800)]
Use uint16s for texture coordinates when rendering text.

Allows us to push more vertices into a given vertex buffer, with
a slight performance improvement.

Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b

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

9 years agoUse SkAutoSTMalloc in GrResourceKey
bsalomon [Wed, 18 Feb 2015 19:33:04 +0000 (11:33 -0800)]
Use SkAutoSTMalloc in GrResourceKey

TBR=robertphillips@google.com

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

9 years agoPDF: Add (low-memory) SkPDFBitmap class
halcanary [Wed, 18 Feb 2015 19:29:56 +0000 (11:29 -0800)]
PDF: Add (low-memory) SkPDFBitmap class

Also: Add SkDeflateWStream and associated unit tests.

SkPDFBitmap is a replacement for SkPDFImage.  As of now, it only
supports 8888 bitmaps (the most common case).

SkPDFBitmap takes very little extra memory (aside from refing the
bitmap's pixels), and its emitObject() does not cache any data.

The SkPDFBitmap::Create function will check the canon for duplicates.
This can reduce the size of the output PDF.

Motivation:  this gives another ~40% decrease in PDF memory overhead

TODO: Support other ColorTypes and scrap SkPDFImage.

BUG=skia:3030

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

9 years agoUpdate DirectWrite streams to SkStreamAsset.
bungeman [Wed, 18 Feb 2015 19:01:05 +0000 (11:01 -0800)]
Update DirectWrite streams to SkStreamAsset.

SkTypefaces now deal in terms of SkStreamAsset, but the DirectWrite port
was never fully converted.

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

9 years agoRemove Chromium staging in SkDrawCommand
robertphillips [Wed, 18 Feb 2015 18:56:05 +0000 (10:56 -0800)]
Remove Chromium staging in SkDrawCommand

This cannot land until https://codereview.chromium.org/917063008/ (Cleanup lingering scaffolding for Skia change) has landed.

TBR=joshualitt@chromium.org

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

9 years agoupdate sampleapp for stroking experiment
caryclark [Wed, 18 Feb 2015 18:56:00 +0000 (10:56 -0800)]
update sampleapp for stroking experiment

Add RotateCircles3 back as better-named QuadStroker.

Switch pathfill test to call skia before draw instead of in
initializer to avoid triggering debugging breakpoints.

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

9 years agoExpose method to retrieve CTFont
dominik.rottsches [Wed, 18 Feb 2015 18:50:58 +0000 (10:50 -0800)]
Expose method to retrieve CTFont

BUG=skia:3351
R=bungeman@chromium.org

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

9 years agoMake SkImage::getTexture() const
kkinnunen [Wed, 18 Feb 2015 18:50:52 +0000 (10:50 -0800)]
Make SkImage::getTexture() const

Make SkImage::getTexture() const. At the moment the function
does not mutate the state.

One use-case is that this makes it possible in the future to add draw
function to SkBaseDevice functions. The device draw functions take
const ref objects, but SkGpuDevice likely would benefit of using the
getTexture().

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

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

9 years agofix xcode build
mtklein [Wed, 18 Feb 2015 17:35:49 +0000 (09:35 -0800)]
fix xcode build

NOTREECHECKS=true

BUG=skia:

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

9 years agoRevert of Use uint16s for texture coordinates when rendering text. (patchset #5 id...
reed [Wed, 18 Feb 2015 02:38:38 +0000 (18:38 -0800)]
Revert of Use uint16s for texture coordinates when rendering text. (patchset #5 id:80001 of https://codereview.chromium.org/917373002/)

Reason for revert:
speculative revert for DEPS failures

https://codereview.chromium.org/932973002/

Original issue's description:
> Use uint16s for texture coordinates when rendering text.
>
> Allows us to push more vertices into a given vertex buffer, with
> a slight performance improvement.
>
> Committed: https://skia.googlesource.com/skia/+/059034d252007d0dd86fff5ffdbb53cbcb10d34b

TBR=joshualitt@google.com,robertphillips@google.com,bsalomon@google.com,reed@google.com,djsollen@google.com,jvanverth@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoUse an array of nonpurgeable resources in GrResourceCache
bsalomon [Tue, 17 Feb 2015 23:09:34 +0000 (15:09 -0800)]
Use an array of nonpurgeable resources in GrResourceCache

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

9 years agozlib/pdf: remove HaveFlate(), depend on preprocessor defines
halcanary [Tue, 17 Feb 2015 22:43:06 +0000 (14:43 -0800)]
zlib/pdf: remove HaveFlate(), depend on preprocessor defines

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

9 years agoDM: move ext into key
mtklein [Tue, 17 Feb 2015 21:18:04 +0000 (13:18 -0800)]
DM: move ext into key

BUG=skia:

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

9 years agoSK_NO_FLATE
mtklein [Tue, 17 Feb 2015 21:10:43 +0000 (13:10 -0800)]
SK_NO_FLATE

Also remove skia_zlib_static.  We're not using it.  We don't even have zlib in DEPS.

No public API changes.
TBR=reed@google.com

BUG=skia:

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

9 years agoMake GrResourceCache use a priority queue of purgeable resources.
bsalomon [Tue, 17 Feb 2015 19:47:40 +0000 (11:47 -0800)]
Make GrResourceCache use a priority queue of purgeable resources.

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

9 years agoadd gm for path-arcs, and catch degenerate arc in conic-case
reed [Tue, 17 Feb 2015 19:43:14 +0000 (11:43 -0800)]
add gm for path-arcs, and catch degenerate arc in conic-case

BUG=skia:3428

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

9 years agoDecrease number of allowed stages for Angle on GLProgramTest
egdaniel [Tue, 17 Feb 2015 19:18:38 +0000 (11:18 -0800)]
Decrease number of allowed stages for Angle on GLProgramTest

BUG=skia:3435

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

9 years agoUse dst copies in porter duffer XP to correctly render certain blends.
egdaniel [Tue, 17 Feb 2015 19:15:47 +0000 (11:15 -0800)]
Use dst copies in porter duffer XP to correctly render certain blends.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/997c6358d94e188b1a7b89a4f86e24cbe0f5a164

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

9 years agoSuggested version with 'undo'.
mtklein [Tue, 17 Feb 2015 19:13:33 +0000 (11:13 -0800)]
Suggested version with 'undo'.

BUG=skia:

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

9 years agouse common impl for drawTextOnPath
reed [Tue, 17 Feb 2015 18:33:54 +0000 (10:33 -0800)]
use common impl for drawTextOnPath

BUG=skia:

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

9 years agoRemove SK_SUPPORT_LEGACY_ADDRRECT
fmalita [Tue, 17 Feb 2015 17:25:49 +0000 (09:25 -0800)]
Remove SK_SUPPORT_LEGACY_ADDRRECT

The flag is no longer used in Chromium.

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

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

9 years agoRemove SK_SUPPORT_LEGACY_CONIC_COMPUTE_QUAD_POW2
fmalita [Tue, 17 Feb 2015 17:18:33 +0000 (09:18 -0800)]
Remove SK_SUPPORT_LEGACY_CONIC_COMPUTE_QUAD_POW2

The flag is no longer used in Chromium.

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

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

9 years agoImprove GrInOrderDrawBuffer::Cmd encapsulation
robertphillips [Tue, 17 Feb 2015 17:14:33 +0000 (09:14 -0800)]
Improve GrInOrderDrawBuffer::Cmd encapsulation

In preparation for moving all the Cmds out of GrInOrderDrawBuffer.

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

9 years agoFix broken build due to updated #define
djsollen [Tue, 17 Feb 2015 17:09:53 +0000 (09:09 -0800)]
Fix broken build due to updated #define

TBR=scroggo@google.com

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

9 years agoUse uint16s for texture coordinates when rendering text.
jvanverth [Tue, 17 Feb 2015 16:39:56 +0000 (08:39 -0800)]
Use uint16s for texture coordinates when rendering text.

Allows us to push more vertices into a given vertex buffer, with
a slight performance improvement.

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

9 years agoRemove android specific srcPath from SkPath
djsollen [Tue, 17 Feb 2015 16:06:32 +0000 (08:06 -0800)]
Remove android specific srcPath from SkPath

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

9 years agoFix skia bug 2845
kui.zheng [Tue, 17 Feb 2015 16:01:52 +0000 (08:01 -0800)]
Fix skia bug 2845

Shouldn't call Fast Blur path(DoubleRowBoxBlur_NEON)
when kernelsize is 1. Or, uint16x8_t resultPixels will be overflow.

BUG=skia:2845
R=senorblanco@chromium.org

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

9 years agoUse SkXfermode as public facing enum for GrPorterDuffXP
egdaniel [Tue, 17 Feb 2015 15:34:43 +0000 (07:34 -0800)]
Use SkXfermode as public facing enum for GrPorterDuffXP

BUG=skia:

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

9 years agoUpstream support for sfntly in Google3
mtklein [Tue, 17 Feb 2015 14:33:38 +0000 (06:33 -0800)]
Upstream support for sfntly in Google3

See cr/86110021.

BUG=skia:

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

9 years agoMinor refactoring
robertphillips [Mon, 16 Feb 2015 17:35:50 +0000 (09:35 -0800)]
Minor refactoring

This CL just de-dups some code in GrInOrderDrawBuffer.

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

9 years agofix for ASAN heap overflow
joshualitt [Mon, 16 Feb 2015 16:33:19 +0000 (08:33 -0800)]
fix for ASAN heap overflow

TBR=bsalomon@google.com
BUG=skia:

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

9 years agoremove unneeded preroll
reed [Sun, 15 Feb 2015 19:08:40 +0000 (11:08 -0800)]
remove unneeded preroll

BUG=skia:
TBR=robertphilips

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

9 years agoUpdate SKP version
skia.buildbots [Sun, 15 Feb 2015 09:33:06 +0000 (01:33 -0800)]
Update SKP version

Automatic commit by the RecreateSKPs bot.

TBR=

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

9 years agoNegative numbers are not flags.
mtklein [Sun, 15 Feb 2015 02:56:31 +0000 (18:56 -0800)]
Negative numbers are not flags.

tested: d dm --matrix 1 -0.3 0 0.7 1 0 0 0 1 --src gm --config matrix-8888 -w bad

BUG=skia:

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

9 years agogit: add skps to .gitignore
halcanary [Sat, 14 Feb 2015 02:57:33 +0000 (18:57 -0800)]
git: add skps to .gitignore

NOTRY=true

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

9 years agoLabels when dumping fonts in Android parser test.
bungeman [Sat, 14 Feb 2015 02:30:11 +0000 (18:30 -0800)]
Labels when dumping fonts in Android parser test.

When the FontConfigParserAndroid test runs, it optionally dumps the
configurations it creates for manual inspection. This is useful, but
since three different configurations exist, it can be difficult to tell
them apart. This simply prints a short header before each dump so that
the dump can be identified.

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

9 years agoMulti-string shaders
joshualitt [Sat, 14 Feb 2015 01:18:27 +0000 (17:18 -0800)]
Multi-string shaders

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1c3c2d83364ee228e0751df0e1b9c161c0ba8c1e

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

9 years agoRevert of Multi-string shaders (patchset #4 id:60001 of https://codereview.chromium...
joshualitt [Sat, 14 Feb 2015 00:31:46 +0000 (16:31 -0800)]
Revert of Multi-string shaders (patchset #4 id:60001 of https://codereview.chromium.org/929503002/)

Reason for revert:
windows warnings

Original issue's description:
> Multi-string shaders
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1c3c2d83364ee228e0751df0e1b9c161c0ba8c1e

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

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

9 years agoMulti-string shaders
joshualitt [Sat, 14 Feb 2015 00:23:48 +0000 (16:23 -0800)]
Multi-string shaders

BUG=skia:

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

9 years agoC++11 Unit Test for RValue semantics.
halcanary [Fri, 13 Feb 2015 23:12:52 +0000 (15:12 -0800)]
C++11 Unit Test for RValue semantics.

Motivation:  test that these works on all possible bots and for all possible clients (clients do run these unit tests, right?)

Dear clients:  if this unit test fails, let us know!

BUG=skia:3427

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

9 years agoDM: don't leak the null canvas in NullSink.
mtklein [Fri, 13 Feb 2015 23:11:10 +0000 (15:11 -0800)]
DM: don't leak the null canvas in NullSink.

Also make NullSink a real boy: declared among the other Sinks, impl in .cpp.

BUG=skia:

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

9 years agofix more tricky-float cases in SkRRect validate
reed [Fri, 13 Feb 2015 22:33:02 +0000 (14:33 -0800)]
fix more tricky-float cases in SkRRect validate

BUG=458524,458522

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

9 years agoAA stroke rects batch
joshualitt [Fri, 13 Feb 2015 22:25:10 +0000 (14:25 -0800)]
AA stroke rects batch

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/68c7b6aa98816badbbb69ef65a84a932b8dd58f3

Committed: https://skia.googlesource.com/skia/+/b0fb935bd544b0c6f68c692c7e1ee40876184a1a

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

9 years agoSplit out methods in GrGpuResource::CacheAccess that can be called outside of the...
bsalomon [Fri, 13 Feb 2015 22:20:05 +0000 (14:20 -0800)]
Split out methods in GrGpuResource::CacheAccess that can be called outside of the cache.

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

9 years agoYUV scale fix
sugoi [Fri, 13 Feb 2015 21:57:09 +0000 (13:57 -0800)]
YUV scale fix

There was a scaling mistake visible in some JPEG images because the ratio between Y, U and V planes were assumed to be the same ratios as the ratio between texture sizes, which was wrong because texture have a minimum size of 16 and are rounded up to the next POT. Since the ratios between Y and UV planes are generally 1, 2 or 4, rounding up to the next POT would generally preserve this ratio, so that this bug was not very visible, apart from very small jpeg images of 8 or less pixels in either width or height.

BUG=457954

Committed: https://skia.googlesource.com/skia/+/e6eddf7dd85add7da41f22f2643bdd573ad1f1cf

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

9 years agoStop lieing about GrBatch color for Rects
joshualitt [Fri, 13 Feb 2015 20:50:09 +0000 (12:50 -0800)]
Stop lieing about GrBatch color for Rects

BUG=skia:

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

9 years agoFix conversion from enum to bool error.
scroggo [Fri, 13 Feb 2015 20:45:52 +0000 (12:45 -0800)]
Fix conversion from enum to bool error.

Needed for the DEPS roll.

TBR=jvanverth@google.com

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

9 years agoDetermine whether we can tweakAlphaForCoverage during Pipeline/XP creation.
egdaniel [Fri, 13 Feb 2015 20:11:00 +0000 (12:11 -0800)]
Determine whether we can tweakAlphaForCoverage during Pipeline/XP creation.

BUG=skia:

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

9 years agoRevert of YUV scale fix (patchset #2 id:20001 of https://codereview.chromium.org...
jvanverth [Fri, 13 Feb 2015 20:02:22 +0000 (12:02 -0800)]
Revert of YUV scale fix (patchset #2 id:20001 of https://codereview.chromium.org/922273002/)

Reason for revert:
Turning Windows compile bots red.

Original issue's description:
> YUV scale fix
>
> There was a scaling mistake visible in some JPEG images because the ratio between Y, U and V planes were assumed to be the same ratios as the ratio between texture sizes, which was wrong because texture have a minimum size of 16 and are rounded up to the next POT. Since the ratios between Y and UV planes are generally 1, 2 or 4, rounding up to the next POT would generally preserve this ratio, so that this bug was not very visible, apart from very small jpeg images of 8 or less pixels in either width or height.
>
> BUG=457954
>
> Committed: https://skia.googlesource.com/skia/+/e6eddf7dd85add7da41f22f2643bdd573ad1f1cf

TBR=bsalomon@google.com,sugoi@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=457954

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

9 years agoFontFamily SkTArrays can be moved.
bungeman [Fri, 13 Feb 2015 19:49:07 +0000 (11:49 -0800)]
FontFamily SkTArrays can be moved.

The FontFamily type in SkFontConfigParser_android.h contains two fields
of type SkTArray. Both of these contain types which can be moved
instead of calling constructors and destructors on resize. This change
avoids a number of unneeded SkString refs and unrefs.

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

9 years agoYUV scale fix
sugoi [Fri, 13 Feb 2015 19:47:11 +0000 (11:47 -0800)]
YUV scale fix

There was a scaling mistake visible in some JPEG images because the ratio between Y, U and V planes were assumed to be the same ratios as the ratio between texture sizes, which was wrong because texture have a minimum size of 16 and are rounded up to the next POT. Since the ratios between Y and UV planes are generally 1, 2 or 4, rounding up to the next POT would generally preserve this ratio, so that this bug was not very visible, apart from very small jpeg images of 8 or less pixels in either width or height.

BUG=457954

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

9 years agoMake SkImageGenerator::getPixels() return an enum.
scroggo [Fri, 13 Feb 2015 19:13:34 +0000 (11:13 -0800)]
Make SkImageGenerator::getPixels() return an enum.

The new enum describes the nature of the failure. This is in
preparation for writing a replacement for SkImageDecoder, which will
use this interface.

Update the comments for getPixels() to specify what it means to pass
an SkImageInfo with a different size.

Make SkImageGenerator Noncopyable.

Leave onGetYUV8Planes alone, since we have separate discussions
regarding modifying that API.

Make callers of SkImageDecoder consistently handle kPartialSuccess.
Previously, some callers considered it a failure, and others considered
it a success.

BUG=skia:3257

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

9 years agoRemove SkPictureFlat.h include from SkDrawCommands.h
robertphillips [Fri, 13 Feb 2015 19:13:00 +0000 (11:13 -0800)]
Remove SkPictureFlat.h include from SkDrawCommands.h

This cannot land until https://codereview.chromium.org/909353004/ (Prepare SkiaBenchmarkingExtensionTest for upcoming Skia changes) lands in Chromium

Committed: https://skia.googlesource.com/skia/+/5a4c233a3657d12d836de388b41e30405b4ab976

Committed: https://skia.googlesource.com/skia/+/fa3a83d0fe53907e618346d3f1c17a95da1a9d22

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

9 years agoAdd a templated priority queue class.
bsalomon [Fri, 13 Feb 2015 19:08:21 +0000 (11:08 -0800)]
Add a templated priority queue class.

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

9 years agoRevert of Use dst copies in porter duffer XP to correctly render certain blends....
egdaniel [Fri, 13 Feb 2015 19:07:54 +0000 (11:07 -0800)]
Revert of Use dst copies in porter duffer XP to correctly render certain blends. (patchset #4 id:60001 of https://codereview.chromium.org/914003003/)

Reason for revert:
Failing GLProgramTest passing in stupid coeffs

Original issue's description:
> Use dst copies in porter duffer XP to correctly render certain blends.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/997c6358d94e188b1a7b89a4f86e24cbe0f5a164

TBR=bsalomon@google.com,joshualitt@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agoUse dst copies in porter duffer XP to correctly render certain blends.
egdaniel [Fri, 13 Feb 2015 18:23:19 +0000 (10:23 -0800)]
Use dst copies in porter duffer XP to correctly render certain blends.

BUG=skia:

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

9 years agoFix leak in ComposedImageFilterOffset test
ajuma [Fri, 13 Feb 2015 18:15:46 +0000 (10:15 -0800)]
Fix leak in ComposedImageFilterOffset test

This fixes a leak in the ComposedImageFilterOffset test that was
introduced in https://codereview.chromium.org/908273002/.

BUG=chromium:453924

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

9 years agoFix SkComposeImageFilter's bounds computation and offset handling
ajuma [Fri, 13 Feb 2015 17:05:47 +0000 (09:05 -0800)]
Fix SkComposeImageFilter's bounds computation and offset handling

This makes SkComposeImageFilter::computeFastBounds compose its
filters' bounds (rather than falling back to
SkImageFilter::computeFastBounds, which takes the union of the bounds).

This also makes SkComposeImageFilter::onFilterImage correctly handle
an offset produced when applying the inner filter; such offsets were
previously ignored.

BUG=chromium:453924

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

9 years agoAdding new benchmark to test image decoding performance.
msarett [Fri, 13 Feb 2015 17:05:41 +0000 (09:05 -0800)]
Adding new benchmark to test image decoding performance.

BUG=skia:

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

9 years agoLimit clear as draw workaround to Adreno 3xx.
bsalomon [Fri, 13 Feb 2015 17:00:39 +0000 (09:00 -0800)]
Limit clear as draw workaround to Adreno 3xx.

This causes more problems than it fixes on the Nexus 6.

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

9 years agoPass in ProcOptInfos into willNeedDstCopy on XPs
egdaniel [Fri, 13 Feb 2015 17:00:33 +0000 (09:00 -0800)]
Pass in ProcOptInfos into willNeedDstCopy on XPs

BUG=skia:

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

9 years ago[SkSVGDevice] Full font family support
fmalita [Fri, 13 Feb 2015 16:55:24 +0000 (08:55 -0800)]
[SkSVGDevice] Full font family support

Use a family name iterator and list all names instead of just one
returned by SkTypeface::getFamilyName().

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

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

9 years agoVerify all parsed test font files start with cap.
bungeman [Fri, 13 Feb 2015 16:55:16 +0000 (08:55 -0800)]
Verify all parsed test font files start with cap.

All of the Android test font configuration files have file names which
start with a capital latin letter. Verify this is true of the parsed file
names. This would have caught previous issues with slicing, and will
hopefully prevent such issues going unnoticed in the future.

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

9 years agointerpret conic tolerance correctly -- big rebaseline
reed [Fri, 13 Feb 2015 01:56:21 +0000 (17:56 -0800)]
interpret conic tolerance correctly -- big rebaseline

need this to land in chrome
https://codereview.chromium.org/918233002/

NOTREECHECKS=True

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

9 years agoMinimize SkTHash object copying
fmalita [Fri, 13 Feb 2015 01:32:49 +0000 (17:32 -0800)]
Minimize SkTHash object copying

AKA ref-constify the world.

R=mtklein@google.com

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

9 years agoRevert of I cannot remember what the race here actually was. (patchset #1 id:1 of...
mtklein [Thu, 12 Feb 2015 23:32:07 +0000 (15:32 -0800)]
Revert of I cannot remember what the race here actually was. (patchset #1 id:1 of https://codereview.chromium.org/922873002/)

Reason for revert:
http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN/builds/1557/steps/dm/logs/stdio

Original issue's description:
> I cannot remember what the race here actually was.
>
> Removing SkTRacy will show us, or perhaps show us we already fixed the race.
>
> BUG=chromium:437511
>
> No public API changes.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/71409c83e69b387b3c5d567197d0421c36baf68d

TBR=bungeman@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:437511

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

9 years agoI cannot remember what the race here actually was.
mtklein [Thu, 12 Feb 2015 23:24:51 +0000 (15:24 -0800)]
I cannot remember what the race here actually was.

Removing SkTRacy will show us, or perhaps show us we already fixed the race.

BUG=chromium:437511

No public API changes.
TBR=reed@google.com

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

9 years agoRevert of AA stroke rects batch (patchset #6 id:100001 of https://codereview.chromium...
joshualitt [Thu, 12 Feb 2015 23:03:49 +0000 (15:03 -0800)]
Revert of AA stroke rects batch (patchset #6 id:100001 of https://codereview.chromium.org/912483004/)

Reason for revert:
breaks in debug nanobench

Original issue's description:
> AA stroke rects batch
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/68c7b6aa98816badbbb69ef65a84a932b8dd58f3
>
> Committed: https://skia.googlesource.com/skia/+/b0fb935bd544b0c6f68c692c7e1ee40876184a1a

TBR=bsalomon@google.com,robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

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

9 years agofix for uniform view matrix being uploaded but not used
joshualitt [Thu, 12 Feb 2015 22:48:42 +0000 (14:48 -0800)]
fix for uniform view matrix being uploaded but not used

As discussed, I'll follow this up by removing localmatrix/uniform view matrix from the base classe

BUG=skia:

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