Commit Graph

8169 Commits

Author SHA1 Message Date
Cary Clark
ecf548bf8a update autogenerated includes
SkImageInfo.h is generated for the first time.
Minor corrections in the other includes.

TBR=reed@google.com
Bug: skia:6898
Change-Id: I9a16753e234ace3bfbcc5b58381347fd0e63b1c8
Reviewed-on: https://skia-review.googlesource.com/118168
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Cary Clark <caryclark@skia.org>
2018-04-03 16:33:10 +00:00
Mike Klein
22c1f373b7 Revert "implement SkTDArray with std::vector"
This reverts commit 80e1d56e19.

Reason for revert: SkRTree.cpp:57 asserting, probably this?

Original change's description:
> implement SkTDArray with std::vector
> 
> It's always worth seeing if we can get away with replacing custom data
> structures with ones from the standard library.  Our array-like types
> are all good candidates to replace with std::vector, and it's especially
> easy to start with SkTDArray.  Unlike the others, it has no preallocated
> S-variant, which is tricky to make work with std::vector.
> 
> SkTDArray also has known integer overflow bugs, leading to out of range
> writes.  It'd be _very_ nice to ditch it for a better standard vector.
> 
> I removed a bunch of unused or little-used methods, and updated a couple
> call sites that used methods in unusual or dangerous ways.
> 
> I've had to tweak GrAAConvexTessellator and SkBaseShadowTessellator just
> a touch to work within the constraints of an std::vector impl.  It's not
> intended to be legal to write to the reserved-but-not-counted elements
> of an SkTDArray, but you can get away with it in our old implementation.
> This version now uses setCount() to actually reserve and count them, and
> should have the same performance and use the same amount of memory.
> 
> The PathMeasure_explosion GM I added recently to reproduce this bug now
> draws without triggering undefined behavior or ASAN errors, provided you
> have ~40GB of RAM.
> 
> Bug: skia:7674
> 
> Change-Id: I4eacae18a976cd4a6d218102f8ca5d973d4d7d0e
> Reviewed-on: https://skia-review.googlesource.com/115982
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

TBR=mtklein@chromium.org,bungeman@google.com,brianosman@google.com

Change-Id: Icffd9f22fe89746a970ff598e1a05c774960bc0e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7674
Reviewed-on: https://skia-review.googlesource.com/117901
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-04-02 20:37:52 +00:00
Mike Klein
224edf0a3c Revert "In older STLs, std::vector::insert() returns void."
This reverts commit 7dd8ee9c60.

Reason for revert: going to revert primary CL

Original change's description:
> In older STLs, std::vector::insert() returns void.
> 
> CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES
> 
> Change-Id: I7bd15ecc7122965db16fbb51e51ee166b05dce2f
> Reviewed-on: https://skia-review.googlesource.com/117722
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

TBR=mtklein@chromium.org,brianosman@google.com

Change-Id: I9c126edbef74293d8e7a2b7e2365e464ba367ae5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Cq-Include-Trybots: skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES
Reviewed-on: https://skia-review.googlesource.com/117900
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-04-02 20:37:13 +00:00
Mike Klein
7dd8ee9c60 In older STLs, std::vector::insert() returns void.
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-arm-Debug-Chromebook_GLES

Change-Id: I7bd15ecc7122965db16fbb51e51ee166b05dce2f
Reviewed-on: https://skia-review.googlesource.com/117722
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-04-02 17:32:42 +00:00
Chris Dalton
7c7ff031a5 ccpr: Normalize homogeneous coords with frexp/ldexp
Hopefully increases cubic accuracy by manipulating exponents
instead of calling normalize().

