Commit Graph

2097 Commits

Author SHA1 Message Date
bsalomon
1d89ddc4a3 Revert of Add GrResourceCache2. (patchset #4 of https://codereview.chromium.org/481443002/)
Reason for revert:
Likely caused a leak detected in Chromium after last Skia roll.

Original issue's description:
> Add GrResourceCache2.
>
> Currently it just replaces GrGpu as the owner of the linked list of resources.
>
> Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f

R=mtklein@google.com, robertphillips@google.com
TBR=mtklein@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/477323006
2014-08-19 14:20:58 -07:00
mtklein
a34633f358 Trim down OSX GYP rules. Same effect, shorter.
BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/486233003
2014-08-19 13:33:00 -07:00
bsalomon
94ce9ac862 Add GrResourceCache2.
Currently it just replaces GrGpu as the owner of the linked list of resources.

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

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/481443002
2014-08-19 08:21:25 -07:00
mtklein
3ba54fa0ad Roll jsoncpp, drop dependency on Chromium overrides.
This rolls jsoncpp to head, crucially past "Added missing includes for
std::istream." which has given us some grief in the past. And it's required to
build jsoncpp against libc++.

Vanilla jsoncpp works just fine for us, so no need for Chromium's overrides.
Like all DEPS, only tools depend on jsoncpp.

BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/481823003
2014-08-19 07:21:00 -07:00
halcanary
97d2c0a216 Move SkReadBuffer.h and SkReader32.h out of include.
Committed: https://skia.googlesource.com/skia/+/2a51d7c74cec217195f861677de8998b382b39e4

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

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/481053002
2014-08-19 06:27:53 -07:00
Mike Klein
27dc17c297 Revert "Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702."
This reverts commit 60c2a79cfa.

BUG=skia:

Review URL: https://codereview.chromium.org/481173003
2014-08-18 18:35:16 -04:00
tomhudson
60c2a79cfa Move the code over using the same template type approach previously used for willPlayBackBitmaps in http://skbug.com/2702.
Also unifies that flag and this one into a struct so they and others can be computed together. The struct is stored const to enforce lifetime expectations. Adds a few new cases to the unit test.

BUG=skia:2700
R=mtklein@google.com, reed@google.com, robertphillips@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/364823009
2014-08-18 15:07:13 -07:00
halcanary
f128f53a5b Revert "Move SkReadBuffer.h and SkReader32.h out of include."
This reverts commit 2a51d7c74c.

Breaking Blink

NOTRY=true
R=bungeman@google.com
TBR=bungeman@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/472303006
2014-08-18 13:48:13 -07:00
halcanary
2a51d7c74c Move SkReadBuffer.h and SkReader32.h out of include.
R=mtklein@google.com, reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/481053002
2014-08-18 13:04:59 -07:00
halcanary
ea4673fde6 SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
R=reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/465823003
2014-08-18 08:27:09 -07:00
dandov
7e5598a004 Added bench for grid of patches.
It is on top of my previous cl to fix the mem leaks of the regular patch bench.

NOTREECHECKS=true
BUG=skia:
R=egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/470543004
2014-08-15 13:30:47 -07:00
reed
cccb3b44e4 remove SkBitmap::Config support from android
NOTREECHECKS=True
NOTRY=True
R=djsollen@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/470933003
2014-08-15 10:13:35 -07:00
djsollen
3b6255493e Remove SkPaintOptionsAndroid
Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b

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

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/447873003
2014-08-14 06:29:03 -07:00
bsalomon
c15e28a522 Revert of Remove SkPaintOptionsAndroid (patchset #5 of https://codereview.chromium.org/447873003/)
Reason for revert:
Breaks the Chromium build: http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-DRT/builds/2469/steps/BuildContentShell_1/logs/stdio

Original issue's description:
> Remove SkPaintOptionsAndroid
>
> Committed: https://skia.googlesource.com/skia/+/f32331ffdb5de0440bb337aa7cbdd6f33e9ff23b

R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com
TBR=djsollen@google.com, mtklein@google.com, reed@google.com, tomhudson@google.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/473543004
2014-08-13 15:18:46 -07:00
djsollen
f32331ffdb Remove SkPaintOptionsAndroid
R=reed@google.com, mtklein@google.com, tomhudson@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/447873003
2014-08-13 13:09:49 -07:00
tomhudson
c773390eef Delete the old font management implementation based on SkFontConfigInterface, now that SkFontMgr_Android is live.
BUG=chromium:400801
R=djsollen@google.com, bungeman@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/445143002
2014-08-13 10:41:25 -07:00
stephana
21b342d19c This eliminates the need to copy the generated images from a temporary directory to the directory that is served by the rebaseline_server.
BUG=skia:2815, skia:2818
R=epoger@google.com

Author: stephana@google.com

Review URL: https://codereview.chromium.org/457203003
2014-08-13 10:36:06 -07:00
dandov
cc03adb909 Proposal for the mesh gradient interface. Implemented as a grid of
patches and uses 4 private arrays to store the values of the control points and
colors. When it needs a patch at a certain position of the grid it just
builds it using the corresponding values of the array and the
grid coordinates provided. Details on implementation are documented in the corresponding classes' comments.

Also added a gm for mesh gradients.

BUG=skia:
R=egdaniel@google.com, reed@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/451723003
2014-08-12 17:14:57 -07:00
tomhudson
8e69676bf5 Turn on FontMgr for Android
Minimal change for activating the SkFontMgr on Android, broken out
of http://crrev.com/445143002/.

BUG=chromium:400801
R=bungeman@google.com, djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/462073002
2014-08-12 10:55:09 -07:00
halcanary
78ee93f545 Revert of SkImage::NewFromGenerator(SkImageGenerator*), and a unit test. (https://codereview.chromium.org/465823003/)
Reason for revert:
Mac bots are failing

Original issue's description:
> SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
>
> Committed: https://skia.googlesource.com/skia/+/186f7b04956a1742f185a4ca69b44b52bc50e7fc

R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/453723003
2014-08-12 09:07:08 -07:00
dandov
b3c9d1c33c SkCanvas::drawPatch param SkPoint[12]
drawPatch now receives as parameter const SkPoint cubics[12]

Adjusted derived classes and serialization.

Ajusted GM's and benches that take into account combinations of optional
parameters, the scale of the patch and 4 different types of patches.

Planning on adding the extra functionality of SkPatch in another CL.

BUG=skia:
R=egdaniel@google.com, reed@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/463493002
2014-08-12 08:34:29 -07:00
halcanary
186f7b0495 SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
R=reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/465823003
2014-08-12 08:04:58 -07:00
krajcevski
9c6d4d744a Change GR_COMPRESS_ALPHA_MASK from compile-time flag to run-time. We do this by introducing an Options struct to be passed to a GrContext on creation.
R=robertphillips@google.com, bsalomon@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/459033002
2014-08-12 07:26:26 -07:00
halcanary
b2edec2c39 Revert of SkImage_Codec is Lazy (https://codereview.chromium.org/460823002/)
Reason for revert:
breaks chromium - no SkDecodingImageGenerator::Create

Original issue's description:
> SkImage_Codec is Lazy
>
> Committed: https://skia.googlesource.com/skia/+/e36f499110da8c2e2aa05227bee6deb967309ead

R=reed@google.com
TBR=reed@google.com
NOTREECHECKS=true
NOTRY=true

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/461043002
2014-08-12 06:53:28 -07:00
reed
d7127e7b83 re-add samplerstress gm, but use blurmaskfilter instead (std filter)
BUG=skia:
R=robertphillips@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/468483002
2014-08-12 06:53:09 -07:00
halcanary
e36f499110 SkImage_Codec is Lazy
R=reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/460823002
2014-08-12 06:37:21 -07:00
reed
5b1b2dbe76 remove SkStippleMaskFilter - no external clients
TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/462013002
2014-08-12 05:50:10 -07:00
cdalton
c7103a104f Wrap NV_path_rendering API with GrGLPathRendering
Adds a GrGLPathRendering class that wraps the NV_path_rendering
extension and manages its various API versions. It also provides
backup implementations when certain NVpr methods from later API
versions are not present on the current system.

BUG=skia:
R=bungeman@google.com, bsalomon@google.com, kkinnunen@nvidia.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/444223002
2014-08-11 14:05:05 -07:00
joshualitt
5acfea789d 2D kernel initial wiring for Guassian
BUG=skia:
R=senorblanco@chromium.org, bsalomon@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/418223009
2014-08-11 13:55:34 -07:00
halcanary
8b2cb3391d clean up render_pdfs:
Remove unused headers
     replace dynamic memory wstream with null wstream.
     Use SkAutoTDelete when appropriate.
     Replace PdfRenderer class with short function: pdf_to_stream.
     Collapse render_pdf, process_input, tool_main_core functions
     Split out process_input_files function.
     Don't crash when no arguments given.
     print out max rss on each skp.
     prettier output

R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/463603002
2014-08-11 13:08:27 -07:00
halcanary
0d154eeaeb Process Statistics header, add max RSS to render_pdfs
Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1

R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/448993003
2014-08-11 11:33:51 -07:00
robertphillips
6b143b0808 Remove Matrix/Clip State collapse code
Given recent & upcoming changes (e.g., removal of save flags & SkRecord picture backend) this will have to be reimplemented.

R=fmalita@google.com, fmalita@chromium.org

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/453133003
2014-08-11 06:03:42 -07:00
reed
d5fa1a455a add drawPicture variant that takes a matrix and paint
will need some staging strategy, since chrome and blink have overrides of onDrawPicture

R=robertphillips@google.com, fmalita@google.com, bsalomon@google.com, mtklein@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/448793004
2014-08-09 11:08:05 -07:00
humper
d1d3baeb98 add an animated test to verify that high-quality identity scaling doesn't change the image
BUG=skia:
R=reed@google.com

Author: humper@google.com

Review URL: https://codereview.chromium.org/454913002
2014-08-08 12:11:33 -07:00
hendrikw
afdada2eab Moved SkPictureContentInfo into its own file. It now tracks the number of skia
operations (maybe, I'm not 100% sure I'm doing this right yet)  and the number
of text draws.  I also moved some of the gpu logic out of SkPictureRecord and
into SkPictureContentInfo,

http://code.google.com/p/chromium/issues/detail?id=396908
http://code.google.com/p/chromium/issues/detail?id=397198
http://code.google.com/p/chromium/issues/detail?id=399728

BUG=396908
R=nduca@chromium.org, mtklein@chromium.org, robertphillips@google.com, mtklein@google.com

Author: hendrikw@chromium.org

Review URL: https://codereview.chromium.org/435093003
2014-08-08 10:44:33 -07:00
joshualitt
bab82ed05b Pretty print of shaders
BUG=skia:
R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/437593004
2014-08-08 09:41:42 -07:00
mtklein
72ebb9f1dc DM: conserve memory when using --skps
- limit to maximum 1000x1000 viewport like in bench_pictures and nanobench
 - use lazy bitmap decoding when reading the pictures from disk

BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/448263002
2014-08-07 14:27:03 -07:00
bungeman
619e07656d Revert of Process Statistics header, add max RSS to render_pdfs (https://codereview.chromium.org/448993003/)
Reason for revert:
Reverting due to breaking iOS bots.

Original issue's description:
> Process Statistics header, add max RSS to render_pdfs
>
> Committed: https://skia.googlesource.com/skia/+/6274baae7fe82ce6481da367687aa6168356e1e1

R=mtklein@google.com, halcanary@google.com
TBR=halcanary@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/448243003
2014-08-07 13:27:18 -07:00
halcanary
6274baae7f Process Statistics header, add max RSS to render_pdfs
R=mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/448993003
2014-08-07 13:13:54 -07:00
krajcevski
95b1b3d82d Add astcbitmap to gm slides.
Add additional ASTC formats.
Add astc image decoder files.

R=reed@google.com, robertphillips@google.com, halcanary@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/444093002
2014-08-07 12:58:38 -07:00
krajcevski
7b62448065 Revert of - Add astcbitmap to gm slides (https://codereview.chromium.org/444093002/)
Reason for revert:
Breaking DM

Original issue's description:
> - Add astcbitmap to gm slides
> - Add additional ASTC formats
> - Add astc image decoder files
>
> Committed: https://skia.googlesource.com/skia/+/2fc05823fed4b9649338f3029cd1ba05ef49a02f

R=reed@google.com, robertphillips@google.com, halcanary@google.com
TBR=halcanary@google.com, reed@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/447343002
2014-08-07 11:33:59 -07:00
krajcevski
2fc05823fe - Add astcbitmap to gm slides
- Add additional ASTC formats
- Add astc image decoder files

R=reed@google.com, robertphillips@google.com, halcanary@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/444093002
2014-08-07 11:18:09 -07:00
krajcevski
b8ccc2f6d2 Pass compressed blitters to our mask drawing algorithm
R=robertphillips@google.com, reed@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/446103002
2014-08-07 08:15:14 -07:00
halcanary
0bef17a678 render_pdfs implements --match
BUG=skia:2743
NOTRY=true
R=djsollen@google.com, mtklein@google.com, borenet@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/441423002
2014-08-07 07:24:48 -07:00
Derek Sollenberger
da7a944e29 Revert "Remove SkPaintOptionsAndroid"
This reverts commit 27fb94999b.

Review URL: https://codereview.chromium.org/450513002
2014-08-06 16:34:40 -04:00
Derek Sollenberger
27fb94999b Remove SkPaintOptionsAndroid
Review URL: https://codereview.chromium.org/447873003
2014-08-06 16:30:51 -04:00
fmalita
b5f7826c51 Explicit tile bounds for SkPictureShader
The integer picture size is not granular enough to allow precise tiling
in arbitrary coordinate systems. This CL adds an optional tile bounds
float rect param to control the tile size and location.

(this also allows tile spacing emulation for picture
shaders).

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

Author: fmalita@chromium.org

Review URL: https://codereview.chromium.org/437393003
2014-08-06 13:07:15 -07:00
mtklein
a7e930f640 On the bots, there's no need to link GMs into SampleApp.
We build SampleApp on the bots to make sure it's not broken, but we don't run it.  So, there's no need to link in all the GMs as samples.

This reduces the number of copies of our GMs from 4 to 3 (gm, dm, and nanobench remain).

NOTREECHECKS=true

BUG=skia:2142
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/447803002
2014-08-06 10:08:42 -07:00
mtklein
be21e3432e Bye bye bench.
NOTREECHECKS=true

BUG=skia:
R=djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/442343004
2014-08-06 08:39:38 -07:00
bungeman
760ba8d392 Revert "Adds a GrGLPathRendering class that wraps the NV_path_rendering"
This reverts commit 5672da0fa5.

This appears to be blocking the Skia roll by causing failures in the blink layout tests on the canvas-lost-gpu-context.html test.

The bisect for this can be seen at:

https://codereview.chromium.org/449473002/

Original issue's description:
> Adds a GrGLPathRendering class that wraps the NV_path_rendering
> extension and manages its various API versions. It also provides
> backup implementations when certain NVpr methods from later API
> versions are not present on the current system.
>
> Committed: https://skia.googlesource.com/skia/+/5672da0fa54f31c9727568e9dd5fe82c6e1585bc
2014-08-06 11:15:50 -04:00
djsollen
1b27704eba Remove ALL font fallback logic from Skia.
R=reed@google.com, bungeman@google.com, caryclark@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/434623002
2014-08-06 06:58:06 -07:00
mtklein
847092c88b SkThreadPool and co. are not public.
BUG=skia:
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/444583006
2014-08-06 06:55:12 -07:00
krajcevski
40a1e11ebe Add support for all compressed formats in KTX file format
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/440783004
2014-08-05 14:13:36 -07:00
tomhudson
816b4fb97c Fix bad gypi
Must not depend directly on ports; depend on skialib!

R=bungeman@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/442883002
2014-08-05 12:01:09 -07:00
krajcevski
e90c900ed7 Add ETC1 format to SkTextureCompressor
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/432143002
2014-08-05 07:37:27 -07:00
tomhudson
f79673bbae Test and generalize font configuration parser
Add a basic unit test for the Android font configuration parser.
Add a check for the new LMP file format; on detection, switch to a new
(as-yet unwritten) parser.

R=bungeman@google.com, djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/439813002
2014-08-05 06:36:14 -07:00
mtklein
8f394d4791 disable all warnings from nanomsg
They're annoying.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/437323002
2014-08-04 13:11:19 -07:00
mtklein
ad82ed67df Force linking as C++ library.
BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/420183004
2014-08-04 12:51:20 -07:00
cdalton
5672da0fa5 Adds a GrGLPathRendering class that wraps the NV_path_rendering
extension and manages its various API versions. It also provides
backup implementations when certain NVpr methods from later API
versions are not present on the current system.

R=bsalomon@google.com, kkinnunen@nvidia.com, markkilgard@gmail.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/437473002
2014-08-04 11:19:11 -07:00
mtklein
bce540ca8f Don't call out -lstdc++ -lm explicitly.
BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/440643004
2014-08-04 11:10:16 -07:00
dandov
ecfff21bde SkCanvas interface for drawing a patch.
Added function SkCanvas::drawPatch to the API. This function
receives the patch to draw and the paint.

Added function SkBaseDevice::drawPatch to the API. This function also receives the patch to draw and the paint.

Currently SkGpuDevice and SkBitmapDevice generate the mesh taking into
account the scale factor and call the corresponding device's drawVertices.

BUG=skia:
R=jvanverth@google.com, egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/424663006
2014-08-04 10:02:00 -07:00
krajcevski
50495571df Revert of Add ETC1 format to SkTextureCompressor (https://codereview.chromium.org/432143002/)
Reason for revert:
Breaking Chrome.

Original issue's description:
> Add ETC1 format to SkTextureCompressor
>
> Committed: https://skia.googlesource.com/skia/+/5d8b1b44ea7636fc8e98247cb311568f277ce3a5

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

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/438443004
2014-08-04 09:47:32 -07:00
mtklein
80bddedbb1 small skia_shared_lib=1 build fix for cross-process picture demo
BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/439333002
2014-08-04 09:36:45 -07:00
mtklein
e7ce26d360 Stop building tests.
BUG=skia:
R=borenet@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/423073011
2014-08-04 09:36:16 -07:00
krajcevski
5d8b1b44ea Add ETC1 format to SkTextureCompressor
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/432143002
2014-08-04 09:08:29 -07:00
halcanary
f91b47ff9e Revert of Memory improvements to render_pdfs; better DM pool size defaults (https://codereview.chromium.org/433063002/)
Reason for revert:
breaking android tests

Original issue's description:
> Memory improvements to render_pdfs; better DM pool size defaults
>
> Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to
> skia_resource_cache_mb_limit, if that value is >0 (true for some
> low-memory Android devices).
>
> render_pdfs test program uses lazy decoding (and the discardable
> memory pool).
>
> BUG=skia:2743
>
> Committed: https://skia.googlesource.com/skia/+/66058b614d9c8cb63c24b1c779dd1a9a80752217

R=djsollen@google.com, mtklein@google.com
TBR=djsollen@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2743

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/418173012
2014-08-01 11:54:48 -07:00
halcanary
66058b614d Memory improvements to render_pdfs; better DM pool size defaults
Make SK_DEFAULT_GLOBAL_DISCARDABLE_MEMORY_POOL_SIZE equal to
skia_resource_cache_mb_limit, if that value is >0 (true for some
low-memory Android devices).

render_pdfs test program uses lazy decoding (and the discardable
memory pool).

BUG=skia:2743
R=djsollen@google.com, mtklein@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/433063002
2014-08-01 09:25:11 -07:00
mtklein
92007583e4 SKPs-as-benches in nanobench
This is meant to replace bench_pictures.

CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Release-iOS-Trybot

BUG=skia:
R=bsalomon@google.com, jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/425393004
2014-08-01 07:46:53 -07:00
djsollen
21769c5249 Update NEON compiler defines to use SK_ prefix
BUG=skia:2785
R=mtklein@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/433513004
2014-08-01 05:32:32 -07:00
mtklein
2f4a69d377 Clean up skia_directwrite GYP variable.
BUG=skia:
R=bungeman@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/435553004
2014-07-31 15:31:08 -07:00
mtklein
e30b52ac7a Add missing source file for iOSShell.
CQ_EXTRA_TRYBOTS=tryserver.skia:Build-Mac10.7-Clang-Arm7-Release-iOS-Trybot

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/430273003
2014-07-31 12:47:40 -07:00
mtklein
e714e75c72 nanobench: support GMs-as-benches
BUG=skia:
R=jcgregorio@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/438683002
2014-07-31 12:13:48 -07:00
mtklein
e681c2a506 DM: only depend on GpuTest when it's a GPU build.
This seems to fix DM dynamic linking errors on IntelRHB.

Not clear why this device is the only one with this problem.  It does set
skia_gpu=0, but I can't reproduce the same failure on my desktop (skia_gpu=0,
skia_shared_lib=1, skia_arch_width=32).

BUG=skia:
R=bsalomon@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/435673002
2014-07-31 11:26:59 -07:00
mtklein
ada972df35 sk_tool_utils_flags.cpp depends on GetResourcePath
BUG=skia:
R=caryclark@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/432033002
2014-07-31 08:31:56 -07:00
Cary Clark
992c7b03ef Add standard fonts to all GMs.
Allow GM results to be compared across machines and platforms by
standardizing the fonts used by all tests.

This adds runtime flags to DM to use either the system font context (the
default), the fonts in the resources directory ( --resourceFonts ) or a set
of canonical paths generated from the fonts ( --portableFonts ).

This CL should leave the current DM results unchanged by default.

If the portable font data or resource font is missing when DM is run, it
falls back to using the system font context.

The create_test_font tool generates the paths and metrics read by DM
with the --portableFonts flag set, and generates the font substitution
tables read by DM with the --resourceFonts flag set.

If DM is run in SkDebug mode with the --reportUsedChars flag set, it
generates the corresponding data compiled into the create_test_font tool.

All GM tests set their typeface information by calling either

  sk_tool_utils::set_portable_typeface or
  sk_tool_utils::portable_typeface .

(The former takes the paint, the latter returns a SkTypeface.) These calls
can be removed in the future when the Font Manager can be superceded.

BUG=skia:2687
R=mtklein@google.com

Review URL: https://codereview.chromium.org/407183003
2014-07-31 08:58:44 -04:00
bsalomon
3342ed55e1 Add rotated rects benchmarks
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/425263003
2014-07-30 08:58:20 -07:00
kkinnunen
7510b224e5 Rename GrGLUniformManager to GrGLProgramDataManager
Rename GrGLUniformManager to GrGLProgramDataManager in anticipation that the
class would be used to manage shader resources that are not uniforms.

This is needed in order to implement NVPR on GLES.

R=bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/365853002
2014-07-30 00:04:16 -07:00
robertphillips
8ab8cc07cf Finish removing GrTHashTable
This class is no longer used in Ganesh (in favor of SkTDynamicHash)

R=jvanverth@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/421253003
2014-07-29 06:17:49 -07:00
krajcevski
d5e46c7893 Generalize compressed blitter into its own templated class
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/421593004
2014-07-28 14:14:16 -07:00
bsalomon
4beef91ec0 Revert of Remove relative path to GrColor.h in SkShader.h (https://codereview.chromium.org/422023005/)
Reason for revert:
As Ben suspected, this breaks the chrome build.

Original issue's description:
> Remove relative path to GrColor.h in SkShader.h
>
> Committed: https://skia.googlesource.com/skia/+/939f430f660d26e46116a38d2a8436afbd55dfb9

R=bungeman@google.com, george@mozilla.com
TBR=bungeman@google.com, george@mozilla.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/423943005
2014-07-28 13:43:04 -07:00
bsalomon
939f430f66 Remove relative path to GrColor.h in SkShader.h
R=bungeman@google.com, george@mozilla.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/422023005
2014-07-28 13:27:35 -07:00
cdalton
b2808cd041 Send less transform data when drawing text with nvpr
Before this change, GrStencilAndCoverTextContext would send 6-float
affine transforms to drawPaths for every glyph. This updates it to
concat the text scale onto the context matrix, and then only send
2-float translates (or 1-float x-translates when possible).

Also adds a glyph_pos_align test to gm that exercises the newly added
codepaths, and starts ignoring a few gm tests with benign pixel diffs
until we can rebaseline.

BUG=skia:
R=bsalomon@google.com, kkinnunen@nvidia.com, jvanverth@google.com, bungeman@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/406523003
2014-07-25 14:13:57 -07:00
dandov
50d715476b Added classes SkPatch and SkPatchMesh which help encapsulate and generalize this new primitive. The functionality and responsability of each class is better explained in the comments of the files.
Each patch defines a method genMesh that produces the geometry to draw. To do this they receive a SkPatchMesh object which they need to initialize in order to set up how the data is going to be formatted. Later they call function like setColor or pointAt to set the values at a specific index, the SkMeshPatch object handles the indices based on the format and makes it transparent to the client.

Added a slide to sample app to show how to set up this classes and how they interact.

BUG=skia:
R=jvanverth@google.com, egdaniel@google.com, bsalomon@google.com

Author: dandov@google.com

Review URL: https://codereview.chromium.org/405163003
2014-07-25 10:44:54 -07:00
bsalomon
6d3fe022d6 Rename GrGpuObject to GrGpuResource
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/418143004
2014-07-25 08:35:45 -07:00
krajcevski
b2ef181ed6 Add preliminary ASTC encoder
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/417933005
2014-07-25 07:33:01 -07:00
bsalomon
c44be0e9e4 Merge GrGpuObject and GrCacheable.
We want to create a new base class for "meta" gr resources as part of the GrResourceCache rewrite and this is an iterim step towards that goal.s

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/414013005
2014-07-25 07:32:33 -07:00
djsollen
bc89329fb5 Enable the SSSE3 compile time check on all platforms (4th attempt)
BUG=skia:2746
R=bungeman@google.com, robertphillips@google.com, mtklein@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/414033002
2014-07-24 13:53:56 -07:00
bungeman
8d84c99531 SkFontMgr for Android.
Committed: https://skia.googlesource.com/skia/+/4f9a01e03ef3bbe7dd8f9bebdcb3555226087e06

R=djsollen@google.com, tomhudson@google.com, robertphillips@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/414483002
2014-07-24 08:05:10 -07:00
bungeman
2da0f85488 Revert of Enable the SSSE3 compile time check on all platforms. (https://codereview.chromium.org/403583002/)
Reason for revert:
This is blocking the roll. Chromium Windows trybots (like win_chromium_x64_rel) are crashing in the SSSE3 code (for example SkCanvasVideoRenderTest.CroppedFrame).

Original issue's description:
> Enable the SSSE3 compile time check on all platforms (3rd attempt)
>
> BUG=skia:2746
>
> Committed: https://skia.googlesource.com/skia/+/933834851f9d48fbd85b728cc92e1f0134bfaa4e

R=halcanary@google.com, mtklein@google.com, djsollen@google.com
TBR=djsollen@google.com, halcanary@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2746

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/418523002
2014-07-23 11:28:18 -07:00
robertphillips
7b82d0f8e6 Revert of SkFontMgr for Android. (https://codereview.chromium.org/414483002/)
Reason for revert:
Reverting to unblock DEPS roll.

Original issue's description:
> SkFontMgr for Android.
>
> Committed: https://skia.googlesource.com/skia/+/4f9a01e03ef3bbe7dd8f9bebdcb3555226087e06

R=djsollen@google.com, tomhudson@google.com, bungeman@google.com
TBR=bungeman@google.com, djsollen@google.com, tomhudson@google.com
NOTREECHECKS=true
NOTRY=true

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/408143010
2014-07-22 16:36:13 -07:00
djsollen
85d36525c6 fix android_framework build do to missing library at link time
R=scroggo@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/407073006
2014-07-22 13:56:34 -07:00
scroggo
24519371cb Run CanvasState test across a library boundary.
Refactor CanvasStateTest to pull out functions which can
either be called directly or from a shared library. Add a
command line flag to pass in the path to a library to open
to call those functions from.

Separate different CanvasTest tests into separate DEF_TEST
tests. This allows them to be run in parallel.

Move the ifdefs outside of function declarations to skip
running CanvasTest tests which do nothing.

Add the canvas_state_lib target. It is a shared library that
exports some functions to be called by another version of
Skia.

BUG=b/15693384
R=djsollen@google.com, reed@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/400043003
2014-07-22 12:38:55 -07:00
scroggo
c0bc913451 Introduce skia_pic gyp variable.
skia_pic tells ninja to use -fPIC when building for position
independent code.

Set skia_pic to true when building our existing targets that
require position independent code.

Also use skia_pic when building for Android.

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

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/406613003
2014-07-22 12:09:30 -07:00
bungeman
4f9a01e03e SkFontMgr for Android.
R=djsollen@google.com, tomhudson@google.com

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/414483002
2014-07-22 12:07:14 -07:00
caryclark
17f0b6df72 share dm and command flags
Share command flags between dm and unit tests.
Also, allow dm's core to be included by itself and iOSShell.

Command line flags that are the same (or nearly the same) in DM
and in skia_tests have been moved to common_flags. Authors,
please check to see that the shared common flag is correct for
the tool.

For iOS, the 'tool_main' entry point has a wrapper to allow multiple
tools to be statically linked in the iOSShell.
Since SkCommandLineFlags::Parse can only be called once, these calls
are disabled in the IOS build.

Since the iOS app directory is dynamically assigned a name, use '@' to
select it. (This is the same convention chosen by the Mobile Harness
iOS file system utilities.)

Move the heart of dm.gyp into dm.gypi so that it can be included by
itself and iOSShell.gyp.

Add tools/flags/SkCommonFlags.* to define and declare common
command line flags.

Add support for dm to iOSShell.

BUG=skia:
R=scroggo@google.com, mtklein@google.com, jvanverth@google.com, bsalomon@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/389653004
2014-07-22 10:15:35 -07:00
joshualitt
ac9779234e Initial change to move 2D kernel to its own file.
BUG=skia:
R=bsalomon@chromium.org, senorblanco@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/379253003
2014-07-22 09:52:12 -07:00
krajcevski
6c354881b6 Refactor texture compressors into separate files
R=robertphillips@google.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/403383003
2014-07-22 07:44:01 -07:00
djsollen
933834851f Enable the SSSE3 compile time check on all platforms (3rd attempt)
BUG=skia:2746
R=halcanary@google.com, mtklein@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/403583002
2014-07-22 07:20:18 -07:00
cdalton
b85a0aab69 Add a GrPathRange class
Adds a GrPathRange object that represents a range of paths on the gpu.
Updates GrDrawTarget::drawPaths and supporting code to use GrPathRange
instead of an array of GrPath objects.

Change-Id: I67845f3893cd4d955db947d699aa3733cbb081e0

BUG=skia:
R=bsalomon@google.com, jvanverth@google.com, kkinnunen@nvidia.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/400713003
2014-07-21 15:32:44 -07:00
sugoi
518d83dbc1 Skia side RGB to YUV gpu conversion
This code is the one that's currently working in my local chromium build. A few things still need to be addressed and I'll highlight these directly in the code.

BUG=skia:
R=reed@google.com, bsalomon@google.com, senorblanco@google.com, senorblanco@chromium.org, robertphillips@google.com, scroggo@google.com, halcanary@google.com

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/374743003
2014-07-21 11:37:39 -07:00
egdaniel
02cafcc1bf Remove gpu shader optimatization for solid white or trans black colors
Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.

With optimization in (ms):
         White       Blue        Checkered
Linux    ~80         ~80         ~160
N7       ~800        ~1100       ~1500
Moto-e   ~830        ~1100       ~2500

Without optimization in (ms):
         White       Blue        Checkered
Linux    ~80         ~80         ~80
N7       ~1100       ~1100       ~1100
Moto-e   ~1100       ~1100       ~1500

BUG=skia:

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

R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/375823005
2014-07-21 11:37:28 -07:00
caryclark
f568f6a557 git sample app working on iOS
R=jvanverth@google.com

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/405653002
2014-07-18 10:58:56 -07:00
caryclark
19eb3b2f0a update pathops core and tests
split out skpclip (the test of 1M pictures) into its own project

TBR=reed

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/400033002
2014-07-18 05:08:14 -07:00
scroggo
3eb258d3f6 Generate makefile for bench_pictures.
When generating Android framework makefiles, create one for
bench_pictures.

BUG=skia:2744
R=djsollen@google.com, halcanary@google.com, mtklein@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/391423002
2014-07-17 06:58:29 -07:00
halcanary
805ef159d1 Set maximum output size for scaled-image-cache images
Accessable via:
  SkScaledImageCache::{G,S}etMaximumOutputSizeForHighQualityFilter

Also, a unit test.

BUG=389439
R=humper@google.com, tomhudson@google.com, reveman@chromium.org, vangelis@chromium.org, reed@google.com

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/394003003
2014-07-17 06:58:01 -07:00
mtklein
103ae71cdd Remove benches from DM.
This idea turned out to be more redundant than useful.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/399463003
2014-07-16 14:29:53 -07:00
joshualitt
ee5da55477 32 bpp floating point textures
This is VERY preliminary, but it was sufficient for me to get 32 bit floating point textures in a sample app

BUG=skia:
R=bsalomon@chromium.org, bsalomon@google.com

Author: joshualitt@chromium.org

Review URL: https://codereview.chromium.org/359803003
2014-07-16 13:32:56 -07:00
robertphillips
b6638bddcd Chromium no longer needs the SkPicture default constructor
With the landing of the Chromium CL (Remove use of default SkPicture constructor - https://codereview.chromium.org/387343003/) Chromium should no longer require the SK_SUPPORT_LEGACY_DEFAULT_PICTURE_CTOR flag.

R=halcanary@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/398463002
2014-07-16 13:21:21 -07:00
Derek Sollenberger
eccbfec18a Fix broken android framework builds where 32-bit MIPS compilers lack 64-bit __sync operators.
R=mtklein@google.com, reed@google.com, scroggo@google.com

Review URL: https://codereview.chromium.org/398153002
2014-07-16 15:51:39 -04:00
Derek Sollenberger
122f9ecef8 Remove outdated compiler restrictions.
R=scroggo@google.com

Review URL: https://codereview.chromium.org/394263002
2014-07-16 15:20:01 -04:00
Mike Klein
720c66b818 Reexport skia_gdi.
BUG=skia:

Review URL: https://codereview.chromium.org/398043004
2014-07-16 13:26:19 -04:00
Mike Klein
20f340379c Put skia_directwrite back for now.
BUG=skia:

Review URL: https://codereview.chromium.org/397073002
2014-07-16 13:11:50 -04:00
Mike Klein
9358706750 skia_directwrite -> skia_gdi
This will require lots of rebaselines and a bot CL to swap our lone direct write bot to a lone GDI bot.

BUG=skia:
R=bungeman@google.com

Review URL: https://codereview.chromium.org/394223003
2014-07-16 13:06:04 -04:00
bungeman
c7af812b42 Revert of Reopened: Caching the result of readPixelsSupported (https://codereview.chromium.org/364193004/)
Reason for revert:
This appears to be causing failures on Android when running tests.

Original issue's description:
> Caching the result of readPixelsSupported
>
> The call was calling GR_GL_GetIntegerv 2 times for each readPixels
> and thus was causing a loss of performance
>
> (resubmit of issue 344793008)
>
> Benchmark url: http://packages.gkny.fr/tst/index.html
>
> BUG=skia:2681
>
> Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c
>
> Committed: https://skia.googlesource.com/skia/+/8339371f1ec3c57a0741932fd96bff32c53d4e54

R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, mtklein@google.com, bsalomon@google.com, piotaixr@chromium.org
TBR=bsalomon@chromium.org, bsalomon@google.com, junov@chromium.org, mtklein@google.com, piotaixr@chromium.org, reed@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:2681

Author: bungeman@google.com

Review URL: https://codereview.chromium.org/395203002
2014-07-16 09:10:41 -07:00
piotaixr
8339371f1e Caching the result of readPixelsSupported
The call was calling GR_GL_GetIntegerv 2 times for each readPixels
and thus was causing a loss of performance

(resubmit of issue 344793008)

Benchmark url: http://packages.gkny.fr/tst/index.html

BUG=skia:2681

Committed: https://skia.googlesource.com/skia/+/753a2964afe5661ce9b2a8ca77ca9d0aabd3173c

R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, mtklein@google.com, bsalomon@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/364193004
2014-07-15 19:41:08 -07:00
Mike Klein
7edaeb515c nanobench on Windows: try compiler barriers around timer instead.
BUG=skia:

Review URL: https://codereview.chromium.org/391193003
2014-07-15 19:04:14 -04:00
Mike Klein
f7e51ea79e Disable LTCG for nanobench.
NOTREECHECKS=true

BUG=skia:
R=mtklein@google.com

Review URL: https://codereview.chromium.org/393953006
2014-07-15 18:39:49 -04:00
tfarina
6599258a99 Cleanup: Remove unused/unimplemented SkTextLayout.h.
Nobody uses it in Skia, Chromium and Blink. And it does not have any
implementation either.

BUG=None
TEST=make all
R=mtklein@google.com, reed@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/385323002
2014-07-14 12:32:47 -07:00
krajcevski
630598cbb8 Add support for NEON intrinsics to speed up texture compression. We can
now convert the time that we would have spent uploading the texture to
compressing it giving a net 50% memory savings for these things.

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

R=robertphillips@google.com, mtklein@google.com, kevin.petit@arm.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/390453002
2014-07-14 12:00:04 -07:00
mtklein
60317d0ffb nanobench: support --outResultsFile
BUG=skia:
R=kelvinly@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/390933002
2014-07-14 11:30:37 -07:00
halcanary
9c6878be37 Revert of Enable the SSSE3 compile time check on all platforms. (https://codereview.chromium.org/391693004/)
Reason for revert:
windows fail

Original issue's description:
> Enable the SSSE3 compile time check on all platforms.
>
> BUG=skia:2746
>
> Committed: https://skia.googlesource.com/skia/+/ee349531446ae2a8336b0903e05d0b2150d2131f

R=mtklein@google.com, djsollen@google.com
TBR=djsollen@google.com, mtklein@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2746

Author: halcanary@google.com

Review URL: https://codereview.chromium.org/390063002
2014-07-14 08:32:18 -07:00
djsollen
ee34953144 Enable the SSSE3 compile time check on all platforms.
BUG=skia:2746
R=mtklein@google.com

Author: djsollen@google.com

Review URL: https://codereview.chromium.org/391693004
2014-07-14 07:58:42 -07:00
scroggo
55d316eaba Remove last SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX.
Should have been included in https://codereview.chromium.org/379323002
but it was overlooked. As of that CL, the flag does not do anything.

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

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/390033002
2014-07-14 07:58:34 -07:00
djordje.pesut
6336f7c225 MIPS: added optimization for SkRGB16_Opaque_Blitter::blitMask
gaint is ~30%

R=djsollen@google.com

Author: djordje.pesut@imgtec.com

Review URL: https://codereview.chromium.org/357693002
2014-07-14 07:48:11 -07:00
piotaixr
cef04f8188 Deleted SkImage::newShaderClamp: not used, not implemented.
Implemented SkImage::newShader.

BUG=skia:2701, 344804
R=junov@chromium.org, reed@chromium.org, bsalomon@chromium.org, reed@google.com

Author: piotaixr@chromium.org

Review URL: https://codereview.chromium.org/345463009
2014-07-14 07:48:04 -07:00
Robert Phillips
4fdba1cec4 Reallow default SkPicture constructor for Chromium
This is breaking the Chromium build in:
external/chromium_org/android_webview/browser/browser_view_renderer.cc

TBR=reed@google.com

Review URL: https://codereview.chromium.org/392593002
2014-07-14 09:28:15 -04:00
Robert Phillips
cfaeec446d Remove Skia's use of the default SkPicture constructor and multi-clone
This cannot be landed until (Chrome: Switch to one-at-a-time SkPicture::clone interface - https://codereview.chromium.org/380323002/) has landed.

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

Review URL: https://codereview.chromium.org/388833003
2014-07-13 12:00:50 -04:00
jvanverth
733f5f5dbc Refactor SkGrFontScaler and SkGrFontKey into non-virtual versions.
This is a pre-cleanup for another change, but has the side benefit of making
the code simpler in general.

No perf increase, despite removing virtual functions.

R=bsalomon@google.com, egdaniel@google.com

Author: jvanverth@google.com

Review URL: https://codereview.chromium.org/385263002
2014-07-11 19:45:16 -07:00
krajcevski
d41dab43e6 Revert of Add support for NEON intrinsics to speed up texture compression. We can (https://codereview.chromium.org/390453002/)
Reason for revert:
Breaking chrome.

Original issue's description:
> Add support for NEON intrinsics to speed up texture compression. We can
> now convert the time that we would have spent uploading the texture to
> compressing it giving a net 50% memory savings for these things.
>
> Committed: https://skia.googlesource.com/skia/+/bc9205be0a1094e312da098348601398c210dc5a

R=robertphillips@google.com, mtklein@google.com, kevin.petit@arm.com
TBR=kevin.petit@arm.com, mtklein@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/384053003
2014-07-11 13:15:15 -07:00
caryclark
936b73424f ios fixes
skia_ios.mm
Get the app's Documents directory and pass use it to set the resource path.
This is a quick hack which will be replaced by a new application that is
a tiny shim around a command line tool.

SkImageEncoder.h
SkForceLinking.cpp
SkImageDecoder_CG.cpp
Add support for FORCE_LINKING so iOS sees the PNG encoder and others.

SkFloatBits.cpp
SkPoint.cpp
Handle denormalized numbers that are floored by the iOS ARM processor.

SkImageDecoder_iOS.mm
Remove empty encoder factory.

SkTouchGesture.cpp
Return early on empty state on touch rather than aborting (crashing)

JpegTest.cpp
Hal via stackoverflow.com says partial jpegs can be gray as well.

skia_test.cpp
Remove crash handler call for now to avoid link failure.

OverwriteLine.h
Remove fancy line overwrite for iOS.

Resources.cpp
Add interface to set resource directory based on runtime query.

BUG=skia:2736 skia:2737 skia:2738
R=reed@google.com, halcanary@google.com, mtklein@google.com, tfarina@chromium.org

Author: caryclark@google.com

Review URL: https://codereview.chromium.org/373383003
2014-07-11 12:14:51 -07:00
krajcevski
bc9205be0a Add support for NEON intrinsics to speed up texture compression. We can
now convert the time that we would have spent uploading the texture to
compressing it giving a net 50% memory savings for these things.

R=robertphillips@google.com, mtklein@google.com, kevin.petit@arm.com

Author: krajcevski@google.com

Review URL: https://codereview.chromium.org/390453002
2014-07-11 12:12:27 -07:00
scroggo
ef0fd61dc2 Remove SK_SUPPORT_LEGACY_SHADER_LOCALMATRIX.
This is no longer needed by Android.

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

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/379323002
2014-07-11 11:33:52 -07:00
egdaniel
c855ca0c94 Revert of Remove gpu shader optimatization for solid white or trans black colors (https://codereview.chromium.org/375823005/)
Reason for revert:
possible test and gm failures

Original issue's description:
> Remove gpu shader optimatization for solid white or trans black colors
>
> Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.
>
> With optimization in (ms):
>          White       Blue        Checkered
> Linux    ~80         ~80         ~160
> N7       ~800        ~1100       ~1500
> Moto-e   ~830        ~1100       ~2500
>
> Without optimization in (ms):
>          White       Blue        Checkered
> Linux    ~80         ~80         ~80
> N7       ~1100       ~1100       ~1100
> Moto-e   ~1100       ~1100       ~1500
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/5f78d2251a440443c9eaa321dad058d7a32bfef7

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/385163004
2014-07-11 09:13:37 -07:00
scroggo
c9af44add0 Revert of Remove public_headers.gypi, unneeded by Skia. (https://codereview.chromium.org/381633003/)
Reason for revert:
Breaking canary: http://108.170.220.120:10117/builders/Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT/builds/1207/steps/Update/logs/stdio

Original issue's description:
> Remove public_headers.gypi, unneeded by Skia.
>
> This file not needed by Skia, and is almost always out of date.
> We recommend generating this inside Android WebView, where it is
> used. Generating it is relatively straightforward; here is one way:
> https://codereview.chromium.org/198063002/diff/110001/platform_tools/android/gyp_gen/gen_public_headers.py
>
> BUG=skia:2350
>
> Committed: https://skia.googlesource.com/skia/+/a3fce46f7c85eb3eb5c5373c1eaa0336d9756252

R=robertphillips@google.com
TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2350

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/382153007
2014-07-11 09:05:32 -07:00
egdaniel
5f78d2251a Remove gpu shader optimatization for solid white or trans black colors
Running test on the added bench which draws a grid of all white paths, all blue paths, or alternating checkered white/blue paths.

With optimization in (ms):
         White       Blue        Checkered
Linux    ~80         ~80         ~160
N7       ~800        ~1100       ~1500
Moto-e   ~830        ~1100       ~2500

Without optimization in (ms):
         White       Blue        Checkered
Linux    ~80         ~80         ~80
N7       ~1100       ~1100       ~1100
Moto-e   ~1100       ~1100       ~1500

BUG=skia:
R=bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/375823005
2014-07-11 08:57:40 -07:00
scroggo
a3fce46f7c Remove public_headers.gypi, unneeded by Skia.
This file not needed by Skia, and is almost always out of date.
We recommend generating this inside Android WebView, where it is
used. Generating it is relatively straightforward; here is one way:
https://codereview.chromium.org/198063002/diff/110001/platform_tools/android/gyp_gen/gen_public_headers.py

BUG=skia:2350
R=robertphillips@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/381633003
2014-07-11 08:47:16 -07:00
mtklein
4d1605a8d6 Enable tools/CrashHandler again.
- Defaults to on the bots, triggered off CHROME_HEADLESS=1 in the environment.
  - Defaults off otherwise.
  - Can be enabled by setting CHROME_HEADLESS=1 (weird) or GYP_DEFINES=skia_crash_handler=1.

BUG=skia:
R=borenet@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/383813002
2014-07-10 14:16:04 -07:00
Mike Klein
15840a2e84 Delete third_party/harfbuzz
BUG=skia:
R=bungeman@google.com, reed@google.com

Review URL: https://codereview.chromium.org/384503008
2014-07-10 11:32:44 -04:00
robertphillips
c26d991bf2 Split SkPictureReplacementPlayback out of SkPicturePlayback
R=mtklein@google.com, reed@google.com

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/383733002
2014-07-10 07:21:27 -07:00
Derek Sollenberger
c7d29c86b2 update our build system to support the experimental L-Release NDK
This includes adding 64-bit support for arm, x86, and mips.

R=borenet@google.com

Review URL: https://codereview.chromium.org/377993002
2014-07-10 08:10:20 -04:00
mtklein
e4636aa173 Merge Replay and Quilt tasks, adding in all BBH implementations.
Replay isn't that helpful of a test any more now that we have the more
stringent Quilt tests.  Quilt was missing bounding box hierarchies, though,
while Replay was sort of testing RTree (pointlessly, as it was drawing without
any clip).  Now Quilt does everything, testing RTree, QuadTree, and TileGrid.

Quilt mode now falls back to drawing all at once (i.e. Replay) for GMs that
don't tile perfectly.  Still a TODO to make this check more flexible than exact
pixel matches.

Two GMs fail when using a BBH:
  - imageresizetiled
  - resizeimagefilter
We think we're not adjusting the bounds of save layers by their paint.
This is probably a bug, but one to be fixed separately from adding new tests.

BUG=skia:
R=robertphillips@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/377373003
2014-07-09 13:10:58 -07:00
scroggo
ecce60bad6 Build Android with SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG.
This flag will be used on Android when built for the framework,
as well as when built for the WebView. Setting this flag for
Android means our tests can fully test CanvasStateTest.

Fix CanvasStateTest. It has bit-rotted since disabling
SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG.

Splitting off from https://codereview.chromium.org/372003002/ ,
as it seems self-contained.

BUG=b/15693384
R=djsollen@google.com, reed@google.com, mtklein@google.com

Author: scroggo@google.com

Review URL: https://codereview.chromium.org/375943003
2014-07-09 07:26:40 -07:00
Mike Klein
874a62acef Revert "Remove ability for Release code to call getRefCnt() or getWeakRefCnt()."
This reverts commit 4ae94ffce5.

BUG=skia:

Review URL: https://codereview.chromium.org/382523002
2014-07-09 09:04:07 -04:00
mtklein
0b544ae222 Add SkRacy
SkRacy<T> is a zero-overhead wrapper for a T, except it also
silences race warnings when TSAN is running.

Here we apply in several classes.  In SkMatrix and SkPathRef,
we use it to opportunistically cache some idempotent work.

In SkPixelRef, we wrap the genIDs.  We think the worst that
can happen here is we'll increment the global next-genID a
few times instead of once when we go to get another ID.

BUG=skia:

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

CQ_EXTRA_TRYBOTS=tryserver.skia:Canary-Chrome-Ubuntu13.10-Ninja-x86_64-ToT-Trybot,Canary-Chrome-Win7-Ninja-x86-SharedLib_ToT-Trybot,Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot
R=reed@google.com, mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/371363004
2014-07-08 19:37:47 -07:00
tfarina
0a65e38560 Cleanup: Rename UnitTestTest.cpp to RTConfRegistryTest.cpp
BUG=None
TEST=make tests
R=mtklein@google.com

Author: tfarina@chromium.org

Review URL: https://codereview.chromium.org/374443002
2014-07-08 10:33:28 -07:00
robertphillips
1ad00e4b24 Split SkPictureRangePlayback out of SkPicturePlayback
This CL starts cleaning up SkPicturePlayback. Future CLs will:

split out the SkPictureReplacementPlayback
remove the preDraw/postDraw entry points & fix up SkPictureTimedPlayback

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

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/374833006
2014-07-08 08:28:08 -07:00
mtklein
4ae94ffce5 Remove ability for Release code to call getRefCnt() or getWeakRefCnt().
These getRefCnt() methods are not thread safe, so Skia code should not
be calling them.  unique() is fine.

SkDEBUG code (SkASSERTs) can still call getRefCnt() / getWeakRefCnt().

This adds tools/RefCntIs.{h,cpp}, which lets tests make their assertions in
both debug and release modes.

BUG=skia:2726
R=senorblanco@chromium.org, mtklein@google.com, reed@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/378643003
2014-07-08 06:48:17 -07:00
djordje.pesut
a26bbb95a6 MIPS: added optimizations for functions from SkBitmapProcState
gain is ~30%

following functions are optimized:
  SI8_D16_nofilter_DX
  SI8_opaque_D32_nofilter_DX

R=djsollen@google.com, teodora.petrovic@gmail.com

Author: djordje.pesut@imgtec.com

Review URL: https://codereview.chromium.org/336533003
2014-07-08 02:24:16 -07:00
reed
beaf62da36 remove unneeded flag for android
BUG=skia:
R=scroggo@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/372133003
2014-07-07 15:54:20 -07:00
sugoi
24dcac2140 YUV to RGB converter
This is a first piece of the GPU YUV decoder, which is the actual effect that performs the conversion. For now, it simply applies the conversion matrix, since it is all I need. I may add modes if different matrices need to be applied or if I add color profile support here.

I'll try to keep these cls short and easy to review, but there should be a few of them coming once this one is in.

BUG=skia:
R=senorblanco@chromium.org, senorblanco@google.com, reed@google.com, bsalomon@google.com

Author: sugoi@chromium.org

Review URL: https://codereview.chromium.org/378503006
2014-07-07 15:09:49 -07:00