Commit Graph

3521 Commits

Author SHA1 Message Date
milko.leporis
401e77cfe1 MIPS32r2: Fix Chromium runtime crash
Crash is caused by ldxc1 instruction, which traps when double values are
not aligned on 8-byte boundaries. Problem was tracked to SkChunkAlloc which
produces pointers aligned on 4-byte boundaries leading to misalignment.

This change makes sure that SkChunkAlloc will produce pointers that are
aligned to 8 bytes.

Appropriate tests are added to tests/MemsetTest.cpp

TEST=Build Chromium with Clang and run on MIPS32r2 platform
TEST=./out/Debug/dm --match Memset
BUG=130022
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1849183004

Review-Url: https://codereview.chromium.org/1849183004
2016-06-05 13:14:21 -07:00
robertphillips
adf5afa628 Add SampleApp slide with animating lightmapped objects & transparency
This is pulled out of the drawLitAtlas CL (may it someday land). It does nicely demonstrate animating normal mapped objects and normal maps combined with partially transparent diffuse textures.

It is a crude Asteroids game.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2026393005

TBR=reed@google.com

Review-Url: https://codereview.chromium.org/2026393005
2016-06-03 10:12:08 -07:00
scroggo
3965825b97 Check libpng directly into third_party/
With this change, the CMake build, which does not use DEPS to sync
external projects, is able to build and use the same version of libpng
that is used in other builds.

This will allow all platforms (including Google3 CMake build) to test on
the same version of libpng, so we do not need to make SkPngCodec support
all versions of libpng.

- Update CMakeLists.txt to use the checked in libpng.
- Check in libpng version 1.6.22rc01
- Update README.google
- Replace our old LICENSE file with the latest one from libpng
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2033063003
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2033063003
2016-06-02 12:59:59 -07:00
halcanary
45420a945c SkMultiPictureDocument & SkMultiPictureDocumentReader
also, a new DM::Src.

motivation: To be used to test the printing pipeline in Chromium.

BUG=skia:5370

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2023593002

Review-Url: https://codereview.chromium.org/2023593002
2016-06-02 12:41:14 -07:00
msarett
9876ac5b30 Create SkColorSpaceXform to handle color conversions
Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952063002

Committed: https://skia.googlesource.com/skia/+/740cc88ee3d63c75e52d31238f2a32600cc57a8c