Bug: skia:
Change-Id: I8d3596e858a2fbb6650c158753133c5a2e01e166
Reviewed-on: https://skia-review.googlesource.com/117009
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-04-02 16:05:05 +00:00
Mike Klein
80e1d56e19 implement SkTDArray with std::vector
It's always worth seeing if we can get away with replacing custom data
structures with ones from the standard library.  Our array-like types
are all good candidates to replace with std::vector, and it's especially
easy to start with SkTDArray.  Unlike the others, it has no preallocated
S-variant, which is tricky to make work with std::vector.

SkTDArray also has known integer overflow bugs, leading to out of range
writes.  It'd be _very_ nice to ditch it for a better standard vector.

I removed a bunch of unused or little-used methods, and updated a couple
call sites that used methods in unusual or dangerous ways.

I've had to tweak GrAAConvexTessellator and SkBaseShadowTessellator just
a touch to work within the constraints of an std::vector impl.  It's not
intended to be legal to write to the reserved-but-not-counted elements
of an SkTDArray, but you can get away with it in our old implementation.
This version now uses setCount() to actually reserve and count them, and
should have the same performance and use the same amount of memory.

The PathMeasure_explosion GM I added recently to reproduce this bug now
draws without triggering undefined behavior or ASAN errors, provided you
have ~40GB of RAM.

Bug: skia:7674

Change-Id: I4eacae18a976cd4a6d218102f8ca5d973d4d7d0e
Reviewed-on: https://skia-review.googlesource.com/115982
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-04-02 15:38:05 +00:00
Cary Clark
9b8b0cee51 fix SkRRect fuzzer assert
fuzzer bug triggers an assert in SkRRect::isValid because
on radius is zero and the other, while small, is not.

The radii are normally both set to zero if one is zero
in SkRRect::setRectRadii. However, subsequently scaleRadii
may set one to zero when normalizing the pair.

Move the clamping code out of setRectRadii so it can be
called from scaleRadii as well.

R=reed@google.com
Bug: skia:
Change-Id: Ib9a86da7212567b2f4b83d99a41cf9ba2c30e9b9
Reviewed-on: https://skia-review.googlesource.com/115701
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-04-02 15:15:25 +00:00
Robert Phillips
6b6fcc7862 Add SkSurface factory that takes an SkSurfaceCharacterization
TBR=bsalomon@google.com
Change-Id: Ie38123dc7c35005bfe8500bf4a16e0d16bbf36bd
Reviewed-on: https://skia-review.googlesource.com/117236
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-30 19:12:26 +00:00
Chris Dalton
df1681ec06 Revert "vulkan: Blacklist MSAA path renderer on Qualcomm drivers"
This reverts commit 0361657402.

Reason for revert: Caused more bad golds than it fixed

Original change's description:
> vulkan: Blacklist MSAA path renderer on Qualcomm drivers
> 
> Bug: skia:7758
> Change-Id: I96b5c259352949d67f5e0263a7164cdce54b3269
> Reviewed-on: https://skia-review.googlesource.com/117152
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=djsollen@google.com,egdaniel@google.com,csmartdalton@google.com

Change-Id: I80714a4cba7d495bc6ad89616b6c5f6eb8492bdb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7758
Reviewed-on: https://skia-review.googlesource.com/117340
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-03-29 23:17:07 +00:00
Robert Phillips
155dd716f1 Add SK_API to GrContextThreadSafeProxy
TBR=egdaniel@google.com
TBR=bsalomon@google.com
Change-Id: I7dabb22ae391c6ec124bdfc65c4120de4193352e
Reviewed-on: https://skia-review.googlesource.com/117235
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-29 22:00:05 +00:00
Chris Dalton
0361657402 vulkan: Blacklist MSAA path renderer on Qualcomm drivers
Bug: skia:7758
Change-Id: I96b5c259352949d67f5e0263a7164cdce54b3269
Reviewed-on: https://skia-review.googlesource.com/117152
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-03-29 19:05:46 +00:00
Derek Sollenberger
cf6da8c0f2 Dump additional details about the gpu resources.
GpuResources now dump optional string values that describe the type and
category of the resource.  The type provides a description of the kind
of resource it is (e.g. texture, buffer object, stencil, etc.) and the
category describes what the resource is currently tasked to do (e.g.
path masks, images, scratch, etc.)

