Commit Graph

3655 Commits

Author SHA1 Message Date
msarett
ded0f26a93 Keep SkColorSpace and SkColorProfileType in sync
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2068743003

Committed: https://skia.googlesource.com/skia/+/04d35bd80dde7cace866781037cbbdcab14ab683
Review-Url: https://codereview.chromium.org/2068743003
2016-06-16 05:33:31 -07:00
egdaniel
d2fd9e9f4f Revert of Keep SkColorSpace and SkColorProfileType in sync (patchset #2 id:20001 of https://codereview.chromium.org/2068743003/ )
Reason for revert:
breaking roll.

../../third_party/skia/include/core/SkImageInfo.h:202: error: undefined reference to 'SkColorSpace::NewNamed(SkColorSpace::Named)'

Original issue's description:
> Keep SkColorSpace and SkColorProfileType in sync
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2068743003
>
> Committed: https://skia.googlesource.com/skia/+/04d35bd80dde7cace866781037cbbdcab14ab683

TBR=reed@google.com,brianosman@google.com,herb@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/2073593002
2016-06-15 15:39:13 -07:00
egdaniel
4132de7069 Revert of Refactoring of GPU NormalMap handling out into its own class (patchset #9 id:160001 of https://codereview.chromium.org/2043393002/ )
Reason for revert:
break deps roll

Original issue's description:
> Refactoring of GPU NormalMap handling out into its own class.
>
> The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.
>
> What this CL includes:
>
> - Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.
>
> - Encapsulates this new fragment processor on a new class NormalMapSource.
>
> - Created a NormalSource abstraction that will interface with SkLightingShader.
>
> - Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043393002
>
> Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da
> Committed: https://skia.googlesource.com/skia/+/a7d1e2a57aef2aa4913d4380646d60bbab761318

TBR=reed@google.com,dvonbeck@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/2068983005
2016-06-15 14:28:18 -07:00
msarett
04d35bd80d Keep SkColorSpace and SkColorProfileType in sync
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2068743003

Review-Url: https://codereview.chromium.org/2068743003
2016-06-15 12:12:48 -07:00
dvonbeck
a7d1e2a57a Refactoring of GPU NormalMap handling out into its own class.
The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.

What this CL includes:

- Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.

- Encapsulates this new fragment processor on a new class NormalMapSource.

- Created a NormalSource abstraction that will interface with SkLightingShader.

- Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.

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

Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da
Review-Url: https://codereview.chromium.org/2043393002
2016-06-15 12:07:56 -07:00
egdaniel
da743935fa Revert of Refactoring of GPU NormalMap handling out into its own class (patchset #7 id:120001 of https://codereview.chromium.org/2043393002/ )
Reason for revert:
Breaking build and deps roll. Need to move include of SkBitmapProcShader in SkLightingShader.cpp from gpu include list to general list.

Original issue's description:
> Refactoring of GPU NormalMap handling out into its own class.
>
> The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.
>
> What this CL includes:
>
> - Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.
>
> - Encapsulates this new fragment processor on a new class NormalMapSource.
>
> - Created a NormalSource abstraction that will interface with SkLightingShader.
>
> - Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2043393002
>
> Committed: https://skia.googlesource.com/skia/+/87b0dd00cf9409c5fc990f5d0bb7c0df837f08da

TBR=reed@google.com,dvonbeck@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/2062133004
2016-06-14 15:30:05 -07:00
dvonbeck
87b0dd00cf Refactoring of GPU NormalMap handling out into its own class.
The purpose of this change is to refactor the handling of normal maps out of SkLightingShader, laying the groundwork to eventually allow for multiple normal sources.

What this CL includes:

- Created a new 'NormalMapFP', out of the existing normal map reading behavior in LightingFP.

- Encapsulates this new fragment processor on a new class NormalMapSource.

- Created a NormalSource abstraction that will interface with SkLightingShader.

- Adapted SkLightingShader to use the normals from its NormalSource field ON THE GPU SIDE. No changes done to the CPU side yet.

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

Review-Url: https://codereview.chromium.org/2043393002
2016-06-14 14:43:52 -07:00
mtklein
f8f9c07c28 Revert of Update typeface serialization style. (patchset #3 id:40001 of https://codereview.chromium.org/2030683002/ )
Reason for revert:
serialize-8888 broken for typefacestyles on Mac.  (Bold weighting goes missing.)

Original issue's description:
> Update typeface serialization style.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2030683002
>
> Committed: https://skia.googlesource.com/skia/+/7ae1c72e593823e6e300e4199558555765bcec17

TBR=reed@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/2067583002
2016-06-13 11:27:55 -07:00
ericrk
b4da01d8f7 Add prescale option to deferred params
Currently, Skia always uploads GPU textures at full resolution. This
change allows us to pass a pre-scale mip level to the
deferred texture image logic, which causes us to pre-scale the image
to the given mip level, and upload that mip level instead of the full
image.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007113008

Review-Url: https://codereview.chromium.org/2007113008
2016-06-13 11:18:14 -07:00
bungeman
7ae1c72e59 Update typeface serialization style.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2030683002

Review-Url: https://codereview.chromium.org/2030683002
2016-06-13 10:35:05 -07:00
mtklein
e18fa440e7 Move immintrin/arm_neon includes to where they are used.
On my Mac (so, immintrin), this improves compile time, both wall and cpu,
by about 16%.  To test I ran this on an SSD with files hot in their caches:

  $ env CC=/usr/bin/clang CXX=/usr/bin/clang++ ./gyp_skia && \
    ninja -C out/Release -t clean && \
    time ninja -C out/Release

  Before: 159 wall / 3367 cpu
          159 wall / 3368 cpu

  After:  137 wall / 2860 cpu
          136 wall / 2863 cpu

I also tried further refining immintrin down to emmintrin / tmmintrin / smmintrin etc.
That made no signficant difference, so I've kept immintrin for its simplicity.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2045633002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

Committed: https://skia.googlesource.com/skia/+/12dfaaa53c23f3d03050bde8f64136ac1f44164a
Review-Url: https://codereview.chromium.org/2045633002
2016-06-09 13:40:56 -07:00
jbauman
b445a57e6c Add NV12 texture conversion support.
If textures 1 and 2 passed into MakeFromYUVTexturesCopy are the same,
then treat the input as NV12 and sample from the g component of texture
2.

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

Review-Url: https://codereview.chromium.org/2016593002
2016-06-09 13:24:48 -07:00
senorblanco
ea97673563 SkPictureAnalyzer: expose the number of slow GPU commands.
BUG=614724
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2031243003

Review-Url: https://codereview.chromium.org/2031243003
2016-06-09 12:43:30 -07:00
msarett
804b461bc4 SkPixmap::setColorSpace
Landed for reed@ with bug fix:
Use default copy constructor for SkDraw

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

patch from issue 2057563002 at patchset 1 (http://crrev.com/2057563002#ps1)

Review-Url: https://codereview.chromium.org/2052943002
2016-06-09 11:03:45 -07:00
bungeman
06ca8ec87c sk_sp for Ganesh.
Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.

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

Review-Url: https://codereview.chromium.org/2041113004
2016-06-09 08:01:03 -07:00
halcanary
4dbbd04314 SkLeanWindows.h: #include "Windows.h" fewer places
$ git grep -l '<windows.h>' include src
    include/private/SkLeanWindows.h

    $ git grep -l SkLeanWindows.h | grep '\.h$'
    include/ports/SkTypeface_win.h
    include/utils/win/SkHRESULT.h
    include/utils/win/SkTScopedComPtr.h
    include/views/SkEvent.h
    src/core/SkMathPriv.h
    src/ports/SkTypeface_win_dw.h
    src/utils/SkThreadUtils_win.h
    src/utils/win/SkWGL.h

The same for  `#include <intrin.h>` that was found in SkMath.h.
Those functions that needed it are moved to SkMathPriv.h.

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

CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng

Review-Url: https://codereview.chromium.org/2041943002
2016-06-07 17:21:10 -07:00
mtklein
50bcb189f8 Revert of Move immintrin/arm_neon includes to where they are used. (patchset #2 id:20001 of https://codereview.chromium.org/2045633002/ )
Reason for revert:
Appears to have broken the ARMv7 aspect of the Google3 roll in bizarre seemingly-unrelated ways.

Original issue's description:
> Move immintrin/arm_neon includes to where they are used.
>
> On my Mac (so, immintrin), this improves compile time, both wall and cpu,
> by about 16%.  To test I ran this on an SSD with files hot in their caches:
>
>   $ env CC=/usr/bin/clang CXX=/usr/bin/clang++ ./gyp_skia && \
>     ninja -C out/Release -t clean && \
>     time ninja -C out/Release
>
>   Before: 159 wall / 3367 cpu
>           159 wall / 3368 cpu
>
>   After:  137 wall / 2860 cpu
>           136 wall / 2863 cpu
>
> I also tried further refining immintrin down to emmintrin / tmmintrin / smmintrin etc.
> That made no signficant difference, so I've kept immintrin for its simplicity.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2045633002
> CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> TBR=reed@google.com
> No public API changes.
>
> Committed: https://skia.googlesource.com/skia/+/12dfaaa53c23f3d03050bde8f64136ac1f44164a

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/2046213002
2016-06-07 16:46:39 -07:00
mtklein
12dfaaa53c Move immintrin/arm_neon includes to where they are used.
On my Mac (so, immintrin), this improves compile time, both wall and cpu,
by about 16%.  To test I ran this on an SSD with files hot in their caches:

  $ env CC=/usr/bin/clang CXX=/usr/bin/clang++ ./gyp_skia && \
    ninja -C out/Release -t clean && \
    time ninja -C out/Release

  Before: 159 wall / 3367 cpu
          159 wall / 3368 cpu

  After:  137 wall / 2860 cpu
          136 wall / 2863 cpu

I also tried further refining immintrin down to emmintrin / tmmintrin / smmintrin etc.
That made no signficant difference, so I've kept immintrin for its simplicity.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2045633002
CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

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

Review-Url: https://codereview.chromium.org/2045633002
2016-06-07 09:35:28 -07:00
bsalomon
ee295645bd Make GrShape track the winding direction and starting point for rrect types.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042813002

Review-Url: https://codereview.chromium.org/2042813002
2016-06-06 14:01:25 -07:00
brianosman
982eb7f377 Add new SkSourceGammaTreatment enum, used in situations like mipmap construction, where we need to know if we should respect (vs. ignore) the gamma encoding of sRGB tagged images. Plumb that extensively.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2037413002

Review-Url: https://codereview.chromium.org/2037413002
2016-06-06 13:10:58 -07:00
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
bungeman
69df020625 Remove some uses of SK_SUPPORT_LEGACY_TYPEFACE_PTR.
Some of the deprecated signatures are no longer used by any known
client, so remove them now to prevent future use.

TBR=reed
This doesn't add API, it just removes it.

Review-Url: https://codereview.chromium.org/2036993003
2016-06-03 14:35:06 -07:00
cblume
186d2d430b Plumbing mipmaps to the point of creation.
When creating a DeferredTextureImage we may create mipmaps.
Those mipmaps need to then be passed along for when the texture is
actually created.

R=bsalomon@google.com
BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2031273002

Review-Url: https://codereview.chromium.org/2031273002
2016-06-03 11:17:42 -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
caryclark
ae92262f3b fix windows assert
Windows asserts trigger out of memory stack traces that
are confusing. This permits windows to break more
directly, stopping the IDE at the assert and providing
a less confusing stacktrace outside of the IDE.

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

Review-Url: https://codereview.chromium.org/2039443002
2016-06-03 09:42:53 -07:00
reed
fbce71f1ae add MakeS32 helper to SkImageInfo, fix named-gamma constructor bug
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2035813003

Review-Url: https://codereview.chromium.org/2035813003
2016-06-02 12:40:22 -07:00
bungeman
da1aedaf13 Remove SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME.
The define SK_SUPPORT_LEGACY_TYPEFACE_MAKE_FROM_NAME is no longer used
by any clients and the code it guards can now be removed as well.

TBR=reed
This just removes dead code.

Review-Url: https://codereview.chromium.org/2030983002
2016-06-02 10:47:19 -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
mboc
ee6a9919a3 SkTypeface::MakeFromName to take SkFontStyle.
SkTypeface::MakeFromName currently takes SkTypeface::Style,
which is quite limited. This starts the transition to this
function taking SkFontStyle instead.

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

TBR=reed
He said it sounded like a good idea.

Review-Url: https://codereview.chromium.org/1818043002
2016-05-31 11:42:37 -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
fmalita
019db3fe88 Remove unused SkPictureGpuAnalyzer::analyze()
After https://crrev.com/c64bd21780da13051846ae45b54a1e6c6bf6ac52,
Chromium no longer uses analyze().

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

Review-Url: https://codereview.chromium.org/2014983002
2016-05-31 06:32:57 -07:00
bsalomon
78d58d1084 Make SkPath::isOval() and SkPath::isRRect return the orientation and starting index.
These are tracked in SkPathRef.

Unit tests are updated to test that the returned values are correct.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2012233002

Review-Url: https://codereview.chromium.org/2012233002
2016-05-27 09:17:04 -07:00
msarett
23c5110ba2 Add SkColorSpace to SkImageInfo
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=2000713003

Review-Url: https://codereview.chromium.org/2000713003
2016-05-27 07:39:02 -07:00
fmalita
b5fc58e1de Complex clipPath accounting
Add a clipPath heuristic to SkPathCounter, and extend
SkPictureGpuAnalyzer to support external clipPath() op accounting.

BUG=skia:5347
R=reed@google.com,mtklein@google.com,senorblanco@chromium.org,bsalomon@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2000423005

Review-Url: https://codereview.chromium.org/2000423005
2016-05-25 11:31:04 -07:00
bsalomon
7a5bcc5f59 Make Sk32ToBool inline again to silence compiler warning.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2007753003

Review-Url: https://codereview.chromium.org/2007753003
2016-05-24 13:23:56 -07:00
msarett
e077e0683a SkColorSpace tweaks
***Move includes to the correct file
***Add "const"
***Use std::move for more efficient refs and unrefs

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

Review-Url: https://codereview.chromium.org/2005263002
2016-05-24 10:16:53 -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
halcanary
a0af771612 SkTypes: use constexpr when appropriate
motivation: https://codereview.chromium.org/2000853003

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

Review-Url: https://codereview.chromium.org/2004073002
2016-05-23 09:11:59 -07:00
senorblanco
5878dbdf1b Image filters: implement SkImage::makeWithFilter().
This API provides a way to directly filter a subregion of an SkImage
(usually texture-backed), and returns an SkImage which may include
extra padding, along with a size to indicate the active region.

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

Review-Url: https://codereview.chromium.org/1964043002
2016-05-19 14:50:29 -07:00
hcm
0876158ecd Update Skia milestone to 53 after 52 branch
TBR=reed@google.com

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

Review-Url: https://codereview.chromium.org/1993203002
2016-05-19 05:26:57 -07:00
tomhudson
cb3bd18a4b SkCanvas::adjustToTopLayer()
Given a matrix and a clip bounds, offsets them to reflect the difference
between device coordinates and global coordinates. Useful when a client
wants an OS-specific backing for a canvas.

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

Review-Url: https://codereview.chromium.org/1986383002
2016-05-18 07:24:16 -07:00
msarett
b1be46b1d9 Ensure that SkColorTable->fCount is set properly after decodes
We now have some blits that will process the color table.

If we erroneously report that the size of the color table is 256,
we will do extra work and annoy MSAN.

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

Review-Url: https://codereview.chromium.org/1982753002
2016-05-17 08:52:11 -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
bsalomon
9fb420393e Add bounds to GrShape
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970003003

Review-Url: https://codereview.chromium.org/1970003003
2016-05-13 09:23:38 -07:00
robertphillips
f054b1766b Swap SkGpuBlurUtils over to using SkIRects
We don't have to land this, but I found it more comforting for the blurring code to explicitly deal with SkIRects rather than SkRects with integer values.

Split out of: https://codereview.chromium.org/1959493002/ (Retract GrRenderTarget from SkGpuBlurUtils)

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

Review-Url: https://codereview.chromium.org/1968603003
2016-05-13 05:06:19 -07:00
fmalita
1e2e33a74d Remove SkPicture::hasText()
No longer used in Chromium.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978533002

Review-Url: https://codereview.chromium.org/1978533002
2016-05-12 10:53:49 -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
bungeman
6296da736f Move SkTypeface to sk_sp.
Review-Url: https://codereview.chromium.org/1933393002
2016-05-11 12:38:18 -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
reed
82595b6fa4 refactor drawPath to have drawDevPath
pre-CL for larger change to support read-only paths

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

TBR=

Review-Url: https://codereview.chromium.org/1957263003
2016-05-09 17:48:46 -07:00
bsalomon
1b4c01c660 Make SkAssertResult work with SK_WARN_UNUSED_RESULT in Release on gcc
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962723003

Review-Url: https://codereview.chromium.org/1962723003
2016-05-09 12:35:17 -07:00
bsalomon
9daa4b92d7 No error if function marked with SK_WARN_UNUSED_RESULT is used in SkAssertResult
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955263002

Review-Url: https://codereview.chromium.org/1955263002
2016-05-09 09:14:36 -07:00
halcanary
3767cd6cff https://groups.google.com/forum/#!topic/skia-discuss/2F2she2nQMg
No public API changes.
TBR=reed@google.com

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

Review-Url: https://codereview.chromium.org/1957503002
2016-05-06 08:03:44 -07:00
bsalomon
055e192adc Take SkStrokeRec::InitStyle rather than SkPaint::Style in mask filter and DrawMask
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955633002

Review-Url: https://codereview.chromium.org/1955633002
2016-05-06 07:22:58 -07:00
sclittle
d9f5d20f81 Revert of Modernize SkMutex and SkSemaphore. (patchset #2 id:20001 of https://codereview.chromium.org/1947153002/ )
Reason for revert:
This CL seems to have broken the Linux x64 and Mac
bots, e.g.

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

The error appears to have something to do with new static initializers being
added.

Original issue's description:
> Modernize SkMutex and SkSemaphore.
>
>    - use <atomic>
>    - fuse SkMutex and SkBaseMutex
>    - fuse SkSemaphore and SkBaseSemaphore
>
> Still TODO:
>    - replace SK_DECLARE_STATIC_MUTEX(name) with static SkMutex name
>
> I just didn't want to bother fixing all that up until I know this CL sticks.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1947153002
>
> No public API changes.
> TBR=reed@google.com
>
> Committed: https://skia.googlesource.com/skia/+/427c2819d9237d7d7729c59238036cfc73c072ea

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

Review-Url: https://codereview.chromium.org/1945343003
2016-05-04 18:23:30 -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
mtklein
427c2819d9 Modernize SkMutex and SkSemaphore.
- use <atomic>
   - fuse SkMutex and SkBaseMutex
   - fuse SkSemaphore and SkBaseSemaphore

Still TODO:
   - replace SK_DECLARE_STATIC_MUTEX(name) with static SkMutex name

I just didn't want to bother fixing all that up until I know this CL sticks.

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

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

Review-Url: https://codereview.chromium.org/1947153002
2016-05-04 11:31:29 -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
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
bungeman
68f7460fd1 Add SK_API to SkFontLCDConfig.
This will allow transition from double deprecated SkFontHost.

TBR=reed
This is obviously needed to remove other code.

Review-Url: https://codereview.chromium.org/1951463002
2016-05-03 11:56:03 -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
jvanverth
db1adf5989 Revert of Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRender… (patchset #9 id:150001 of https://codereview.chromium.org/1924183003/ )
Reason for revert:
Appears to be breaking the roll.

Original issue's description:
> Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget
>
> This is a regression from "Refactor to separate backend object lifecycle
> and GpuResource budget decision".
>
> GrGLRenderTarget::CreateWrapped creates only render targets that wrap
> the FBO.
> GrGLRenderTargetTexture::CreateWrapped creates render targets that
> wrap the texture.
>
> Use the latter as the implementation for
> SkSurface::MakeFromBackendTextureAsRenderTarget.
>
>
> BUG=608238
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1924183003
>
> Committed: https://skia.googlesource.com/skia/+/fe635fd76bbc375d527d1884af23cc617ca364ee
>
> Committed: https://skia.googlesource.com/skia/+/1cb00e42bff455e23f6883bf09680438fa631224

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

Review-Url: https://codereview.chromium.org/1943843002
2016-05-03 05:37:46 -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
kkinnunen
1cb00e42bf Make stencils be attachable to render targets created via SkSurface::MakeFromBackendTextureAsRenderTarget
This is a regression from "Refactor to separate backend object lifecycle
and GpuResource budget decision".

GrGLRenderTarget::CreateWrapped creates only render targets that wrap
the FBO.
GrGLRenderTargetTexture::CreateWrapped creates render targets that
wrap the texture.

Use the latter as the implementation for
SkSurface::MakeFromBackendTextureAsRenderTarget.

BUG=608238

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

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

Review-Url: https://codereview.chromium.org/1924183003
2016-05-02 23:16:42 -07:00
aam
cf975447a8 Make SkTime SK_API so that SkTime::GetDateTime() is visible to the clients.
# begin mtklein edits...
No public API changes.
TBR=reed@google.com
# end mtklein edits

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

Review-Url: https://codereview.chromium.org/1930863003
2016-05-02 15:04:46 -07:00
brianosman
18f13f3673 Remove (almost) unused read/writeFunctionPtr API.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1937053002

Review-Url: https://codereview.chromium.org/1937053002
2016-05-02 07:51:08 -07:00
mtklein
59c12e3f00 remove non-static uses of SkOncePtr
Still slowly working through all the SK_DECLARE_STATIC_FOO macros.

SkOncePtr is complicating things by having SkOncePtr delete its pointer
and SkBaseOncePtr not.  Simplify things by removing SkOncePtr, leaving
only the leaky SkBaseOncePtr.

We replace SkOncePtr<T> instead with SkOnce and T.  In most cases this
did not need to be a pointer, and in some cases here we're even saving
a few bytes by replacing SkOncePtr<T> with SkOnce and a T.

The dependency map of SK_DECLARE_STATIC_FOO is:
  SkBaseMutex -> SkBaseSemaphore -> SkBaseOncePtr

They're intertwined enough that I think I've got to do all three in one
next CL.

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

Review-Url: https://codereview.chromium.org/1939503002
2016-05-02 07:19:41 -07:00
brianosman
57b4615974 Remove unused encodedString API on SkWriteBuffer/SkReadBuffer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1936103002

Review-Url: https://codereview.chromium.org/1936103002
2016-05-02 07:09:25 -07:00
aleksandar.stojiljkovic
9516775857 Enable generating SkImage with the same uniqueID in SkImageGenerator subclass
Enable reusing uniqueID when instantiating SkImageGenerator subclasses enables
using uniqueID in client code to cache generated bitmaps with no need to keep
the reference to SkImageGenerator.

This is a bug fix for out of memory cause in chromium and 100% CPU usage
described in issue 165750#13:
- cache uses SkImage::uniqueID() to cache decoded bitmaps.
- every animation loop creates new SkImage instances.
- after decoding, bitmap copies are added to cache, filling it up with
duplicates of previous loops frames.

BUG=165750

Blink patch that depends on this:
https://codereview.chromium.org/1925533003/
"High CPU and increased memory usage fix for high-res (GIF, WEBP...) animations."

Review-Url: https://codereview.chromium.org/1928403002
2016-05-02 01:43:38 -07:00
mtklein
4d9ff62fa2 Remove SkWriter32::contiguousArray().
This method requires SkWriter32 have a contiguous array.
It does, and I plan to keep it that way (last time we checked
it's faster), but this turns that feature back into an
implementation detail.

This feature is only used by another unused feature, deep copies of
ops arrays in SkPictureData.  Kill that, kill this.

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

Depends on https://codereview.chromium.org/1936563002/

Only deleting API
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/1932223003
2016-04-29 14:45:36 -07:00
mtklein
b4c899d48d remove SkWriteBuffer::getWriter32().
SkWriteBuffer exposes its lower-level implementation SkWriter32 through
this one call.  It's not currently used in any interesting way:
   - write_encoded_bitmap() uses it to manually re-create writeDataAsByteArray();
   - unit tests use it incidentally as a quick way to read the serialized bytes.

This should be SkWriteBuffer no longer necessarily needs to have an SkWriter32.

Landing this will let us then remove SkWriter32::contiguousArray().

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

TBR=reed@google.com
Just deleting API

Review-Url: https://codereview.chromium.org/1936563002
2016-04-29 13:58:09 -07:00
mtklein
1b5dd88454 remove SkWriteBuffer::reserve()
We're not using it for anything that we can't do using the clearer writeFoo()/readFoo() methods.

The deletions in SkPictureFlat.{h,cpp} and BitmapHeapTest.cpp clean up dead code.
This code has not been used for a long time.  I happened to notice it because it
was another caller of reserve() (in a terrifyingly hacking/interesting way that
I bet we'll find I authored...)

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

Deleting APIs unused publicly.
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/1930103003
2016-04-29 08:46:41 -07:00
bsalomon
5668648e87 Unify implementations of stroking radius calculationsns
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1928133002

Review-Url: https://codereview.chromium.org/1928133002
2016-04-29 07:07:03 -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
robertphillips
175dd9b5e3 Clean up test drawContext usage
The general idea is to provide access to SkGpuDevice's drawContext rather than its GrRenderTarget. That is usually what the testing framework actually wants.

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

Review-Url: https://codereview.chromium.org/1930623003
2016-04-28 14:32:04 -07:00
bungeman
801b44c453 Remove skstd::is_convertible.
We should now be able to use std::is_convertible.

TBR=reed@google.com
This doesn't change any API, just where we get a type trait from.

Review-Url: https://codereview.chromium.org/1931003002
2016-04-28 11:18:07 -07:00
reed
d77ac77924 remove (now unused) SkDivBits
needs https://codereview.chromium.org/1927823002/ to land first

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

Review-Url: https://codereview.chromium.org/1925913002
2016-04-28 09:31:31 -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
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
halcanary
eabaf79824 SkDocument::CreateXPS fix roll
NOTRY=true
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/1918713006
2016-04-27 12:07:55 -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
bungeman
b4bb7d8255 Add oblique as a slant.
Some fonts have italic and oblique in the same family, see

http://lucidafonts.com/fonts/family/lucida-sans
http://www.gust.org.pl/projects/e-foundry/latin-modern

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

Chromium side change at https://crrev.com/1921503006/ .

Review-Url: https://codereview.chromium.org/1921903002
2016-04-27 10:21:05 -07:00
reed
1e7f5e708e remove 'deprecated' region from SkDraw
Most call-sites that used it just took its bounds, so it was trivial to convert them
to get the bounds of the RasterClip. Two clients wanted the actual region:
1. layeriter for android
2. pdf

Android already only has BW clips, so should be safe.
PDF now overrides its clip methods to ensure that all clips are BW.

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

Review URL: https://codereview.chromium.org/1925693002
2016-04-27 07:49: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
reed
86ae3d1614 make context() virtual on device
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1922123002

TBR=robertphilips

Review URL: https://codereview.chromium.org/1922123002
2016-04-26 06:57:31 -07:00
reed
96a04f3299 simplify handle-affine: subclass overrides just describe their leaf behavior
added new test case (that would have failed before) of blur with a colorfilter input

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

Review URL: https://codereview.chromium.org/1915943002
2016-04-25 09:25:15 -07:00
msarett
edf7fcd8b9 Make SkDrawable an SkFlattenable
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1911403004

Review URL: https://codereview.chromium.org/1911403004
2016-04-25 06:40:26 -07:00
reed
bb34a8ac59 allow imagefilter to manage CTM decomposition
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908173006

Review URL: https://codereview.chromium.org/1908173006
2016-04-23 15:19:07 -07:00
robertphillips
36736a2dae Remove SkCanvas::LayerIter guard
The LayerIter is no longer required by the Bazel build.

TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1917693002
2016-04-23 08:26:44 -07:00
msarett
a3b3b238f5 Enable flattening/unflattening with custom unflatten procs
Now flattenables are serialized using a string name, so that
flattenables do not necessarily need to be registered before
serialization.  They just need to override getTypeName().

Allows custom unflatten procs to be set on the SkReadBuffer.
This is optional if the flattenable is registered, but otherwise
must be called.

This was split off from:
https://codereview.chromium.org/1837913003/

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

Review URL: https://codereview.chromium.org/1858323002
2016-04-22 12:43:07 -07:00
robertphillips
99e20891a0 Optionally enable SkValidatingReadBuffer in SkPictureImageFilter
The task here is to get the type of ReadBuffer being used in SkPicture::MakeFromBuffer mirrored in the down-stack SkPicturePlayback::draw call.

BUG=skia:5208

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

Review URL: https://codereview.chromium.org/1918433002
2016-04-22 11:40:42 -07:00
robertphillips
7715e06b68 Retract SkDevice a bit more
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1905383002

Review URL: https://codereview.chromium.org/1905383002
2016-04-22 10:57:16 -07:00
scroggo
6351640285 Fixes for SkRWBuffer
Do not call SkBufferHead::validate in SkROBuffer's destructor, which
may be called in a separate thread from SkRWBuffer::append. validate()
reads SkBufferBlock::fUsed, and append() writes to it, resulting in
a data race.

Update some comments to be more clear about how it is safe to use
these classes across threads.

Test the readers in separate threads.

In addition, make sure it is safe to create a reader even when no
data has been appended. Add tests for this case.

Mark a parameter to SkBufferHead::validate() as const, reflecting
its use.

BUG=chromium:601578
BUG=chromium:605479

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

Review URL: https://codereview.chromium.org/1871953002
2016-04-22 06:59:01 -07:00
robertphillips
cb61a6452f Add compile guard for SkCanvas::LayerIter
TBR=reed@google.com

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

Review URL: https://codereview.chromium.org/1911893002
2016-04-21 15:22:14 -07:00
robertphillips
da2cd8b1d9 Hide SkCanvas::LayerIter
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1897863008

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

Review URL: https://codereview.chromium.org/1897863008
2016-04-21 11:05:33 -07:00