Review-Url: https://codereview.chromium.org/1952063002
2016-06-01 14:47:18 -07:00
msarett
4a603fc591 Revert of Create SkColorSpaceXform to handle color conversions (patchset #10 id:260001 of https://codereview.chromium.org/1952063002/ )
Reason for revert:
Google3 can't find qcms

Original issue's description:
> Create SkColorSpaceXform to handle color conversions
>
> Also adds testing of qcms color correction, so we can compare
> SkColorSpaceXform outputs to qcms outputs.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952063002
>
> Committed: https://skia.googlesource.com/skia/+/740cc88ee3d63c75e52d31238f2a32600cc57a8c

TBR=reed@google.com,scroggo@google.com,mtklein@google.com,herb@google.com,brianosman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2023093004
2016-06-01 09:16:04 -07:00
msarett
740cc88ee3 Create SkColorSpaceXform to handle color conversions
Also adds testing of qcms color correction, so we can compare
SkColorSpaceXform outputs to qcms outputs.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952063002

Review-Url: https://codereview.chromium.org/1952063002
2016-06-01 07:55:30 -07:00
sdefresne
e3fa811657 [GN] Add support for disabling opts via SK_BUILD_NO_OPTS define.
When targetting iOS and using gyp to generate the build files, it is not
possible to select files to build depending on the architecture. Due to
that, the skia code was disabling all optimisation when SK_BUILD_FOR_IOS
was defined.

Since it is possible to select the correct optimised version when using
gn, this pessimisation is hurting the build. Introduce a new define to
disable the optimisation SK_BUILD_NO_OPTS. It will be used by Chromium
when building skia for iOS with gyp but not gn.

Define SK_BUILD_NO_OPTS along-side SK_BUILD_FOR_IOS for all files that
look like build configuration (Xcode projects, gyp configuration files,
public.bzl) in order to avoid introducing breakage on those builds.

BUG=607933
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002423002

Review-Url: https://codereview.chromium.org/2002423002
2016-06-01 07:08:56 -07:00
robertphillips
71e0552793 Make use of new SkLights class
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2026763002

Review-Url: https://codereview.chromium.org/2026763002
2016-05-31 12:08:25 -07:00
halcanary
bfa9275968 SkXPS: clean up SkConstexprMath
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2000853003

Review-Url: https://codereview.chromium.org/2000853003
2016-05-31 11:23:42 -07:00
robertphillips
93966d88ef Add SkLights class
The SkLights class is intended to be passed to the drawLitAtlas call (and then on to SkLightingShader).

This CL is calved off of https://codereview.chromium.org/1261433009/ (Add SkCanvas::drawLitAtlas call).
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1255133004

Review-Url: https://codereview.chromium.org/1255133004
2016-05-31 06:56:28 -07:00
mtklein
785a5b941a Clean up SkFloatBits
- remove dead code
- rewrite float -> int converters

The strategy for the new converters is:
   - convert input to double
   - floor/ceil/round in double space
   - pin that double to [SK_MinS32, SK_MaxS32]
   - truncate that double to int32_t

This simpler strategy does not work:
   - floor/ceil/round in float space
   - pin that float to [SK_MinS32, SK_MaxS32]
   - truncate that float to int32_t

SK_MinS32 and SK_MaxS32 are not representable as floats:
they round to the nearest float, ±2^31, which makes the
pin insufficient for floats near SK_MinS32 (-2^31+1) or
SK_MaxS32 (+2^31-1).

float only has 24 bits of precision, and we need 31.
double can represent all integers up to 50-something bits.

An alternative is to pin in float to ±2147483520, the last
exactly representable float before SK_MaxS32 (127 too small).

Our tests test that we round as floor(x+0.5), which can
return different numbers than round(x) for negative x.
So this CL explicitly uses floor(x+0.5).

I've updated the tests with ±inf and ±NaN, and tried to
make them a little clearer, especially using SK_MinS32
instead of -SK_MaxS32.

I have not timed anything here.  I have never seen any of these
methods in a profile.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2012333003

Review-Url: https://codereview.chromium.org/2012333003
2016-05-27 10:47:32 -07:00
djsollen
4145792736 Remove VisualBench and its Android implementation.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2018603003

Review-Url: https://codereview.chromium.org/2018603003
2016-05-27 05:39:29 -07:00
caryclark
64022c1ed2 toy to play with antialias raytracing
Here's the ray tracer I wrote.
I've commented out the calls to experimental
stroking -- enough of it remains working
to help visualize what you've been talking
to me about.

R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2014993002

Review-Url: https://codereview.chromium.org/2014993002
2016-05-27 05:13:26 -07:00
msarett
0e5b249e54 Add exact version of qcms used by Chrome for testing and comparison
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2014023003

Review-Url: https://codereview.chromium.org/2014023003
2016-05-26 11:05:37 -07:00
halcanary
910fff4244 gyp: supress more warnings for zlib
TBR=

Review-Url: https://codereview.chromium.org/2008763003
2016-05-24 05:23:52 -07:00
halcanary
3d5942e8a4 gyp: clean up warnings with clang-3.8
Also: update zlib DEPS.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002233002

Review-Url: https://codereview.chromium.org/2002233002
2016-05-23 14:02:54 -07:00
jvanverth
1d15596200 Add Xlib support to viewer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1999213002

Review-Url: https://codereview.chromium.org/1999213002
2016-05-23 13:13:36 -07:00
msarett
8cc2091118 Make SkColorSpace a public API
I've trimmed uniqueID for now, and added some comments.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1996973002

Review-Url: https://codereview.chromium.org/1996973002
2016-05-23 09:29:29 -07:00
stephana
de8af07e41 Remove custom bundle ID for iOS
BUG=skia:
R=borenet
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=1998273002

Review-Url: https://codereview.chromium.org/1998273002
2016-05-20 11:20:38 -07:00
halcanary
e76ca8b9c2 gyp (third_party) warning changes for ccache
Also fix a broken unit test in MatrixTest.cpp.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002663002

Review-Url: https://codereview.chromium.org/2002663002
2016-05-20 10:36:50 -07:00
reed
d46e585986 remove animator from SampleApp
There is no xml parser hooked up, so the animator test file (already behind #if 0) is not testable. Removing the files to speedup building SampleApp.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1987963002

Review-Url: https://codereview.chromium.org/1987963002
2016-05-18 06:55:17 -07:00
msarett
d1227a7417 Delete SkBitmapRegionCanvas
This was an approach we considered for implementing Android's
BitmapRegionDecoder.

It was useful for testing and comparison, but now is no longer worth
maintaining and testing.

The approach to subset/scaled decodes (clipped decode, then scale)
may be worth reconsidering at some point.

BUG=skia:5307
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990543002

Review-Url: https://codereview.chromium.org/1990543002
2016-05-18 06:23:57 -07:00
bsalomon
c2878e23d4 Remove GrFontScaler class.
This class is now effectively a set of helpers for interacting with a SkGlyphCache by GrBatchTextStrike. The class is deleted and the code is made into static functions in GrBatchFontCache.cpp

BUG=chromium:608566

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1985163002

Review-Url: https://codereview.chromium.org/1985163002
2016-05-17 13:18:03 -07:00
liyuqian
d3cdbcad65 Implement touch control
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1982643004

Review-Url: https://codereview.chromium.org/1982643004
2016-05-17 12:44:20 -07:00
borenet
d2c7ef9495 Move VisualBench_APK and SampleApp_APK to "everything" target
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1986433002

Review-Url: https://codereview.chromium.org/1986433002
2016-05-16 10:38:51 -07:00
fmalita
796e365999 SkPictureGpuAnalyzer
Stateful helper for gathering multi-picture GPU stats.

Exposes the existing SkPicture GPU veto semantics, while preserving
the SKP impl (which has some nice properties: lazy, hierarchical,
cached per pic).

R=reed@google.com,bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1974833003

Review-Url: https://codereview.chromium.org/1974833003
2016-05-13 11:40:07 -07:00
msarett
aabe15e206 Simple program for visualizing gamuts
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1972343002

Review-Url: https://codereview.chromium.org/1972343002
2016-05-13 07:32:59 -07:00
bungeman
13b9c95295 Move SkTypeface to sk_sp.
Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933393002

Review-Url: https://codereview.chromium.org/1933393002
2016-05-12 10:09:31 -07:00
scroggo
9a9a7b29e5 Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of https://codereview.chromium.org/1933393002/ )
Reason for revert:
fontmgr_iterAndroid failing to draw emoji. E.g. https://gold.skia.org/search2?blame=6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm

Original issue's description:
> Move SkTypeface to sk_sp.
>
> Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f

TBR=reed@google.com,fmalita@chromium.org,tomhudson@google.com,bungeman@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1974783002
2016-05-12 06:22:30 -07:00
cdalton
93a379bd4d Separate user and raw stencil settings
Adds a new GrUserStencilSettings class that describes in abstract terms
how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit,
etc.). GrPipelineBuilder now only defines the GrUserStencilSettings.
When the GrPipeline is finalized, the user stencil settings are then
translated into concrete GrStencilSettings.

At this point, GrClipMaskManager only needs to tell the GrAppliedClip
whether or not there is a stencil clip. It does not need to modify
stencil settings and GrPipelineBuilder does not need
AutoRestoreStencil.

This is one step of the stencil overhaul. In the future it will also
allow us to clean up the special case handling for nvpr and the
stateful fClipMode member of GrClipMaskManager.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002

Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37

Review-Url: https://codereview.chromium.org/1962243002
2016-05-11 13:58:09 -07:00
bungeman
6296da736f Move SkTypeface to sk_sp.
Review-Url: https://codereview.chromium.org/1933393002
2016-05-11 12:38:18 -07:00
robertphillips
e19aecdd13 Revert of Separate user and raw stencil settings (patchset #8 id:140001 of https://codereview.chromium.org/1962243002/ )
Reason for revert:
This seems to be breaking nanobench on the Windows bots with:

Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION
GrDrawTarget::stencilPath +c7
GrStencilAndCoverPathRenderer::onDrawPath +fd
GrDrawContext::internalDrawPath +509
GrDrawContext::drawPath +223
GrBlurUtils::drawPathWithMaskFilter +250
SkGpuDevice::drawPath +2ea
SkCanvas::onDrawPath +2e3
SkRecordDraw +2e6
SkBigPicture::playback +e5
SkCanvas::onDrawPicture +12c
SkCanvas::drawPicture +145
SkRecordDraw +2e6
SkBigPicture::playback +e5
SkCanvas::onDrawPicture +12c
SkCanvas::drawPicture +145
SkRecordDraw +261
SkBigPicture::playback +e5
SkCanvas::onDrawPicture +12c
SkCanvas::drawPicture +145
SkMultiPictureDraw::draw +bf
SKPBench::drawMPDPicture +1e0
SKPBench::onDraw +34
Benchmark::draw +32
time +92
setup_gpu_bench +6e
nanobench_main +77b

Original issue's description:
> Separate user and raw stencil settings
>
> Adds a new GrUserStencilSettings class that describes in abstract terms
> how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit,
> etc.). GrPipelineBuilder now only defines the GrUserStencilSettings.
> When the GrPipeline is finalized, the user stencil settings are then
> translated into concrete GrStencilSettings.
>
> At this point, GrClipMaskManager only needs to tell the GrAppliedClip
> whether or not there is a stencil clip. It does not need to modify
> stencil settings and GrPipelineBuilder does not need
> AutoRestoreStencil.
>
> This is one step of the stencil overhaul. In the future it will also
> allow us to clean up the special case handling for nvpr and the
> stateful fClipMode member of GrClipMaskManager.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002
>
> Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37

TBR=bsalomon@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1969693003
2016-05-11 05:21:56 -07:00
bungeman
f077324e13 Remove SkFontHost.h.
What is left of this file is now in SkFontLCDConfig.h.

Review-Url: https://codereview.chromium.org/1945883002
2016-05-10 14:32:07 -07:00
msarett
fd0b33dee6 Instruct yasm to compile position independent code on Android
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1965983002

Review-Url: https://codereview.chromium.org/1965983002
2016-05-10 14:30:07 -07:00
cdalton
12dbb3947e Separate user and raw stencil settings
Adds a new GrUserStencilSettings class that describes in abstract terms
how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit,
etc.). GrPipelineBuilder now only defines the GrUserStencilSettings.
When the GrPipeline is finalized, the user stencil settings are then
translated into concrete GrStencilSettings.