This CL also refactors the dump logic in an attempt to consolidate
duplicated code into GrGpuResources.cpp.

Bug: b/74435803
Change-Id: I83cae825f41e6450a21398ab3ecea349c7c61c15
Reviewed-on: https://skia-review.googlesource.com/115989
Commit-Queue: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-03-29 18:08:15 +00:00
Kaloyan Donev
560d283295 Fixing build with SK_IGNORE_TO_STRING defined.
Change-Id: Id7238e427e490338d1f610255774c2069cfd4879
Reviewed-on: https://skia-review.googlesource.com/117060
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-03-29 13:42:45 +00:00
Robert Phillips
6eba063b63 Add new GrResourceCache::purgeUnlockedResources variant
TBR=bsalomon@google.com
Change-Id: I05bef1f8a271474db878a046cc1f6ac7b60a15f1
Reviewed-on: https://skia-review.googlesource.com/116801
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-28 18:56:14 +00:00
Kaloyan Donev
dfffb39ca8 Fixed warnings for casting large type to smaller one.
Change-Id: Ib3e2661d0383bf154bc9178dac070dfd910a393c
Reviewed-on: https://skia-review.googlesource.com/115200
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-03-27 13:28:24 +00:00
Brian Osman
094fba9cd6 Add SkColorSpaceXform_skcms
Currently only enabled in Skia dev builds. Has some diffs
in GMs and images, but (hopefully) nothing major.

Bug: skia:
Change-Id: Ifdf5d2804e59f555a3dc84f657e438dd589a2751
Reviewed-on: https://skia-review.googlesource.com/116520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-03-27 13:15:24 +00:00
Brian Salomon
34df0d385b Hide GrBackendTexture/RenderTarget constructors that take a GrPixelConfig
Make GrGLTexture use the version that takes GrMipMapped.

Bug: skia:6718
Change-Id: Id3e801bcb5e781938e610bdea75bd92498117935
Reviewed-on: https://skia-review.googlesource.com/116221
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-23 23:17:01 +00:00
Brian Salomon
032aaae5be Remove legacy GrContext factories function and supporting code/types.
Change-Id: I437a4a0a58bf70ea1b8b0659b099a2af2bfa64fe
Reviewed-on: https://skia-review.googlesource.com/116197
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-23 21:12:50 +00:00
Brian Salomon
a6a3df7d64 Move GrPixelConfig to GrTypesPriv
BUG= skia:6718

Change-Id: I254a5d289c1216e580b8f7fe613236c090d0e901
Reviewed-on: https://skia-review.googlesource.com/116196
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-23 21:05:10 +00:00
Brian Salomon
49edccd775 Remove legacy SkSurface::MakeFromBackendRenderTarget that does not take SkColorType
Bug: skia:6718
Change-Id: Iefec5be49bf7450426c5ddb668f5525876f8ec2d
Reviewed-on: https://skia-review.googlesource.com/116194
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-23 20:44:50 +00:00
Brian Salomon
f4a00e4b4a Move a bunch of internal types from GrTypes to GrTypesPriv
Change-Id: I9fe1297ae7d185957c76681305bcf22cc972e53b
Reviewed-on: https://skia-review.googlesource.com/116189
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-23 20:36:00 +00:00
Herb Derby
7956b59ba5 Remove SkAutoGlyphCache decls that happen to work
...and fix sample code.

Change-Id: I673770125064f8451e3d88ec4929a68409935ad1
Reviewed-on: https://skia-review.googlesource.com/115995
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-03-22 23:47:19 +00:00
Mike Klein
539ebb8f75 rm SkTDArray::{Deleter,release()}
These are unused, and would make it conceptually tricky to replace
with something like std::vector that does not have a .release() method.

