Commit Graph

19084 Commits

Author SHA1 Message Date
update-skps
1f7e7ec195 Update SKP version
Automatic commit by the RecreateSKPs bot.

TBR=
NO_MERGE_BUILDS

Review URL: https://codereview.chromium.org/1390433002
2015-10-04 00:22:10 -07:00
cdalton
7d5c950e85 Simplify nvpr text
- Drops device-space glyphs in favor of perf/simplicity.

- Removes residual complexities that would flip glyphs vertically for
  compatibility with nvpr glyph loading, which is no longer used.

- Drops hairline support since they required new paths for every draw
  matrix, and could only be supported under certain circumstances.

- Quits checking for color bitmap fonts in canDrawText since the
  normal color emoji fallback will handle them anyway.

BUG=skia:

Review URL: https://codereview.chromium.org/1380973002
2015-10-03 13:28:35 -07:00
msarett
19ae315dd0 Stop calling jpeg_finish_decompress()
jpeg_finish_decompress() does several things:
(1) Reads to the end of the image stream.
(2) Calls term_src(), a client provided function that
indicates we are done with the memory stream.  Our current
implementation of term_src() does nothing.
(3) Calls jpeg_abort() which aborts the decode and cleans
up some memory.

I don't think we need to call this anymore.

(1) seems irrelevant.

It seems a little dangerous to get rid of (2), but it is
fine while our implementation of term_src() does nothing.

(3) We will call jpeg_destroy() on destruction of the
JpegDecoderManager.  This should free all the memory,
making it unnecessary to call jpeg_abort() beforehand.

BUG=skia:4040

Review URL: https://codereview.chromium.org/1370323004
2015-10-02 13:44:13 -07:00
scroggo
e7fc14b55b Move all knowledge of X sampling into SkScaledCodec
Prior to this CL, each SkCodec subclass that allows sampling does an
extra check in onStartScanlineDecode to determine whether the X dimension
is supported for sampling. Remove this check, and provide a way for
SkScaledCodec to directly access the SkSwizzler, and update it to do
sampling. This way, the SkCodec knows nothing of sampling, but we can
still save the extra step of sampling afterwards.

FIXME: SkBmpRLECodec still calls SkScaledCodec::DimensionsSupported. It
seems like it could directly support sampling, rather than dealing with
SkScaledCodec (partially).

Add a new base class for SkSwizzler. It allows updating the swizzler
after it was created, which is done by SkScaledCodec. Modify SkSwizzler's
constructor/factory function to stop taking any info about sampling,
assume the sample size is one, and move modifying that into a virtual
function overridden from the base class.

BUG=skia:4284

Review URL: https://codereview.chromium.org/1372973002
2015-10-02 13:14:46 -07:00
halcanary
65f7c9fa7e SkPDF: remove suppression
Review URL: https://codereview.chromium.org/1379183005
2015-10-02 12:15:55 -07:00
joshualitt
f6d259bd96 Incrementally flush GrDrawTarget
BUG=skia:

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

Review URL: https://codereview.chromium.org/1386463004
2015-10-02 11:27:15 -07:00
jvanverth
41518ebc82 Fix CrOS SampleApp
Add compile-time check for GPU build when using GPU flag

TBR=robertphillips@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1376423004
2015-10-02 10:42:36 -07:00
joshualitt
0737f61f23 Revert of Incrementally flush GrDrawTarget (patchset #8 id:130001 of https://codereview.chromium.org/1386463004/ )
Reason for revert:
breaking bots

Original issue's description:
> Incrementally flush GrDrawTarget
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/a7e878064509ef96b54d5507dab0b50def66dc13

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

Review URL: https://codereview.chromium.org/1386683002
2015-10-02 10:16:03 -07:00
jvanverth
44dcb8a84b Some iOS fixes to make SampleApp work better.
Changes:
- Rebuild argc and argv so we can process command line arguments
- Remove unnecessary SimpleiOSApp files
- Add support for reading files from the app bundle
- Add gpu flag so we can start up directly into OpenGL

Review URL: https://codereview.chromium.org/1382943004
2015-10-02 09:12:05 -07:00
joshualitt
a7e8780645 Incrementally flush GrDrawTarget
BUG=skia:

Review URL: https://codereview.chromium.org/1386463004
2015-10-02 09:06:39 -07:00
bsalomon
db9f66472e Add work around for devices/API filters that claim GL_KHR_debug support but don't provide functions
Review URL: https://codereview.chromium.org/1383763004
2015-10-02 08:34:29 -07:00
bsalomon
473addf176 Remove separate cache for clip mask textures
Review URL: https://codereview.chromium.org/1377943003
2015-10-02 07:49:06 -07:00
joshualitt
399dd05962 Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1375733003/ )
Reason for revert:
Reverting, optimistically fixed