At this point, GrClipMaskManager only needs to tell the GrAppliedClip
whether or not there is a stencil clip. It does not need to modify
stencil settings and GrPipelineBuilder does not need
AutoRestoreStencil.

This is one step of the stencil overhaul. In the future it will also
allow us to clean up the special case handling for nvpr and the
stateful fClipMode member of GrClipMaskManager.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002

Review-Url: https://codereview.chromium.org/1962243002
2016-05-10 14:23:01 -07:00
bsalomon
6663acff01 Replace GrStrokeInfo with GrStyle.
A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002

Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

Review-Url: https://codereview.chromium.org/1957363002
2016-05-10 09:14:17 -07:00
bsalomon
85d9667f59 Revert of Replace GrStrokeInfo with GrStyle. (patchset #4 id:160001 of https://codereview.chromium.org/1957363002/ )
Reason for revert:
Breaking some bots

Original issue's description:
> Replace GrStrokeInfo with GrStyle.
>
> A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002
>
> Committed: https://skia.googlesource.com/skia/+/33595bdf4b64a745f6340338d307e806e96c587f

TBR=egdaniel@google.com,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1967513002
2016-05-10 06:19:21 -07:00
bsalomon
33595bdf4b Replace GrStrokeInfo with GrStyle.
A side effect is that arbitrary path effects can no be pushed deeper into the Ganesh flow for paths. They may be applied by path renderers.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957363002

Review-Url: https://codereview.chromium.org/1957363002
2016-05-10 05:57:27 -07:00
egdaniel
167ab91980 Allow gpu ResourceHandle class to be shared for multiple purposes
Currently this class was just used for resource handles when building up
a shader. However, I want to now use this class for things like objects
owned/held by the GrVkResourceProvider which are used by other classes.
An example of this will be for GrVkRenderTargets to hold a handle to a
collection of compatible render passes without having to own/hold onto
the render passes themselves.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955893002

Review-Url: https://codereview.chromium.org/1955893002
2016-05-09 11:03:48 -07:00
halcanary
ab12c788e2 harfbuzz test: compile fewer files
TBR=
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1957353002

Review-Url: https://codereview.chromium.org/1957353002
2016-05-09 08:15:58 -07:00
halcanary
7a223f5825 DEPS: update icu + sfntly
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1960153002

Review-Url: https://codereview.chromium.org/1960153002
2016-05-09 08:00:26 -07:00
halcanary
e20a875170 SkAdvancedTypefaceMetrics: abstract out linked list
+ use SkSinglyLinkedList<T>
+ move SkSinglyLinkedList.h to core
+ remove SkHackyAutoTDelete
+ getAdvanceData() -> setGlyphWidths()
+ finishRange no longer templated
+ remove unused templated functions

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953153004

Review-Url: https://codereview.chromium.org/1953153004
2016-05-08 18:47:16 -07:00
msarett
ad3a5c634d Compile SkForceLinking on CMake
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1956573002
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/1956573002
2016-05-06 07:21:26 -07:00
mtklein
ffa4a9213b SkOncePtr -> SkOnce
It's always nice to kill off a synchronization primitive.
And while less terse, I think this new code reads more clearly.

... and, SkOncePtr's tests were the only thing now using sk_num_cores()
outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02

Review-Url: https://codereview.chromium.org/1953533002
2016-05-05 16:05:56 -07:00
brianosman
2d1ee7936e Added --deepColor option to SampleApp, triggers creation of a ten-bit/channel
buffer. (Only on Windows at the moment). Uses new effect to do the final
gamma adjustment

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919993002

Review-Url: https://codereview.chromium.org/1919993002
2016-05-05 12:24:31 -07:00
halcanary
c34323549d experimental/tools/coreGraphicsPdf2png: remove skia dependency
// experimental-only
TBR=
NOTRY=true

Review-Url: https://codereview.chromium.org/1950353002
2016-05-05 11:17:08 -07:00
mtklein
809ccf37ec Remove NEON runtime detection support.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1952953004
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/1952953004
2016-05-05 10:58:39 -07:00
reed
959a2937d5 Revert of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org/1949313003/ )
Reason for revert:
ok, I have no idea what's going on