Change-Id: Iaee913d6a513d078989166c6e97097eeec0100ba
Reviewed-on: https://skia-review.googlesource.com/115921
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2018-03-22 17:17:24 +00:00
Brian Salomon
5fba7ad39a Support GL_RGB textures and render targets.
Bug= skia:7533

Change-Id: Iba30e90dbf2574368b773bb5cf2ebd5219559717
Reviewed-on: https://skia-review.googlesource.com/108188
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-03-22 14:49:44 +00:00
Brian Salomon
42409c2efa Remove deprecated version of SkImage::MakeFromAdoptedTexture that does not take SkColorType
Bug: skia:6718
Change-Id: Ia2762855078bcbad8faf2f538f0afc64913e5e9b
Reviewed-on: https://skia-review.googlesource.com/115364
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-21 19:08:59 +00:00
Mike Reed
ca37f32c70 change canvas-state to just record clip bounds
This reflects the long-standing restrictions in our clients (webview) and the reality of the gpu target which just uses scissors.

It also removes one of the few callers of canvas::clipRegion, which we'd like to remove.

Bug: skia:
Change-Id: Ie3b3c6e8752f82cddef256f753000f9da4bdbdee
Reviewed-on: https://skia-review.googlesource.com/113260
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-03-21 18:13:20 +00:00
Hal Canary
10450134e8 GrGLExtensions: remove unneded unique_ptr
Change-Id: Ic949b186fbb4f503d2edbea7033ad242c12ad101
Reviewed-on: https://skia-review.googlesource.com/115640
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-03-21 17:57:08 +00:00
Robert Phillips
abf7b763e2 Add texture-specific flags for External & Rectangle textures
For DDLs, Ganesh needs to know about External & Rectangle textures prior to instantiation (or PromiseImage fulfillment). These new flags allow the client to provide this information when the lazyProxy is created.

The new texture flags work analogously to the render target flags:
   GrSurface and GrSurfaceProxy get a new set of accessors for the new flags
   The new flags are set appropriately on a GrGLTexture when it is created
   For wrapped texture proxies the flags are just copied off of the GrSurface
   For lazy-proxies/promise-images the flags are computed up front and passed to the proxy
   The GrSurfaceProxy/GrSurface flags equivalence is verified in GrSurfaceProxy::assign

Change-Id: Ia8e1998aa0a36ce4481bfd9e56be21f990e83148
Reviewed-on: https://skia-review.googlesource.com/114985
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-21 17:04:18 +00:00
Brian Salomon
bfd2749048 Remove deprecated SkImage::MakeFromTexture variants that don't take SkColorType
Bug: skia:6718

Change-Id: I3b23ddb903fab5c41b7e6b1811a78cc38ba64590
Reviewed-on: https://skia-review.googlesource.com/115086
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-20 19:58:00 +00:00
Cary Clark
3b68882918 remove imageinfo flatten altogether
If SkImageInfo flatten and unflatten aren't referenced outside
of one test, perhaps they can be removed altogether.

R=reed@google.com

Bug: skia:6898
Change-Id: Ia6f82b66d4496a628ad95c386d1865793f3e31a9
Reviewed-on: https://skia-review.googlesource.com/115074
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Mike Reed <reed@google.com>
2018-03-19 21:28:46 +00:00
Brian Salomon
19eaf2dbe7 Revert "Revert "New read pixels implementation that is simpler but does all conversions on CPU.""
This reverts commit be5947c2f3.

Bug: skia:
Change-Id: I06dc15b31042d7827511d0ac2a7f4262c3f09622
Reviewed-on: https://skia-review.googlesource.com/115079
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-19 21:17:15 +00:00
Brian Salomon
56dc04bdc1 Remove deprecated versions of YUV texture SkImage factories
Bug: skia:6718
Change-Id: I856b64192e1b797f60b833dd58014e058ea351b3
Reviewed-on: https://skia-review.googlesource.com/115124
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-19 21:04:55 +00:00
Eric Karl
af7700265b Allow SkTraceMemoryDump to exclude wrapped objects
Allow SkTraceMemoryDump to exclude wrapped objects from dumps. This
helps avoid duplicate dumping when Skia is wrapping an external object
which is already dumped externally.

