In context-loss situations, SkImage::getTexture may return nullptr,
even if SkImage::isTextureBacked() is true. Handle these cases
without crashing.
R=bsalomon@google.com
Bug: 803796
Change-Id: Ia877124160fb1893af08f839e43e3ee83c1b93ff
Reviewed-on: https://skia-review.googlesource.com/97341
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:7512
Change-Id: I9df6f86103ce230f4a31ae6c6d9ca9c7bc6b1e75
Reviewed-on: https://skia-review.googlesource.com/97380
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This patch uses equal_range instead of linear search to look up a
factory entry by name. This does require a sort, but the expected usage
is that the sort happens once and look ups happen many times.
This improves performance on Chromium's oop deserialization of
flattenables by about 10%
R=reed@chromium.org
Change-Id: I907f457a2ffb7d5b6d8261343099d982260b8415
Reviewed-on: https://skia-review.googlesource.com/96820
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
In the DDL world it is valid for the GrProxyProvider to not have a
GrResourceProvider so we need a separate marker for abandonment.
Change-Id: Iae18a25226d35e1152a902e17a8091e0058695f3
Reviewed-on: https://skia-review.googlesource.com/97220
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: I79bdb1ff137c488ef5d4998ffc0cc9cdc28ae9fb
Reviewed-on: https://skia-review.googlesource.com/97240
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
bug: we ignored maskfilter in spriteblitter case
Bug: skia:
Change-Id: I2c9423396a7a9ed3b81cd86e3a5edebbf34538db
Reviewed-on: https://skia-review.googlesource.com/96120
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Too much spew during DM.
TBR=reed@google.com
Change-Id: Ifad53b1abb35d1768e83e7867f9e808df3fcaef1
Reviewed-on: https://skia-review.googlesource.com/97160
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This prepares us to share this with other effects (most notably maskfilters)
Bug: skia:
Change-Id: I12530fdf10c4e5f2a9ab6d394bf9e87c54ea60c4
Reviewed-on: https://skia-review.googlesource.com/97062
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
These don't seem to be used by anyone anymore so lets kill them.
Bug: skia:
Change-Id: I7908a9c9357e9e3b3166af9a14899dab522c3f11
Reviewed-on: https://skia-review.googlesource.com/97144
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Bug: skia:
Change-Id: I46451b776461cc50f34fa532aa8d070fddb17852
Reviewed-on: https://skia-review.googlesource.com/97102
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: b/71719631
Change-Id: I676c34dfe5ea9b5e184ea53dd49a8b835d4e8cb6
Reviewed-on: https://skia-review.googlesource.com/95741
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Previously, wrapping a non-0 FBO would always cause us to think it
was MSAA, causing it to be un-copyable.
Fixes https://github.com/flutter/flutter/issues/10284
Bug: skia:7412
Change-Id: If9c0f306ad8c0c3e23dee793a541a6852737f7d9
Reviewed-on: https://skia-review.googlesource.com/97100
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Allows coverage counts ultimately to be drawn either to an atlas or
directly to the framebuffer.
Bug: skia:
Change-Id: I6cc07fce562c223381b89586d19ae98298bafe4d
Reviewed-on: https://skia-review.googlesource.com/96083
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This particular test this is addressing is:
1. very large device (>32K in a test case)
2. drawPoints has special (fast) case where it converts all of the pts (rects) into fixed point
3. overflows fixed -- assert
Paths already don't draw into a device this large (they are limited by 32K I think, smaller if aa)
The (theoretical) solution for paths is to tile the draw itself. Perhaps that approach could be
applied everywhere in bitmapdevice...
This older issue sums up this idea: https://bugs.chromium.org/p/skia/issues/detail?id=2122
Will look into this general solution in a separate CL/effort.
Bug: skia:7425
Change-Id: I57f8da92df78127e6b8e42e422c43e50bb5748d6
Reviewed-on: https://skia-review.googlesource.com/96700
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Switches over to writing output to the sd card.
Change-Id: Ic287a741b9af471f823a7e97eb0c6d3d20f639d6
Reviewed-on: https://skia-review.googlesource.com/96380
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
Bug: b/63909536
Bug: b/63908092
- Scale to an arbitrary size, using the decoding library if it supports
it, and Skia otherwise
- Crop to a subset
- Post-processing with an SkPicture, to facilitate circle masks etc
- isRunning, to implement Animatable2 interface in Java
Change-Id: I13dbabee8e4a22e5cc193856aa3e94ce23ae4cb5
Reviewed-on: https://skia-review.googlesource.com/94660
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
To fix gm/bigrect, needed to do adjust "largest" rect so it doesn't become empty when round-tripping with SkRect/SkIRect.
I renamed it after this.
Bug: skia:
Change-Id: I747782c8456da603cf298275d2300ea1996e7629
Reviewed-on: https://skia-review.googlesource.com/95563
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yuqian Li <liyuqian@google.com>