Original issue's description:
> Reland of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org/1945293004/ )
>
> Reason for revert:
> previous revert unneeded (I think)
>
> Original issue's description:
> > Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ )
> >
> > Reason for revert:
> > broken the Mac and Linux builders, e.g.:
> >
> > https://build.chromium.org/p/chromium/builders/Mac/builds/15151
> > https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052
> >
> > Original issue's description:
> > > SkOncePtr -> SkOnce
> > >
> > > It's always nice to kill off a synchronization primitive.
> > > And while less terse, I think this new code reads more clearly.
> > >
> > > ... and, SkOncePtr's tests were the only thing now using sk_num_cores()
> > > outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
> > >
> > > BUG=skia:
> > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
> > > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
> > >
> > > Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02
> >
> > TBR=herb@google.com,mtklein@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/7eb33da7eede34c050b865dbb1b60c3dcea7191b
>
> TBR=herb@google.com,mtklein@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/82da9a8aa0ce648f36882830765b42e0ada6c0fa

TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1948313002
2016-05-05 01:36:43 -07:00
reed
82da9a8aa0 Reland of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org/1945293004/ )
Reason for revert:
previous revert unneeded (I think)

Original issue's description:
> Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ )
>
> Reason for revert:
> broken the Mac and Linux builders, e.g.:
>
> https://build.chromium.org/p/chromium/builders/Mac/builds/15151
> https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052
>
> Original issue's description:
> > SkOncePtr -> SkOnce
> >
> > It's always nice to kill off a synchronization primitive.
> > And while less terse, I think this new code reads more clearly.
> >
> > ... and, SkOncePtr's tests were the only thing now using sk_num_cores()
> > outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
> >
> > BUG=skia:
> > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
> > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
> >
> > Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02
>
> TBR=herb@google.com,mtklein@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/7eb33da7eede34c050b865dbb1b60c3dcea7191b

TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1949313003
2016-05-05 01:28:56 -07:00
reed
7eb33da7ee Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ )
Reason for revert:
broken the Mac and Linux builders, e.g.:

https://build.chromium.org/p/chromium/builders/Mac/builds/15151
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052

Original issue's description:
> SkOncePtr -> SkOnce
>
> It's always nice to kill off a synchronization primitive.
> And while less terse, I think this new code reads more clearly.
>
> ... and, SkOncePtr's tests were the only thing now using sk_num_cores()
> outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02

TBR=herb@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1945293004
2016-05-04 17:14:44 -07:00
mtklein
9bd3fc7fa9 SkOncePtr -> SkOnce
It's always nice to kill off a synchronization primitive.
And while less terse, I think this new code reads more clearly.