Bug: 795358
Change-Id: Icbda96b564c81b958d40f74693280ac7d5ba7332
Reviewed-on: https://skia-review.googlesource.com/114681
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Eric Karl <ericrk@chromium.org>
2018-03-19 20:37:25 +00:00
Brian Salomon
53706774a7 Remove SkSurface::MakeFromBackendTexture variant that doesn't take SkColorType
Bug: skia:6718
Change-Id: I8289c54ca9a5f89d10dc0b0dfe750d4fd1da0b64
Reviewed-on: https://skia-review.googlesource.com/115102
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-19 20:12:05 +00:00
Brian Salomon
cb88470d82 Remove SkSurface::MakeFromBackendTextureAsRenderTarget variant that doesn't take SkColorType
Bug: skia:6718
Change-Id: I3fabe2050394bfbd8ad2fa600d07323838308ae5
Reviewed-on: https://skia-review.googlesource.com/115087
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-19 18:43:25 +00:00
Brian Salomon
be5947c2f3 Revert "New read pixels implementation that is simpler but does all conversions on CPU."
This reverts commit c9a642edf2.

Reason for revert: 1010102 gms broke

Original change's description:
> New read pixels implementation that is simpler but does all conversions on CPU.
> 
> Change-Id: Ia548cd24a8544b35a233311706faf48de353b7cf
> Reviewed-on: https://skia-review.googlesource.com/109902
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I7724a6eef79885ba2a32c1ac871e5b2a9a3c0c12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/115140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-19 18:42:36 +00:00
Brian Salomon
c9a642edf2 New read pixels implementation that is simpler but does all conversions on CPU.
Change-Id: Ia548cd24a8544b35a233311706faf48de353b7cf
Reviewed-on: https://skia-review.googlesource.com/109902
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-03-19 17:19:45 +00:00
Robert Phillips
fe0253f8bb Alter GrSurface/GrSurfaceProxy flags to prepare for GrTexture/GrTextureProxy -specific flags
This CL:
  moves GrRenderTarget::fFlags to GrSurface::fSurfaceFlags
  adds a GrInternalSurfaceFlags type and uses it for GrSurfaceProxy::fSurfaceFlags

  The goal of this is to provide a location where GrTexture/GrTextureProxy-specific flags
(i.e., isExternal & isRectangle) can be stored.

Change-Id: I8df7b79036a6853dd378ff6cf10d4b37c60dd511
Reviewed-on: https://skia-review.googlesource.com/114796
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-19 12:21:05 +00:00
Herb Derby
76d69b44bb Apply filterTextFlags so the fonts are the same.
In order to apply filterTextFlags correctly, teach
TrackLayerDevice how to process save and restore layers.

At this point, I don't see any other traffic than the
cache warming traffic.

This code has a performance between 82% and 105% of just
drawing the picture.

BUG=skia:7515

Change-Id: I44736be46884f18b6d120d4b5ca582f34dbdff0f
Reviewed-on: https://skia-review.googlesource.com/114641
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-03-16 20:28:36 +00:00
Greg Daniel
7278d68cac Add DoneProc to Promise Images
This proc will notify the client when we will no longer call fulfill on
their promise image so that can delete any meta data they needed to store
to be able to complete the fulfill requests.

