Commit Graph

18572 Commits

Author SHA1 Message Date
senorblanco
4b013296bf Add rendertarget flag to prevent a debug assert in SampleApp.
BUG=skia:4223

Review URL: https://codereview.chromium.org/1301583006
2015-08-19 09:10:28 -07:00
joshualitt
ae5b2c623b Create GrQuad
BUG=skia:

Review URL: https://codereview.chromium.org/1294713009
2015-08-19 08:48:41 -07:00
caryclark
bca86202a4 cast SK_ARRAY_COUNT to make it sign agnostic
By adding a cast to SK_ARRAY_COUNT, the compiler treats the
compile-time value as if it were a const int, and like regular
numbers, permits it to be compared to signed and unsigned
numbers freely.

R=reed@google.com

Review URL: https://codereview.chromium.org/1299943002
2015-08-19 08:28:14 -07:00
bsalomon
7dea7b7df1 Use calloc to allocate data that will be uploaded to vertex/index buffers in Chrome
BUG=chromium:454267
BUG=chromium:522315

Review URL: https://codereview.chromium.org/1300123002
2015-08-19 08:26:51 -07:00
wangyix
93ab254b7e This change is in preparation for updating how processor keys and meta keys are generated for frag procs.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1298233002
2015-08-19 08:23:12 -07:00
joshualitt
5b4a7abd48 Adding sucessful exit message to VisualBench
BUG=skia:

Review URL: https://codereview.chromium.org/1287763004
2015-08-19 08:21:48 -07:00
reed
451af5062e remove SkDeferredCanvas
Waiting a day or so to see if the blink-removal of SkDeferredCanvas sticks

BUG=skia:

Review URL: https://codereview.chromium.org/1269093002
2015-08-19 08:18:04 -07:00
joshualitt
da04e0e80a Allow setting of GrBatchFontCache atlas sizes
BUG=skia:

Review URL: https://codereview.chromium.org/1255943006
2015-08-19 08:16:43 -07:00
msarett
45cba08015 Forgot to add resources with new test
I created these images using mandrill_16.png (already in
resources) and an online tool.

https://codereview.chromium.org/1287863004/
BUG=skia:

Review URL: https://codereview.chromium.org/1297723004
2015-08-19 08:12:57 -07:00
mtklein
8c9a67ae4b Revert of Have DM manually encode its .png outputs. (patchset #2 id:20001 of https://codereview.chromium.org/1304443002/ )
Reason for revert:
derek + Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Debug

Original issue's description:
> Have DM manually encode its .png outputs.
>
> This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3cc0dfffb70c0bd08ed8899efcd2e98da86a6ec7

TBR=stephana@google.com,msarett@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1297383002
2015-08-19 08:11:37 -07:00
herb
82a02c9620 Revert of SkCanvas::onDrawPicture() quick-reject (patchset #3 id:40001 of https://codereview.chromium.org/1264133003/ )
Reason for revert:
Seems to be breaking some blink tests.
https://storage.googleapis.com/chromium-layout-test-archives/linux_blink_rel/75812/layout-test-results/results.html

Original issue's description:
> SkCanvas::onDrawPicture() quick-reject
>
> R=reed@google.com,mtklein@google.com
>
> Committed: https://skia.googlesource.com/skia/+/48ed62b29d45e42b971aac8858da06781c93e6d7
>
> Committed: https://skia.googlesource.com/skia/+/d3d07245e29504dbffa0083e84ace5bab85853d4

TBR=mtklein@google.com,reed@google.com,mtklein@chromium.org,fmalita@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1301973002
2015-08-19 07:47:55 -07:00
mtklein
3cc0dfffb7 Have DM manually encode its .png outputs.
This eliminates some variability on various axes: different PNG encoders, different libpng versions, different formats (RGB, indexed), different unpremultiplication, different sRGB tags.

BUG=skia:

Review URL: https://codereview.chromium.org/1304443002
2015-08-19 07:37:51 -07:00
halcanary
d75e21dade SkStream Testing: fix bug in new unit test.
Review URL: https://codereview.chromium.org/1297143004
2015-08-19 07:22:04 -07:00
mtklein
a4c3244760 add missing override
BUG=skia:

TBR=

Review URL: https://codereview.chromium.org/1292073003
2015-08-19 07:11:34 -07:00
joshualitt
ae41b38343 fill rect batch refactor into separate batches
BUG=skia:

Review URL: https://codereview.chromium.org/1295773003
2015-08-19 06:54:08 -07:00
Brian Salomon
6458b6f0a8 Init class ID in GrStencilPathBatch
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1300093007
2015-08-19 09:44:48 -04:00
halcanary
cb9241badd Fix stack overuse error
Review URL: https://codereview.chromium.org/1283193008
2015-08-19 06:12:40 -07:00
bsalomon
f3bf892d71 Fix VS 2015 build
TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/1297283003
2015-08-19 06:12:36 -07:00
fmalita
d3d07245e2 SkCanvas::onDrawPicture() quick-reject
R=reed@google.com,mtklein@google.com

Committed: https://skia.googlesource.com/skia/+/48ed62b29d45e42b971aac8858da06781c93e6d7

Review URL: https://codereview.chromium.org/1264133003
2015-08-19 06:07:36 -07:00
reed
a32cc950fb widen gm to show entire image, add place-holder for no context
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1294113003
2015-08-19 06:07:29 -07:00
halcanary
48305e8353 SkPDF/Deflate: clean up old SkFlate code
Factor out some of https://crrev.com/1227913008

BUG=skia:3030

Review URL: https://codereview.chromium.org/1298243002
2015-08-18 13:30:25 -07:00
bsalomon
a44919ea27 Path stenciling in GrBatch
Review URL: https://codereview.chromium.org/1293973003
2015-08-18 13:28:20 -07:00
msarett
b32758a72f Test scaling for small images
We don't want to test small images on Gold because they are
not interested to look at.  Instead, I wrote a unit test to
verify that scaling small images does not cause crashes.

BUG=skia:

Review URL: https://codereview.chromium.org/1287863004
2015-08-18 13:22:46 -07:00
egdaniel
73caadf277 Try enabling all nanobenches on Nexus7
BUG=skia:2774

Review URL: https://codereview.chromium.org/1290223005
2015-08-18 13:08:36 -07:00
reed
4f0e04736c handle no shader from image in drawAtlas
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1298233003
2015-08-18 12:50:24 -07:00
bsalomon
f46c5e8fdb Remove Cmd in GrTargetCommands that is no longer needed with GrCopySurfaceBatch
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1292623004
2015-08-18 12:30:02 -07:00
mtklein
08f9234eaa Try again to put SkXfermode_opts in SK_OPTS_NS
Remember failed attempt https://codereview.chromium.org/1286093004/ ?  I think this one is simpler and safer and even technically legal C++.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1296183004
2015-08-18 12:23:28 -07:00
joshualitt
892b0c3db9 Add skeleton json support to visualbench
BUG=skia:

Review URL: https://codereview.chromium.org/1298213002
2015-08-18 12:13:34 -07:00
bsalomon
872062cab8 GrCopySurfaceBatch
Review URL: https://codereview.chromium.org/1289673004
2015-08-18 12:12:35 -07:00
wangyix
2a378433eb added emitChild() to GrGLFragmentProcessor; removed AutoFragmentChildProcAdvance class
BUG=skia:4182

Review URL: https://codereview.chromium.org/1301523003
2015-08-18 12:00:12 -07:00
senorblanco
f39c9b2ccf Add support for non-mappable vert buffers to tessellating path renderer.
Use malloc-ed memory and the updateData() call instead.

BUG=skia:4215

Review URL: https://codereview.chromium.org/1288683004
2015-08-18 11:46:28 -07:00
msarett
3011711d5d Revert of Update skia to test with libpng to 1.6.10 (patchset #3 id:60001 of https://codereview.chromium.org/1301523005/ )
Reason for revert:
DM is failing on gm tests on Android bots.  Cause is not yet clear.

Original issue's description:
> Update skia to test with libpng to 1.6.10
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/f272bb03df9b86e7ea2cf23fb4d5cc56624e0118

TBR=djsollen@google.com,scroggo@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1298223002
2015-08-18 11:36:44 -07:00
wangyix
b1daa86732 When getGLInstance is called on a frag proc, the resulting GrGLFragmentProcessor will be the root of a tree of GrGLFragmentProcessors that mirrors the GrFragmentProcessor's tree. This allows setData() to be called recursively (removing the responsibility from compose shader) and allows gl instances direct access to their children gl instances so they can emit their code.
BUG=skia:4182

Review URL: https://codereview.chromium.org/1287023009
2015-08-18 11:29:32 -07:00
reed
935d6cfaa7 Add subsets to SkImageGenerator and SkImageCacherator
... to support subsets in SkImage!

BUG=skia:

Review URL: https://codereview.chromium.org/1301633002
2015-08-18 11:16:09 -07:00
msarett
f272bb03df Update skia to test with libpng to 1.6.10
BUG=skia:

Review URL: https://codereview.chromium.org/1301523005
2015-08-18 10:46:01 -07:00
hcm
7b076c41a1 Add internal links section to skia.org
BUG=skia:4142
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=1284043004

Review URL: https://codereview.chromium.org/1284043004
2015-08-18 10:38:00 -07:00
bsalomon
5ea0363bf1 ClearStencilClip in GrBatch
Review URL: https://codereview.chromium.org/1288963004
2015-08-18 10:33:30 -07:00
joshualitt
2ad37be2b1 Move GrTBatchTesselator to its own file
BUG=skia:

Review URL: https://codereview.chromium.org/1298983002
2015-08-18 10:16:01 -07:00
mtklein
b2a327094f Update SkOpts namespaces.
portable -> default, and everyone gets an sk_ prefix.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1299013003
2015-08-18 10:00:29 -07:00
Brian Salomon
9dc2a9a972 Add missing overrides to clear and discard batch dumpInfo()
TBR=joshualitt@google.com

Review URL: https://codereview.chromium.org/1303533003
2015-08-18 12:46:51 -04:00
mtklein
2d141ba2df Patches on top of Radu's latest.
patch from issue 1273033005 at patchset 120001 (http://crrev.com/1273033005#ps120001)

BUG=skia:

Review URL: https://codereview.chromium.org/1288323004
2015-08-18 09:43:28 -07:00
bungeman
f05271581f Use portable code for family names with DirectWrite.
IDWriteFamily::GetFamilyNames appears to be 'helpful' and removes
parts of family names that look like style names. Since the iterator
is supposed to return the actual names and not just the name the
platform thinks the name is (as getFamilyName does), try returning
the raw names when possible.

BUG=skia:4217

Review URL: https://codereview.chromium.org/1302573002
2015-08-18 09:34:07 -07:00
bsalomon
5346983b2e Put clear and discard into GrBatch.
Review URL: https://codereview.chromium.org/1293563003
2015-08-18 09:20:09 -07:00
mtklein
d55d13af4f Update BUILD.public a bit.
- SSE2 files are unfortunately now mixed-case, _SSE2 or _sse2.
 - Adds lists for SSSE3 and SSE4 files.
 - Remove SkDocument_PDF_None.cpp
 - Remove a few more references to animator.
 - Exclude private headers from HDRS.
 - Formatting and notes.

BUG=skia:

Review URL: https://codereview.chromium.org/1298003007
2015-08-18 08:51:49 -07:00
halcanary
bf3dde2716 Clean up BUILD_simulator.py
Review URL: https://codereview.chromium.org/1298813002
2015-08-18 08:35:45 -07:00
mtklein
0c263fa9f8 Deduplicate typefaces across sub-pictures
Old flow to serialize a picture:
   1) serialize picture ops
   2) serialize all sub pictures recursively
   3) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   4) serialize the factories and typefaces
   5) serialize the bytes from 3)