... and, SkOncePtr's tests were the only thing now using sk_num_cores()
outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Review-Url: https://codereview.chromium.org/1953533002
2016-05-04 14:40:18 -07:00
jvanverth
3452426715 Rename VulkanViewer to Viewer, take 2.
Also puts Window and Application in sk_app namespace.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1945103003

Review-Url: https://codereview.chromium.org/1945103003
2016-05-04 13:49:13 -07:00
reed
0ccc62d4f7 move colorshader into its own .cpp, add color4f variant
Implemented as a different subclass for SkColorShader (which is also private) partly to make the CL clearer/simpler, and partly for flatten/unflatten compatibility. Later I'm sure we could combine these if that proves useful.

Lots of TODOs at the moment, but still valuable to get reviewed.

Note: this ignores the question (for the moment) about how to interpret SkColor in the larger world. That needs to happen, but this CL is more focused on what *else* to do besides handle the old-style input (and old-style pipeline).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1934313002

Review-Url: https://codereview.chromium.org/1934313002
2016-05-04 13:09:39 -07:00
robertphillips
76948d4faa Add Gr*Proxy classes
This isn't wired in anywhere yet.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002

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

Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db

Review-Url: https://codereview.chromium.org/1937553002
2016-05-04 12:47:41 -07:00
brianosman
fad98562d8 Prototype code that turns any/every flattenable into JSON
This makes inspecting things in SkDebugger far more useful - any filter
or other complex object on the paint is ultimately visible. You still
have to do some guess work to figure out what the fields actually mean,
but you can at least cross-reference with the code in flatten().

Screenshots:
Before: https://screenshot.googleplex.com/a6JM5HBBe6G.png
After : https://screenshot.googleplex.com/XQfr4YJ6mnH.png

Changes to public API are just removals and changes to make
some functions virtual.

TBR=reed@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1920423002

Review-Url: https://codereview.chromium.org/1920423002
2016-05-04 11:06:28 -07:00
halcanary
f5bf5785bc experimental/tools/coreGraphicsPdf2png: fix
NOTRY=true
TBR=

Review-Url: https://codereview.chromium.org/1944403002
2016-05-04 08:42:35 -07:00
halcanary
00d44e014c Start building HarfBuzz+Skia example
(prevent bitrot in example code)

tools/using_skia_and_harfbuzz.cpp was written by aam@:
  https://github.com/aam/skiaex

update HarfBuzz to latest release: 1.2.7

BUG=skia:4742
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1940393002