Bug: skia:
Change-Id: Ife1e6845f221c31ce1ae2c0d2ba5e4c8f0203b74
Reviewed-on: https://skia-review.googlesource.com/114092
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-03-16 19:27:46 +00:00
Robert Phillips
6ceaafa7b9 Handle GrContext creation failure in DDL
TBR=bsalomon@google.com
Change-Id: Ib34448a60cb127ef89bcb0b1f85d07abc91af582
Reviewed-on: https://skia-review.googlesource.com/114569
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-15 21:25:16 +00:00
Brian Salomon
6a426c1d72 Cleanup SkImage YUV texture factories.
Remove unused GrBackendObject variants.

Add versions without redundant size param.

Make this work with GrBackendTextures that weren't created with a GrPixelConfig.

Change-Id: Ic1bbf5f2817cebab938b4f31000126a6ab5c44d5
Reviewed-on: https://skia-review.googlesource.com/114460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-03-15 19:41:26 +00:00
Mike Reed
9c2916e0c7 drawTextRSXform should not apply matrix to shader
drawTextRSXform should draw the same as drawTextOnPath (as regards shaders)

Bug: b/69904791
Change-Id: I393dd8fd7a5bdc6a018b1ca33592b208c7141868
Reviewed-on: https://skia-review.googlesource.com/114468
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-03-15 18:14:16 +00:00
Robert Phillips
7f4419696b Make CreateBackendFormatFromTexture shared code
TBR=bsalomon@google.com
Change-Id: I19e6e6c8dc32ba584738545d443de092e4987a5a
Reviewed-on: https://skia-review.googlesource.com/114374
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2018-03-15 16:51:36 +00:00
Robert Phillips
38eb740b94 Remove SK_RASTER_RECORDER_IMPLEMENTATION
TBR=bsalomon@google.com
Change-Id: I9608ce5ce2b9d38c5e356d8428a8ff05df6ccda7
Reviewed-on: https://skia-review.googlesource.com/114490
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2018-03-15 12:55:06 +00:00
Greg Daniel
057627f6f1 Make sure we set correct GrPixelConfig in promise images
Land just the Promise image fixes from, https://skia-review.googlesource.com/c/skia/+/114261

Bug: skia:
Change-Id: I917cf2c1f5c6e51f9d7f1d3ec4526db551e89d84
Reviewed-on: https://skia-review.googlesource.com/114472
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-03-15 12:22:16 +00:00
Greg Daniel
56008aac75 Add SkColorType getter on SkImage.
Bug: skia:
Change-Id: I131fb5f7faf3f54e0eb6d31b800d224e6d4963ce
Reviewed-on: https://skia-review.googlesource.com/114464
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-03-14 20:10:49 +00:00
Greg Daniel
8a3f55c659 Revert "Improve handling of GrPixelConfig in GrBackendTex/RT ctors"
This reverts commit 7d2b16ad13.

Reason for revert: Maybe breaking chrome?

Original change's description:
> Improve handling of GrPixelConfig in GrBackendTex/RT ctors
> 
> Make sure that no client facing code was relying on what we set as the
> default value for fConfig by making in kUnkown.
> 
> Bug: skia:
> Change-Id: Ie52ff08ba8deeacc16fe06eb0dd0c7292b2edf91
> Reviewed-on: https://skia-review.googlesource.com/114261
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I91e190d72407f9c4bee93a031a557f740bb49b66
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/114423
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2018-03-14 17:32:41 +00:00
Mike Reed
1be1f8d097 hide SkBlurMaskFilter and SkBlurQuality
SK_SUPPORT_LEGACY_BLURMASKFILTER

Bug: skia:
Change-Id: Ic3e27e08e6e3cd2ffc1cd13b044e197bebc96236
Reviewed-on: https://skia-review.googlesource.com/113940
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-03-14 17:27:36 +00:00
Chris Dalton
c2d0dd658b Add a shader cap for incomplete short int precision
Bug: skia:
Change-Id: Iac36eb763e687f6ecc3acbd4afced66f95596be2
Reviewed-on: https://skia-review.googlesource.com/109003
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-03-14 16:35:50 +00:00