This allows the data in step 5) to refer to the deduplicated factories and typefaces from step 4).  But, each sub picture in step 2) is completely siloed, so they can't dedup with the parent picture or each other.

New flow:
   1) serialize picture ops
   2) flatten the rest of this picture into a buffer, deduping flattenable factories and typefaces as we go
   3) dummy-serialize sub pictures into /dev/null, with the effect of adding any new typefaces to our dedup set
   4) serialize the factories and typefaces
   5) serialize the bytes from 2)
   6) serialize all sub pictures recursively, with perfect deduplication because of step 3).

Now all typefaces in the top-level picture and all sub pictures recursively should end up deduplicated in the top-level typeface set.

Decoding changes are similar: we just thread through the top-level typefaces to the sub pictures.  What's convenient / surprising is that this new code correctly reads old pictures if we just have each picture prefer its local typeface set over the top-level one: old pictures always just use their own typefaces, and new pictures always use the top-level ones.

BUG=skia:4092

Review URL: https://codereview.chromium.org/1233953004
2015-08-18 08:29:59 -07:00
msarett
a83593b88a Prefer native scaling to sampling
In the cases we have come across so far, native scaling has better performance
and correctness than sampling.  If native scaling is supported we want to use
it.

Jpegs native scale rounds up.
Ex: An 11x11 image with sampleSize=8 scales to 2x2.

SkScaledCodec rounds down.
Ex: An 11x11 image with sampleSize=8 scales to 1x1.

Before the CL, we would choose to use SkScaledCodec because it scales closer to
the "ideal" scale.

I think we want to go with the native option as long as its within 1 of the
ideal value.
BUG=skia:

Review URL: https://codereview.chromium.org/1284243004
2015-08-18 08:03:58 -07:00
jvanverth
0628a52b0c Regenerate LCD text blobs if GrPaint's color changes, not SkPaint.
The GrPaint's color takes into account shaders and color filters, so is a
more accurate picture of the color state.

BUG=chromium:511787

Review URL: https://codereview.chromium.org/1297053004
2015-08-18 07:44:22 -07:00
wangyix
54017d7e5b Made isEqual in GrFragmentProcessor recursive
Added comment about how computeInvariantOutput() is non-recursive in GrFragmentProcessor

Made isEqual() recursive in GrFragmentProcessor

BUG=skia:4182

Review URL: https://codereview.chromium.org/1287343005
2015-08-18 07:39:33 -07:00
joshualitt
cd47b71ac6 GrAAFillRectBatch holds onto GrPipelineOptimizations
BUG=skia:

Review URL: https://codereview.chromium.org/1301603004
2015-08-18 07:25:38 -07:00