Review-Url: https://codereview.chromium.org/1940393002
2016-05-03 15:09:52 -07:00
robertphillips
4f16e6361d Revert of Add Gr*Proxy classes (patchset #10 id:220001 of https://codereview.chromium.org/1937553002/ )
Reason for revert:
ASAN

Original issue's description:
> Add Gr*Proxy classes
>
> This isn't wired in anywhere yet.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
>
> Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1
>
> Committed: https://skia.googlesource.com/skia/+/92605b35efa0155c44d24bd8415b4cc1db8831db

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1944953002
2016-05-03 12:56:04 -07:00
reed
50d3b57c8a return 4x4 matrix from SkColorSpace
move SkMatrix44 into core (with alias in utils to transition chrome)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1943833002

Review-Url: https://codereview.chromium.org/1943833002
2016-05-03 12:13:21 -07:00
robertphillips
92605b35ef Add Gr*Proxy classes
This isn't wired in anywhere yet.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002

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

Review-Url: https://codereview.chromium.org/1937553002
2016-05-03 08:47:01 -07:00
robertphillips
89d09a1f70 Revert of Add Gr*Proxy classes (patchset #9 id:160001 of https://codereview.chromium.org/1937553002/ )
Reason for revert:
Seems to be breaking N7 & ANGLE bots

Original issue's description:
> Add Gr*Proxy classes
>
> This isn't wired in anywhere yet.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002
>
> Committed: https://skia.googlesource.com/skia/+/de5bf0cfeca908b81a28cc50065f7bc2da3d2fd1

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1949463002
2016-05-03 06:44:50 -07:00
brianosman
444f1ba1b7 Remove SkBitmapHeap and SkBitmapHeapReader. They're unused.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1938033002

Review-Url: https://codereview.chromium.org/1938033002
2016-05-03 06:07:38 -07:00
robertphillips
de5bf0cfec Add Gr*Proxy classes
This isn't wired in anywhere yet.

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937553002

Review-Url: https://codereview.chromium.org/1937553002
2016-05-03 05:06:29 -07:00
ethannicholas
6536ae590e added GrMSAAPathRenderer
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834133003

Committed: https://skia.googlesource.com/skia/+/47a2dc8e229e93e1bcf7405747320920da1ab742

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

Review-Url: https://codereview.chromium.org/1834133003
2016-05-02 12:16:49 -07:00
bungeman
0265707c19 Clean up SkFontConfigInterface implementation.
Renames some classes to avoid confusion with FontConfig.

Removed direct calls to FontConfig instead of calling FCI.

Moves the globals and factory to one (optional) file.

Moves font management code from typeface to font manager.

Adds index to fonts created from streams.

Associates FCI typefaces with the FCI instance which provides its identity.

Simplifies the singleton initialization.

Review-Url: https://codereview.chromium.org/1936213002
2016-05-02 11:54:13 -07:00
msarett
b917e04d51 Update libjpeg-turbo to 1.4.90
Google3, Chrome, and Android are considering updates.  Let's start
testing Skia on the newest version.
https://critique.corp.google.com/#review/116667446
https://codereview.chromium.org/1934113002
https://buganizer.corp.google.com/u/0/issues/28268702

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1940903002

Committed: https://skia.googlesource.com/skia/+/3994c161ec5a2b83e8f6bab4d9c469eec2668d92

Review-Url: https://codereview.chromium.org/1940903002
2016-05-02 10:43:22 -07:00
msarett
a13efa6906 Revert of Update libjpeg-turbo to 1.4.90 (patchset #1 id:20001 of https://codereview.chromium.org/1940903002/ )
Reason for revert:
Clang wants "strbeq" and gcc wants "streqb".  Uggh.

https://build.chromium.org/p/client.skia.compile/builders/Build-Mac-Clang-Arm7-Debug-Android/builds/1766/steps/compile_skia%20on%20Mac/logs/stdio

Original issue's description:
> Update libjpeg-turbo to 1.4.90
>
> Google3, Chrome, and Android are considering updates.  Let's start
> testing Skia on the newest version.
> https://critique.corp.google.com/#review/116667446
> https://codereview.chromium.org/1934113002
> https://buganizer.corp.google.com/u/0/issues/28268702
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1940903002
>
> Committed: https://skia.googlesource.com/skia/+/3994c161ec5a2b83e8f6bab4d9c469eec2668d92

TBR=scroggo@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1937143002
2016-05-02 09:14:23 -07:00
msarett
3994c161ec Update libjpeg-turbo to 1.4.90
Google3, Chrome, and Android are considering updates.  Let's start
testing Skia on the newest version.
https://critique.corp.google.com/#review/116667446
https://codereview.chromium.org/1934113002
https://buganizer.corp.google.com/u/0/issues/28268702

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1940903002

Review-Url: https://codereview.chromium.org/1940903002
2016-05-02 07:48:59 -07:00
djsollen
aad1f8f70b Disable yet another GCC warning in Release_Developer mode.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1934293002

Review-Url: https://codereview.chromium.org/1934293002
2016-05-02 06:06:02 -07:00
borenet
43bf511ead Delete ChromeOS code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1926163002

Review-Url: https://codereview.chromium.org/1926163002
2016-04-29 14:01:34 -07:00
djsollen
2f12463158 Fix warnings that were exposed when running with SK_DEBUG enable on an optimized release build.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1917223006

Review-Url: https://codereview.chromium.org/1917223006
2016-04-29 13:53:05 -07:00
djsollen
efe46d2094 Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER.
The Release_Developer build type is now used to build Skia with
release level optimizations but still enable SK_DEBUG. This in turn
means that SkASSERTS and SkRTConf are available in this mode.

Further we can then remove SK_DEVELOPER as a define as it is true
iff SK_DEBUG is true.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1931903002
DOCS_PREVIEW= https://skia.org/?cl=1931903002

Review-Url: https://codereview.chromium.org/1931903002
2016-04-29 06:41:35 -07:00
reed
28d5bdd97e Revert of Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER. (patchset #2 id:20001 of https://codereview.chromium.org/1927583002/ )
Reason for revert:
still blocking DEPS roll

Original issue's description:
> Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER.
>
> The Release_Developer build type is now used to build Skia with
> release level optimizations but still enable SK_DEBUG. This in turn
> means that SkASSERTS and SkRTConf are available in this mode.
>
> Further we can then remove SK_DEVELOPER as a define as it is true
> iff SK_DEBUG is true.
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927583002
> DOCS_PREVIEW= https://skia.org/?cl=1927583002
>
> Committed: https://skia.googlesource.com/skia/+/48d6f88479e72efaf9b9d8f9c0769acb1ba773db

TBR=bungeman@gmail.com,bungeman@google.com,benjaminwagner@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/1918253006
2016-04-28 08:12:55 -07:00
msarett
95416f477d Enable flattening of SkRecordedDrawable
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1913843002

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

Review-Url: https://codereview.chromium.org/1913843002
2016-04-27 13:51:20 -07:00
djsollen
48d6f88479 Repurpose Release_Developer BUILDTYPE and remove SK_DEVELOPER.
The Release_Developer build type is now used to build Skia with
release level optimizations but still enable SK_DEBUG. This in turn
means that SkASSERTS and SkRTConf are available in this mode.

Further we can then remove SK_DEVELOPER as a define as it is true
iff SK_DEBUG is true.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1927583002
DOCS_PREVIEW= https://skia.org/?cl=1927583002

Review-Url: https://codereview.chromium.org/1927583002
2016-04-27 13:37:23 -07:00
senorblanco
900c367796 Image filters: de-nest SkImageFilter::Cache and Cache::Key.
This reduces the public header, and also allows us to foward-
declare them, so we can remove an #include from all the
SkDevice subclass headers.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919063002

Review-Url: https://codereview.chromium.org/1919063002
2016-04-27 11:31:23 -07:00
mtklein
569b02151f Revert of Enable flattening of SkRecordedDrawable (patchset #8 id:140001 of https://codereview.chromium.org/1913843002/ )
Reason for revert:
Release mode bots appear to be crashing while loading .skp files in nanobench.

Original issue's description:
> Enable flattening of SkRecordedDrawable
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1913843002
>
> Committed: https://skia.googlesource.com/skia/+/d636950e8ecba89c0021ce4e76037c67aa6ee2cd

TBR=djsollen@google.com,reed@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/1923393002
2016-04-27 09:29:34 -07:00
msarett
d636950e8e Enable flattening of SkRecordedDrawable
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1913843002

Review-Url: https://codereview.chromium.org/1913843002
2016-04-27 09:03:17 -07:00
halcanary
4b6566644f SkDocument/PDF: new API
has a pdf/a switch.
sets metadata in factory.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1916093002

Review URL: https://codereview.chromium.org/1916093002
2016-04-27 07:45:18 -07:00
bsalomon
47cc769118 Add initial implementation of GrShape and GrStyle classes and tests
The initial intent is to use GrShape to simplify the mask blur code paths. However, I also want to use this to explore a more unified drawing code flow for different geometry types. The goal is to have a single representation for geometries+styling that attempts to always keep the geometry in the simplest form (e.g. preferring rrects to paths). It also allows for converting styling information into modified geometry and for computing consistent keys.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822723003

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

Committed: https://skia.googlesource.com/skia/+/824e58fc6df8fc149d9675f577f7deeaba698b09

Review URL: https://codereview.chromium.org/1822723003
2016-04-26 12:56:00 -07:00
bsalomon
82ecc5773f Revert of Add initial implementation of GrShape and GrStyle classes and tests (patchset #11 id:280001 of https://codereview.chromium.org/1822723003/ )
Reason for revert:
test failing

Original issue's description:
> Add initial implementation of GrShape and GrStyle classes and tests
>
> The initial intent is to use GrShape to simplify the mask blur code paths. However, I also want to use this to explore a more unified drawing code flow for different geometry types. The goal is to have a single representation for geometries+styling that attempts to always keep the geometry in the simplest form (e.g. preferring rrects to paths). It also allows for converting styling information into modified geometry and for computing consistent keys.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822723003
>
> Committed: https://skia.googlesource.com/skia/+/c885dacfe4625af8b0e2e5c6e8a8ae8dc2d620a8
>
> Committed: https://skia.googlesource.com/skia/+/824e58fc6df8fc149d9675f577f7deeaba698b09

TBR=robertphillips@google.com,egdaniel@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1919243002
2016-04-26 08:41:47 -07:00
bsalomon
824e58fc6d Add initial implementation of GrShape and GrStyle classes and tests
The initial intent is to use GrShape to simplify the mask blur code paths. However, I also want to use this to explore a more unified drawing code flow for different geometry types. The goal is to have a single representation for geometries+styling that attempts to always keep the geometry in the simplest form (e.g. preferring rrects to paths). It also allows for converting styling information into modified geometry and for computing consistent keys.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822723003

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

Review URL: https://codereview.chromium.org/1822723003
2016-04-26 06:53:45 -07:00
robertphillips
83af0a63b1 Revert of Add initial implementation of GrShape and GrStyle classes and tests (patchset #10 id:260001 of https://codereview.chromium.org/1822723003/ )
Reason for revert:
From what I can tell, this compiles on 2015 but not 2013.

Original issue's description:
> Add initial implementation of GrShape and GrStyle classes and tests
>
> The initial intent is to use GrShape to simplify the mask blur code paths. However, I also want to use this to explore a more unified drawing code flow for different geometry types. The goal is to have a single representation for geometries+styling that attempts to always keep the geometry in the simplest form (e.g. preferring rrects to paths). It also allows for converting styling information into modified geometry and for computing consistent keys.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822723003
>
> Committed: https://skia.googlesource.com/skia/+/c885dacfe4625af8b0e2e5c6e8a8ae8dc2d620a8

TBR=egdaniel@google.com,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1918203002
2016-04-26 05:07:23 -07:00
bsalomon
c885dacfe4 Add initial implementation of GrShape and GrStyle classes and tests
The initial intent is to use GrShape to simplify the mask blur code paths. However, I also want to use this to explore a more unified drawing code flow for different geometry types. The goal is to have a single representation for geometries+styling that attempts to always keep the geometry in the simplest form (e.g. preferring rrects to paths). It also allows for converting styling information into modified geometry and for computing consistent keys.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1822723003

Review URL: https://codereview.chromium.org/1822723003
2016-04-25 13:37:22 -07:00
djsollen
460f40507e Make clang the default Android compiler.
BUG=skia:5215
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919873003

Review URL: https://codereview.chromium.org/1919873003
2016-04-25 11:45:35 -07:00
rmistry
8d965a612e Test decoding and output failures to JSON in get_images_from_skps.
Testing for decoding was copy pasted from msarett's CL https://codereview.chromium.org/1828323002/

BUG=skia:4981
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1844713003

Review URL: https://codereview.chromium.org/1844713003
2016-04-25 10:35:03 -07:00
halcanary
ada338ab4e utils.gypi: remove empty file SkMD5.cpp
Review URL: https://codereview.chromium.org/1905363002
2016-04-22 07:45:38 -07:00
halcanary
488165e689 SkPDF: PDF/A runtime switch
TODO: remove gyp variable and modify API  in SkDocument.h

SkMD5 now moved into core as pdf depends on it now.

BUG=skia:3110
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1891873002

Committed: https://skia.googlesource.com/skia/+/570f18b43417d73c3fbd113cc0b4258e08b14c82

Review URL: https://codereview.chromium.org/1891873002
2016-04-22 06:10:21 -07:00
jvanverth
b0d4352ca6 Revise WSI setup.
- Set up present queue creation correctly.
- Move WSI functions to VulkanTestContext.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1899213002

Review URL: https://codereview.chromium.org/1899213002
2016-04-21 11:46:23 -07:00
djsollen
12d62a7d51 VulkanViewer on Android
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903253003

Review URL: https://codereview.chromium.org/1903253003
2016-04-21 07:59:44 -07:00
herb
9bc22351b5 Make all the codecs default profiles based on gTreatSkColorAsSRGB.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893203006

Review URL: https://codereview.chromium.org/1893203006
2016-04-20 15:07:32 -07:00
brianosman
82996b8200 Get skiaserve working on Windows.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903203003

Review URL: https://codereview.chromium.org/1903203003
2016-04-20 10:52:54 -07:00
halcanary
906021334f gyp: add osmesa target to factor out common code
Test this out with `GYP_DEFINES=skia_mesa=1`.

Also uses the `library_dirs` keyword, which is relatively new.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1903233002

Review URL: https://codereview.chromium.org/1903233002
2016-04-20 08:49:53 -07:00
egdaniel
09aa1fce69 Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.

A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.

In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers

For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004

Committed: https://skia.googlesource.com/skia/+/45b61a1c4c0be896e7b12fd1405abfece799114f

Review URL: https://codereview.chromium.org/1885863004
2016-04-20 07:09:46 -07:00
egdaniel
b800248c73 Revert of Refactor how we store and use samplers in Ganesh (patchset #7 id:120001 of https://codereview.chromium.org/1885863004/ )
Reason for revert:
breaking bots

Original issue's description:
> Refactor how we store and use samplers in Ganesh
>
> The main goal of this refactorization is to allow Vulkan to use separate
> sampler and texture objects in the shader and descriptor sets and combine
> them into a sampler2d in the shader where needed.
>
> A large part of this is separating how we store samplers and uniforms in the
> UniformHandler. We no longer need to store handles to samplers besides when
> we are initially emitting code. After we emit code all we ever do is loop over
> all samplers and do some processor independent work on them, so we have no need
> for direct access to individual samplers.
>
> In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
> touch them again, so no need to save sampler info there. The texture access on
> program reuse just assume that they come in the same order as we set the texture
> units for the samplers
>
> For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
> then when we get new textures, we just assume they come in in the same order as we
> set the samplers on the descriptor sets. Thus no need to save direct vulkan info.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004
>
> Committed: https://skia.googlesource.com/skia/+/45b61a1c4c0be896e7b12fd1405abfece799114f

TBR=bsalomon@google.com,jvanverth@google.com,cdalton@nvidia.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1896013003
2016-04-19 15:24:29 -07:00
egdaniel
45b61a1c4c Refactor how we store and use samplers in Ganesh
The main goal of this refactorization is to allow Vulkan to use separate
sampler and texture objects in the shader and descriptor sets and combine
them into a sampler2d in the shader where needed.

A large part of this is separating how we store samplers and uniforms in the
UniformHandler. We no longer need to store handles to samplers besides when
we are initially emitting code. After we emit code all we ever do is loop over
all samplers and do some processor independent work on them, so we have no need
for direct access to individual samplers.

In the GLProgram all we ever do is set the sampler uniforms in the ctor and never
touch them again, so no need to save sampler info there. The texture access on
program reuse just assume that they come in the same order as we set the texture
units for the samplers

For Vulkan, it is a similar story. We create the descriptor set layouts with the samplers,
then when we get new textures, we just assume they come in in the same order as we
set the samplers on the descriptor sets. Thus no need to save direct vulkan info.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1885863004

Review URL: https://codereview.chromium.org/1885863004
2016-04-19 14:45:57 -07:00
mtklein
4311f01661 Move CPU feature detection to its own file.
- Moves CPU feature detection to its own file.
   - Cleans up some redundant feature detection scattered around core/ and opts/.
   - Can now detect a few new CPU features:
       * F16C     -> Intel f16<->f32 instructions, added between AVX and AVX2
       * FMA      -> Intel FMA instructions, added at the same time as AVX2
       * VFP_FP16 -> ARM f16<->f32 instructions, quite common
       * NEON_FMA -> ARM FMA instructions, also quite common
       * SSE and SSE3... why not?

This new internal API makes it very cheap to do fine-grained runtime CPU
feature detection.  Redundant calls to SkCpu::Supports() should be eliminated
and it's hoistable out of loops.  It compiles away entirely when we have the
appropriate instructions available at compile time.

This means we can call it to guard even a little snippet of 1 or 2 instructions
right where needed and let inlining hoist the check (if any at all) up to
somewhere that doesn't hurt performance.  I've explained how I made this work
in the private section of the new header.

Once this lands and bakes a bit, I'll start following up with CLs to use it more
and to add a bunch of those little 1-2 instruction snippets we've been wanting,
e.g. cvtps2ph, cvtph2ps, ptest, pmulld, pmovzxbd, blendvps, pshufb, roundps
(for floor) on x86, and vcvt.f32.f16, vcvt.f16.f32 on ARM.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1890483002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/872ea29357439f05b1f6995dd300fc054733e607

Review URL: https://codereview.chromium.org/1890483002
2016-04-19 14:00:13 -07:00
brianosman
7831295c63 Adding support for playback to L32/S32/F16 canvas.
Playback of my test GM works correctly on both raster and GPU, in all three modes.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1893393002

Review URL: https://codereview.chromium.org/1893393002
2016-04-19 10:16:53 -07:00
brianosman
3c579dcff8 Move DM png code to picture_utils, for use by other tools.
Planning to re-use this code in skiaserve in an upcoming change.

TBR=mtklein@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1901113002

Review URL: https://codereview.chromium.org/1901113002
2016-04-19 09:18:11 -07:00