The presence of global functions threw off the
indentation of themselves and everything following.
TBR=reed@google.com
Bug: skia:6898
Change-Id: I3c6c21b62922f42157085fa7aaa19deb9560f16d
Reviewed-on: https://skia-review.googlesource.com/118380
Reviewed-by: Cary Clark <caryclark@skia.org>
Commit-Queue: Cary Clark <caryclark@skia.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>