Original issue's description:
> Reland of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1382933002/ )
>
> Reason for revert:
> Not fixed. :-(
>
> Original issue's description:
> > Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
> >
> > Reason for revert:
> > should hopefully be fixed, please reland if not.
> >
> > Original issue's description:
> > > Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
> > >
> > > BUG=skia:4373
> > >
> > > Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47
> >
> > TBR=borenet@google.com,benjaminwagner@google.com
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:4373
> >
> > Committed: https://skia.googlesource.com/skia/+/52f8deba607fd67558b57551cd43406c8b743072
>
> TBR=borenet@google.com,joshualitt@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/9442ab8a40dd0effde253e3b2d166bcf47222e92

TBR=borenet@google.com,benjaminwagner@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1385633002
2015-10-02 06:56:25 -07:00
joshualitt
b235168f55 S4 only has 8 texture units on the GLContext we create
BUG=skia:4373

Review URL: https://codereview.chromium.org/1386643002
2015-10-02 06:49:23 -07:00
hendrikw
b1ac52fb0f Skia: Add Command Buffer support to Linux/Mac
Code added to load libcommand_buffer_gles2.so on linux or
mac.

Review URL: https://codereview.chromium.org/1346423002
2015-10-01 18:29:34 -07:00
benjaminwagner
9442ab8a40 Reland of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1382933002/ )
Reason for revert:
Not fixed. :-(

Original issue's description:
> Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
>
> Reason for revert:
> should hopefully be fixed, please reland if not.
>
> Original issue's description:
> > Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
> >
> > BUG=skia:4373
> >
> > Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47
>
> TBR=borenet@google.com,benjaminwagner@google.com
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/52f8deba607fd67558b57551cd43406c8b743072

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

Review URL: https://codereview.chromium.org/1375733003
2015-10-01 16:25:51 -07:00
mtklein
e14937e7c4 Update Android toolchains and streamline process.
- This updates to r10e / API v21 everywhere.
  - This has each host machine fetch the NDK,
    run make-standalone-toolchain.sh, and copy gdbserver itself.

(It will do all this once per $ARCH, which is a little inefficient, but it
washes out in steady state.)

BUG=skia:

Review URL: https://codereview.chromium.org/1385463002
2015-10-01 13:24:23 -07:00
ssid
60df542afc Strip font name of special characters before dumping
The font name can contain special characters in some OS that is
considered as delimiters ('/') by the traces. This causes error in the
dump name. This CL strips the fone name obtained before adding it to
traces.

This also adds discardable memory size for resources in cache.

BUG=532838

Review URL: https://codereview.chromium.org/1346993006
2015-10-01 12:41:35 -07:00
bungeman
77a53de20d Base SkAutoTUnref on skstd::unique_ptr.
To further consolidate the various unique owning classes, this bases
SkAutoTUnref on skstd::unique_ptr. Users are updated because of two
breaking changes, swap now takes a reference and reset no longer
returns its argument.

Review URL: https://codereview.chromium.org/1370803002
2015-10-01 12:28:49 -07:00
joshualitt
52f8deba60 Revert of Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373 (patchset #1 id:1 of https://codereview.chromium.org/1365683003/ )
Reason for revert:
should hopefully be fixed, please reland if not.

Original issue's description:
> Blacklist GLVertexAttributesBench and GLVec4ScalarBench for GalaxyS4 due to skia:4373
>
> BUG=skia:4373
>
> Committed: https://skia.googlesource.com/skia/+/3420d2796bad5ce553efb9909790ea72e578dc47

TBR=borenet@google.com,benjaminwagner@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4373

Review URL: https://codereview.chromium.org/1382933002
2015-10-01 12:09:17 -07:00
mtklein
c6f5cac9bb Basic CPU support for VisualBench.
BUG=skia:

Review URL: https://codereview.chromium.org/1378393002
2015-10-01 11:56:56 -07:00
joshualitt
b90de31355 Fix for texture width or height are greater than 2^16
BUG=skia:3467
TBR=

Review URL: https://codereview.chromium.org/1380153002
2015-10-01 11:54:34 -07:00
reed
d1d4460547 add hard-coded limit for tmp allocations when HQ image scaling
BUG=528628

Review URL: https://codereview.chromium.org/1368393003
2015-10-01 11:21:57 -07:00
halcanary
3d8c33cd83 SkPDF: ASAN fix: don't double ref new SkPDFBitmap objects
TBR=robertphillips@google.com,tomhudson@google.com,

Review URL: https://codereview.chromium.org/1381073005
2015-10-01 11:06:22 -07:00
scroggo
f174e92873 Update libwebp and resume testing scaled webp
libwebp has a fix for [1]. Update to the commit that contains the fix.

Update libwebp.gypi, corresponding to libwebp's latest makefile.

Turn back on DM testing for scaled webp, now that it should no longer
use uninitialized memory.

[1] https://code.google.com/p/webp/issues/detail?id=254

BUG=skia:4038

Committed: https://skia.googlesource.com/skia/+/0575d3e6c272744a66ab3281f9871366717df339

Review URL: https://codereview.chromium.org/1280073002
2015-10-01 10:56:08 -07:00
joshualitt
4d06ae620d Enable image is opaque test seems to pass now
BUG=skia:2857

Review URL: https://codereview.chromium.org/1375293003
2015-10-01 09:49:25 -07:00
mtklein
a1ebeb25e9 Remove const from const int loops.
This drives me nuts, and prevents `while (loops --> 0)`.

BUG=skia:

Review URL: https://codereview.chromium.org/1379923005
2015-10-01 09:43:39 -07:00
bsalomon
aa48d36397 Fix drawVertices when there is a paint alpha
Review URL: https://codereview.chromium.org/1382753002
2015-10-01 08:34:17 -07:00
rmistry
5827653e42 Automatically add extra CQ trybots for predetermined paths
If the CL does not contain a "CQ_EXTRA_TRYBOTS=" section then it constructs one from the paths modified in your CL.

If you already have an existing "CQ_EXTRA_TRYBOTS=" section in your CL then it parses it, preserves your options, and only adds the builders and masters that were missing.

Also ensures no trybots are repeated (i.e. each master trybot combination only shows up once).

And I killed the hashtags feature in this CL, nobody was using it.

BUG=skia:4364

Review URL: https://codereview.chromium.org/1383743002
2015-10-01 08:24:03 -07:00
rmistry
9806d4ded5 Resolve TODOs in PRESUBMIT.py
BUG=skia:

Review URL: https://codereview.chromium.org/1384453004
2015-10-01 08:10:54 -07:00
tomhudson
458633496c Add overrides to SkAndroidSDKCanvas, update SkHwuiRenderer
We can not call android::uirenderer::DisplayListCanvas::reset()
after the object has been constructed (due to an assert), so remove
that call. Add two missing overrides to SkAndroidSDKCanvas:
onDrawAtlas() and onDrawImageNine().

BUG=skia:4216
R=djsollen@google.com

patch from issue 1377533003 at patchset 20001 (http://crrev.com/1377533003#ps20001)

Review URL: https://codereview.chromium.org/1369923003
2015-10-01 08:02:23 -07:00
halcanary
7a14b310d6 SkPDF: Implement drawImage*() properly
drawImage calls now properly embeds the original jpeg.

NOTE: drawBitmap*() calls no longer embed JPEG files when
possible (this is in advance of eliminating bitmaps backed
by encoded data).  Chromium has already moved from
drawBitmap to drawImage.

Comparisons:

control:
    total PDF drawImage/drawBitmap calls: 8010
    total PDF jpeg images: 0
    total PDF regular images: 3581

experiament:
    total PDF drawImage/drawBitmap calls: 8014
    total PDF jpeg images: 271
    total PDF regular images: 3311
    total PDF regular images: 3582 (271 + 3311)

When comparing rendered output there were perceptual
differences in the following four GMs: colorcube, emboss,
colormatrix, and tablecolorfilter.  All of these differences
were improvements (that is, closer to the 8888 rendering)
due fixing a bug with colorfilters and forgetting to call
notifyPixelsChanged.

No SKPs had perceptual differences.

Total PDF size dropped from 133964 kB to 126276 kB, a 5.7%
improvement (mostly due to restoring use of JPG images in
SKPs).

BUG=skia:4370

Review URL: https://codereview.chromium.org/1372783003
2015-10-01 07:28:13 -07:00
joshualitt
7bdd70ab91 Fix for 2056
BUG=skia:2056

Review URL: https://codereview.chromium.org/1376293003
2015-10-01 06:28:11 -07:00
robertphillips
7b60c2cd1a Revert of Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor) (patchset #1 id:1 of https://codereview.chromium.org/1378023004/ )
Reason for revert:
Failing some Blink layout tests - will wait until after branch.

Original issue's description:
> Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor)
>
> Committed: https://skia.googlesource.com/skia/+/2d70bcccc9ba8f3898a7ae506ba7410ed8e9c9db

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1378323002
2015-10-01 04:53:36 -07:00
vbuzinov
3e77ba96d5 Implement stencil clipping in mixed sampled render targets
This change enables multisampled clipping for mixed sampled
render targets.  Previously clipping in mixed samples config
behaved the same as in the gpu config.

In order to retrofit non-MSAA draw methods, programmable sample
locations are used in order to colocate all samples at (0.5, 0.5).
Requires support for NV_sample_locations.

BUG=skia:4399

Review URL: https://codereview.chromium.org/1232103002
2015-09-30 23:02:06 -07:00
scroggo
6634cbb427 Small DM cleanup
We set a value to bounds, and then immediately replace it. Skip the
first one.

Review URL: https://codereview.chromium.org/1378923002
2015-09-30 13:01:55 -07:00
robertphillips
2d70bcccc9 Have GrRectBlurEffect use Linear filtering (rather than Nearest Neighbor)
Review URL: https://codereview.chromium.org/1378023004
2015-09-30 12:28:06 -07:00
scroggo
8b17dcb72c Avoid copies in SkMasks constructor
Also mark const methods as const.

Review URL: https://codereview.chromium.org/1364463005
2015-09-30 12:26:49 -07:00
herb
f32602921a Add some of my favorite headers to gyp.
BUG=skia:

Review URL: https://codereview.chromium.org/1378133003
2015-09-30 12:22:25 -07:00
reed
856e9d9214 Revert[4] of add ImageShader, sharing code with its Bitmap cousin
Now with GrTextureMaker subclasses to handle npot usage.

This reverts commit 476506d070.

BUG=skia:

Review URL: https://codereview.chromium.org/1370223002
2015-09-30 12:21:45 -07:00
joshualitt
8a6697af95 Fix for nexus 5 crashing in GL benches
GLBenches do not expect gl state  to change between onPerCanvasPreDraw and *PostDraw, but we do a clear and sometimes we clear as draw.  This causes us to bind vertex objects / programs / etc.

This change creates two new virtual methods which are called right before and immediately after timing.

BUG=skia:

Review URL: https://codereview.chromium.org/1379853003
2015-09-30 12:11:07 -07:00
scroggo
7fac5af5e9 Fix bug testing SkCodec for ICO
Looking in Gold, I see some ICO images that only show the upper left
corner of the originals. It is happening because we use different ways
of deciding what the dimensions are:

In CodecSrc::size(), we use an SkScaledCodec to get the dimensions,
even when fMode is not kScaledCodec_Mode.

In CodecSrc::draw(), we only use SkScaledCodec in kScaledCodec_Mode.

My recent CL to combine SkScanlineDecoder with SkCodec revealed this
bug, because now SkScaledCodec::NewFromStream will succeed on ICO.
(Previously, it failed because we do not yet have a scanline decoder
for ICO (skbug.com/4404). Now that they are combined, we would need
to specially flag ICO to stop returning an SkScaledCodec.)

Switch size() to use the correct type of codec.

Review URL: https://codereview.chromium.org/1373253004
2015-09-30 11:33:12 -07:00
mtklein
56c6a117b2 CMake for Windows
Except for some small edits, this is mainly:

patch from issue 1353953004 at patchset 80001 (http://crrev.com/1353953004#ps80001)

CMake configuration file for compiling Windows x64 VS2013 with CMake.

Things to be fixed:
- only x64 is supported
- I didn't try SKIA_GDI (experimental) and directly went for the DirectWrite - this should need an option in the CMake configuration
- make sure yasm and custom build rules paths are set correctly - if the hierarchy changes CMake will just blow things up
- compilation works but there are LOTS and LOTS of warnings (over 9000), if this is okay nevermind but since most of them are related to deprecated functions either consider fixing or suppressing them
- Release mode is untested - I suppose it won't be a big deal but might need some fixing

More info here: https://groups.google.com/forum/#!topic/skia-discuss/HLu-Hesfbg4

BUG=skia:4269

CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Mac10.9-Clang-x86_64-Release-CMake-Trybot,Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1370263004
2015-09-30 11:06:53 -07:00
scroggo
3a7701c010 Call rewindIfNeeded in SkCodec
Rather than calling it in each subclass, call it once in the base
class. Call it first, since other steps may modify internal structures
which would be replaced by a call to onRewind.

BUG=skia:4284

Review URL: https://codereview.chromium.org/1381483002
2015-09-30 09:15:14 -07:00
scroggo
46c5747256 Merge SkCodec with SkScanlineDecoder
Benefits:
- This mimics other decoding APIs (including the ones SkCodec relies
on, e.g. a png_struct, which can be used to decode an entire image or
one line at a time).

- It allows a client to ask us to do what we can do efficiently - i.e.
start from encoded data and either decode the whole thing or scanlines.

- It removes the duplicate methods which appeared in both SkCodec and
SkScanlineDecoder (some of which, e.g. in SkJpegScanlineDecoder, just
call fCodec->sameMethod()).

- It simplifies moving more checks into the base class (e.g. the
examples in skbug.com/4284).

BUG=skia:4175
BUG=skia:4284

=====================================================================

SkScanlineDecoder.h/.cpp:
Removed.

SkCodec.h/.cpp:
Add methods, enums, and variables which were previously in
SkScanlineDecoder.
Default fCurrScanline to -1, as a sentinel that start has not been
called.

General changes:
Convert SkScanlineDecoders to SkCodecs.

General changes in SkCodec subclasses:
Merge SkScanlineDecoder implementation into SkCodec. Most (all?) owned
an SkCodec, so they now call this-> instead of fCodec->.

SkBmpCodec.h/.cpp:
Replace the unused rowOrder method with an override for
onGetScanlineOrder.
Make getDstRow const, since it is called by onGetY, which is const.

SkCodec_libpng.h/.cpp:
Make SkPngCodec an abstract class, with two subclasses which handle
scanline decoding separately (they share code for decoding the entire
image). Reimplement onReallyHasAlpha so that it can return the most
recent result (e.g. after a scanline decode which only decoded part
of the image) or a better answer (e.g. if the whole image is known to
be opaque).
Compute fNumberPasses early, so we know which subclass to instantiate.
Make SkPngInterlaceScanlineDecoder use the base class' fCurrScanline
rather than a separate variable.

CodexTest.cpp:
Add tests for the state changes in SkCodec (need to call start before
decoding scanlines; calling getPixels means that start will need to
be called again before decoding more scanlines).
Add a test which decodes in stripes, currently only used for an
interlaced PNG.

TODO: Add tests for onReallyHasAlpha.

Review URL: https://codereview.chromium.org/1365313002
2015-09-30 08:57:14 -07:00
joshualitt
e2bcec3848 fix for default path renderer draws harlines without bloating
BUG=skia:3883

Review URL: https://codereview.chromium.org/1372973003
2015-09-30 06:22:22 -07:00
ssid
f0c986503b Add support for light dumps in SkTraceMemoryDump interface.
SkGlyphCache dumps too many glyphs, and to reduce the trace size,
RequestDetails enum is added to SkTraceMemoryDump interface. This
would tell caches to dump only requested details or not a detailed
dump.

BUG=499731

Review URL: https://codereview.chromium.org/1310123007
2015-09-30 04:31:23 -07:00
reed
b39abc4d76 remove unused helper function
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1376603006
2015-09-29 18:27:59 -07:00
herb
e4c17356b6 Unify ThreadID.
BUG=skia:

Review URL: https://codereview.chromium.org/1371303003
2015-09-29 14:38:01 -07:00
reed
b5d3263534 try texture-maker to generalize stretching for npot and min-tex-size
BUG=skia:

Review URL: https://codereview.chromium.org/1376603002
2015-09-29 13:36:50 -07:00