bsalomon
56b7dc476b
Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. (patchset #3 id:40001 of https://codereview.chromium.org/2339203002/ )
...
Reason for revert:
Crashing blink
https://codereview.chromium.org/2351743002/
Original issue's description:
> Stop flattening GrCoordTransforms in parent GrFragmentProcessors.
>
> This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002
>
> Committed: https://skia.googlesource.com/skia/+/d91237ee051523f439238042674ade99207fe4a6
TBR=egdaniel@google.com ,robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2351753002
2016-09-19 09:26:40 -07:00
bsalomon
d91237ee05
Stop flattening GrCoordTransforms in parent GrFragmentProcessors.
...
This changes moves to a model that iterates over GrCTs in a GrFP hierarchy when inserting transformations by GrGLSLPrimitiveProcessors.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339203002
Review-Url: https://codereview.chromium.org/2339203002
2016-09-19 08:36:58 -07:00
bungeman
67ac33e1f1
Remove SK_DECLARE_LEGACY_CREATE_FROM_FONTDATA.
...
This is no longer defined by any users, so remove it.
TBR=reed
This just removes no longer used API.
Review-Url: https://codereview.chromium.org/2345353002
2016-09-16 14:54:16 -07:00
msarett
c71a9b7f53
Revert of Support Float32 output from SkColorSpaceXform (patchset #7 id:140001 of https://codereview.chromium.org/2339233003/ )
...
Reason for revert:
Hitting an assert
Original issue's description:
> Support Float32 output from SkColorSpaceXform
>
> * Adds Float32 support to SkColorSpaceXform
> * Changes API to allows clients to ask for F32, updates clients to
> new API
> * Adds Sk4f_load4 and Sk4f_store4 to SkNx
> * Make use of new xform in SkGr.cpp
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> Committed: https://skia.googlesource.com/skia/+/43d6651111374b5d1e4ddd9030dcf079b448ec47
TBR=brianosman@google.com ,mtklein@google.com,scroggo@google.com,mtklein@chromium.org,bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2347473007
2016-09-16 11:01:27 -07:00
bsalomon
faf8203ea7
Allow GrCaps access from GrDrawContext
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2348923002
Review-Url: https://codereview.chromium.org/2348923002
2016-09-16 09:53:28 -07:00
msarett
43d6651111
Support Float32 output from SkColorSpaceXform
...
* Adds Float32 support to SkColorSpaceXform
* Changes API to allows clients to ask for F32, updates clients to
new API
* Adds Sk4f_load4 and Sk4f_store4 to SkNx
* Make use of new xform in SkGr.cpp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339233003
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2339233003
2016-09-16 09:51:12 -07:00
jvanverth
a8370b2c56
Remove old SkGaussianEdgeShader code
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345673003
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/2345673003
2016-09-16 09:13:15 -07:00
scroggo
8e6c7ada5a
Make SkPngCodec decode progressively.
...
This is a step towards using SkCodec in Chromium, where progressive
decoding is necessary.
Switch from using png_read_row (which expects all the data to be
available) to png_process_data, which uses callbacks when rows are
available.
Create a new API for SkCodec, which supports progressive decoding and
scanline decoding. Future changes will switch the other clients off of
startScanlineDecode and get/skip-Scanlines to the new API.
Remove SkCodec::kNone_ScanlineOrder, which was only used for interlaced
PNG images. In the new API, interlaced PNG fits kTopDown. Also remove
updateCurrScanline(), which was only used by the old implementation for
interlaced PNG.
DMSrcSink:
- In CodecSrc::kScanline_Mode, use the new method for scanline decoding
for the supported formats (just PNG and PNG-in-ICO for now).
fuzz.cpp:
- Remove reference to kNone_ScanlineOrder
SkCodec:
- Add new APIs:
- startIncrementalDecode
- incrementalDecode
- Remove kNone_SkScanlineOrder and updateCurrScanline()
- Set fDstInfo and fOptions in getPixels(). This may not be necessary
for all implementations, but it simplifies things for SkPngCodec.
SkPngCodec:
- Implement new APIs
- Switch from sk_read_fn/png_read_row etc to png_process_data
- Expand AutoCleanPng's role to decode the header and create the
SkPngCodec
- Make the interlaced PNG decoder report how many lines were
initialized during an incomplete decode
SkIcoCodec:
- Implement the new APIs; supported for PNG in ICO
SkSampledCodec:
- Call the new method for decoding scanlines, and fall back to the old
method if the new version is unimplemented
- Remove references to kNone_SkScanlineOrder
tests/CodecPartial:
- Add a test which decodes part of an image, then finishes the decode,
and compares it to the straightforward method
tests/CodecTest:
- Add a test which decodes all scanlines using the new method
- Repurpose the Codec_stripes test to decode using the new method in
sections rather than all at once
- In the method check(), add a parameter for whether the image supports
the new method of scanline decoding, and be explicit about whether an
image supports incomplete
- Test incomplete PNG decodes. We should have been doing it anyway for
non-interlaced (except for an image that is too small - one row), but
the new method supports interlaced incomplete as well
- Make test_invalid_parameters test the new method
- Add a test to ensure that it's safe to fall back to scanline decoding without
rewinding
BUG=skia:4211
The new version was generally faster than the old version (but not significantly so).
Some raw performance differences can be found at https://docs.google.com/a/google.com/spreadsheets/d/1Gis3aRCEa72qBNDRMgGDg3jD-pMgO-FXldlNF9ejo4o/
Design doc can be found at https://docs.google.com/a/google.com/document/d/11Mn8-ePDKwVEMCjs3nWwSjxcSpJ_Cu8DF57KNtUmgLM/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1997703003
Review-Url: https://codereview.chromium.org/1997703003
2016-09-16 08:20:38 -07:00
bungeman
f93d71122e
SkFontData to use smart pointers.
...
The SkFontData type is not exposed externally, so any method which uses
it can be updated to use smart pointers without affecting external
users. Updating this first will make updating the public API much
easier.
This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to
std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It
appears that no one outside Skia is currently using SkStream::NewfromFile
so this is a good time to update it as well.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002
Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c
Review-Url: https://codereview.chromium.org/2339273002
2016-09-16 06:24:20 -07:00
robertphillips
f560ef8681
Add staging for removal of SkRRectsGaussianEdgeShader::Make (for Android)
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347853002
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/2347853002
2016-09-16 06:17:45 -07:00
bsalomon
6b2552f109
Add GrContextOptions flag to disable distance field path renderer.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339213002
Review-Url: https://codereview.chromium.org/2339213002
2016-09-15 13:50:26 -07:00
robertphillips
ec895345e5
Fix color bug in SkRRectsGaussianEdgeShader
...
Due to the code at the end of emitCode this shader was darker than the SkGaussianEdgeShader on Android.
This CL also removes the unused "pad" parameter.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2344963002
NOTREECHECKS=true
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/2344963002
2016-09-15 13:18:15 -07:00
brianosman
b9c5137a1c
Add storage and computation of SkColor4f version of gradient stops.
...
For now, we still only have the SkColor factory, but the Descriptor can
now carry either an SkColor or SkColor4f specified gradient. Base class
constructor automatically populates both forms of color, so that legacy
raster backend will continue to work, and new backend work can operate
directly from the float4 version.
On the GPU side, we have similar logic, but GrGradientEffect only
keeps one version of colors around: SkColor if the destination is
legacy, and SkColor4f (with an optional gamut xform) if the destination
is gamma correct. The 4f colors are already linear, and we gamut xform
them in setData, so gradients are now fully color-correct in sRGB and
F16 modes...
... unless there are more than three stops. Then we use a texture, and
that code path isn't handled yet. We have a few choices here (do we
use an 8-bit sRGB atlas, or just always use F16 linear atlas so we can
share it among both sRGB and wide-gamut rendering). In any case, I'd
like to defer that to a second CL.
This change does fix the non-texture gradients in the gamut GM.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337313002
Review-Url: https://codereview.chromium.org/2337313002
2016-09-15 11:09:45 -07:00
bungeman
606add3dfb
Revert of SkFontData to use smart pointers. (patchset #3 id:40001 of https://codereview.chromium.org/2339273002/ )
...
Reason for revert:
Killing Mac
Original issue's description:
> SkFontData to use smart pointers.
>
> The SkFontData type is not exposed externally, so any method which uses
> it can be updated to use smart pointers without affecting external
> users. Updating this first will make updating the public API much
> easier.
>
> This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to
> std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It
> appears that no one outside Skia is currently using SkStream::NewfromFile
> so this is a good time to update it as well.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002
>
> Committed: https://skia.googlesource.com/skia/+/d8c2476a8b1e1e1a1771b17e8dd4db8645914f8c
TBR=mtklein@chromium.org ,halcanary@google.com,mtklein@google.com,reed@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/2343933002
2016-09-15 10:57:39 -07:00
bungeman
d8c2476a8b
SkFontData to use smart pointers.
...
The SkFontData type is not exposed externally, so any method which uses
it can be updated to use smart pointers without affecting external
users. Updating this first will make updating the public API much
easier.
This also updates SkStreamAsset* SkStream::NewFromFile(const char*) to
std::unique_ptr<SkStreamAsset> SkStream::MakeFromFile(const char*). It
appears that no one outside Skia is currently using SkStream::NewfromFile
so this is a good time to update it as well.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339273002
Review-Url: https://codereview.chromium.org/2339273002
2016-09-15 10:03:27 -07:00
reed
39eaf5f9fd
add helpers for using SkData with picture serialization
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2341693004
TBR=
Review-Url: https://codereview.chromium.org/2341693004
2016-09-15 07:19:35 -07:00
mtklein
c518a76105
Clean up unused SkPictureRecorder::optimizeFor()
...
Don't worry about the failing Shield bot... unrelated experiment. It's failing at head.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2340133002
NOTREECHECKS=true
Review-Url: https://codereview.chromium.org/2340133002
2016-09-15 04:43:03 -07:00
jvanverth
c20c0c0925
Switch default for SkGaussianBlurShader radius size.
...
One step towards removing the 6.2 radius entirely.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333403002
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/2333403002
2016-09-14 07:04:49 -07:00
fmalita
37283c28aa
Use sk_sp text blob APIs
...
SkTextBlobBuilder::build() -> make()
SkAutoTUnref<const SkTextBlob> -> sk_sp<SkTextBlob>
drawTextBlob(const SkTextBlob*) -> drawTextBlob(const sk_sp<SkTextBlob>&)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335493005
Review-Url: https://codereview.chromium.org/2335493005
2016-09-13 10:00:23 -07:00
msarett
f7eb6fc71a
Implement Fill() for incomplete decodes to RGBA_F16
...
Before this patch, we would hit an SkASSERT(false).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335203002
Review-Url: https://codereview.chromium.org/2335203002
2016-09-13 09:04:11 -07:00
reed
54dc4878b0
add pipecanvas
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201323003
Review-Url: https://codereview.chromium.org/2201323003
2016-09-13 08:09:45 -07:00
brianosman
5a7ae7e337
Gamut transformation of the paint color in Ganesh
...
Conversion from sRGB to destination gamut is going to be very common,
so I'm caching that xform (if there is one) on the draw context.
Results verified in the gamut GM (two more boxes correct).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2330553003
Review-Url: https://codereview.chromium.org/2330553003
2016-09-12 12:07:25 -07:00
robertphillips
2af83ac4f6
Add shader-based GaussianEdgeShader for reveal case
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321713004
Review-Url: https://codereview.chromium.org/2321713004
2016-09-12 12:02:16 -07:00
reed
42943c8aa9
change SkStreams to work with sk_sp<SkData> instead of SkData*
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2333713002
Review-Url: https://codereview.chromium.org/2333713002
2016-09-12 12:01:44 -07:00
bsalomon
7312ff87f6
Remove ability to skip coord transform comparison in pipeline comparison.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316413003
Review-Url: https://codereview.chromium.org/2316413003
2016-09-12 08:55:38 -07:00
brianosman
5192475bd8
Two changes:
...
1. Remove special premul handling from gamut xform code
Alpha is a constant, so the gamut transformation results remain unchanged
(it distributes across the linear matrix multiply).
2. Use SkMatrix44 rather than array of floats
Preserves semantic intention, and makes upcoming code (where we transform
colors on the CPU by that matrix) simpler.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2329553002
Review-Url: https://codereview.chromium.org/2329553002
2016-09-12 08:50:19 -07:00
jvanverth
d99858ad46
Update SampleAndroidShadows to use algorithm closer to Android OpenGL
...
Includes:
* Update light position to be at a similar distance to Android OS
* Scale spot shadows correctly
* Compute stroke shapes and radii correctly
* Allow for larger blur radius for shadows
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319003003
TBR=reed@google.com
NOTRY=true
NOTREECHECKS=true
Review-Url: https://codereview.chromium.org/2319003003
2016-09-12 07:51:05 -07:00
reed
2a78fca054
helper to SkRect to create from SkISize
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332733002
TBR=
NOTREECHECKS=True
NOTRY=True
Review-Url: https://codereview.chromium.org/2332733002
2016-09-12 06:32:07 -07:00
reed
46f2d0ad0d
use expected name for setDrawLooper/getDrawLooper
...
Needed for future pipe cl.
Next cl should be to guard the looper entirely (since its deprecated)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2326173002
TBR=
Review-Url: https://codereview.chromium.org/2326173002
2016-09-11 05:40:31 -07:00
brianosman
de68d6c461
Fix storage of gamut transform matrices in SkColorSpace
...
We were effectively storing the transpose, which made all of our
operations on individual colors, and our concatenation of matrices
awkward and backwards.
I'm planning to push this further into Ganesh, where I had incorrectly
adjusted to the previous layout, treating colors as row vectors in the
shaders.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324843003
Review-Url: https://codereview.chromium.org/2324843003
2016-09-09 10:36:17 -07:00
mtklein
9441af52aa
Apple devices do not support CRC32 instructions. Don't believe Clang's lies.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322033002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2322033002
2016-09-08 11:22:09 -07:00
brianosman
971cd496b9
Cache the inverse matrix on SkColorSpace. Rename xyz() to toXYZ().
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2323003002
Review-Url: https://codereview.chromium.org/2323003002
2016-09-08 10:10:11 -07:00
brianosman
4cea3b9e9d
Push usage of GrColor4f into OverrideInput
...
Just a change to preserve precision.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324553002
Review-Url: https://codereview.chromium.org/2324553002
2016-09-08 09:33:50 -07:00
robertphillips
05a4cf5959
Add GM/slide to simulate Android-style reveal clip
...
Hopefully, this will let us play w/ geometric and shader-based solutions.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003
Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0
Review-Url: https://codereview.chromium.org/2316593003
2016-09-08 09:02:44 -07:00
msarett
56cbb23436
Delete deprecated GammaNamed
...
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2320893002
Review-Url: https://codereview.chromium.org/2320893002
2016-09-08 04:57:53 -07:00
msarett
48ba2b8550
Rename SkColorSpace::GammaNamed to SkColorSpace::RenderTargetGamma
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319293002
Review-Url: https://codereview.chromium.org/2319293002
2016-09-07 18:55:49 -07:00
msarett
600c737b64
Delete SkColorSpace::gammaNamed() from public API
...
Move fGammaNamed to SkColorSpace_Base.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2318663003
Review-Url: https://codereview.chromium.org/2318663003
2016-09-07 12:03:53 -07:00
robertphillips
62e9b145a1
Revert of Add GM/slide to simulate Android-style reveal clip (patchset #6 id:100001 of https://codereview.chromium.org/2316593003/ )
...
Reason for revert:
Shader compilation failure
Original issue's description:
> Add GM/slide to simulate Android-style reveal clip
>
> Hopefully, this will let us play w/ geometric and shader-based solutions.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003
>
> Committed: https://skia.googlesource.com/skia/+/ffac5c4aae18fc706e4077763c190a89c8507fb0
TBR=jvanverth@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/2316303002
2016-09-07 11:34:05 -07:00
robertphillips
ffac5c4aae
Add GM/slide to simulate Android-style reveal clip
...
Hopefully, this will let us play w/ geometric and shader-based solutions.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2316593003
Review-Url: https://codereview.chromium.org/2316593003
2016-09-07 10:34:06 -07:00
bsalomon
b77a907c2f
Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
...
Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.
Removes the unused and untested discard flush variation.
Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.
Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002
Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744
Review-Url: https://codereview.chromium.org/2307053002
2016-09-07 10:02:04 -07:00
brianosman
77320dbabc
Add color gamut xform helpers to GrGLSLShaderBuilder
...
New helper functions inject the necessary shader
function. Texture lookup functions can now insert
the gamut xform at the appropriate place, too.
As written, could be used to transform non-texture
colors (e.g. vertex colors) as well.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180803005
Review-Url: https://codereview.chromium.org/2180803005
2016-09-07 08:09:10 -07:00
msarett
653212c37e
Add gammaIsLinear() API to SkColorSpace
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319073002
Review-Url: https://codereview.chromium.org/2319073002
2016-09-07 07:13:27 -07:00
bsalomon
54dd2e244c
Add Vulkan docs
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2318603002
NOTRY=true
DOCS_PREVIEW= https://skia.org/?cl=2318603002
Review-Url: https://codereview.chromium.org/2318603002
2016-09-06 14:18:13 -07:00
bsalomon
5eb41fdf94
Revert of Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache. (patchset #4 id:60001 of https://codereview.chromium.org/2307053002/ )
...
Reason for revert:
Causing assertions on bots
Original issue's description:
> Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
>
> Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.
>
> Removes the unused and untested discard flush variation.
>
> Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.
>
> Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
> flush that just occurred.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002
>
> Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744
TBR=robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2312123003
2016-09-06 13:49:32 -07:00
vjiaoblack
c1a50e1b73
added radial lights to SkLights
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2301173004
Review-Url: https://codereview.chromium.org/2301173004
2016-09-06 13:03:30 -07:00
bsalomon
1dbb207bab
Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
...
Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.
Removes the unused and untested discard flush variation.
Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.
Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002
Review-Url: https://codereview.chromium.org/2307053002
2016-09-06 12:38:00 -07:00
msarett
47ae5c5d8f
Delete SkColorSpace::kUnknown_Named, remove fNamed field
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002
Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e
Review-Url: https://codereview.chromium.org/2302413002
2016-09-06 10:01:48 -07:00
csmartdalton
bf4a8f90c8
Improve usage of window rectangles
...
* Skips non-AA diff rect elements and replaces them with window
rectangles.
* Places window rectangles in the interiors of antialiased diff rects.
* Arranges two overlapping window rectangles in a plus shape inside of
diff rounded rects.
* Enables window rectangles when clearing and generating clip masks.
GTX 960 perf result (with vs. without window rectangles):
glinst4 msaa16 gpu
keymobi_pinterest.skp 0.48 -> 0.17 [ 35%] 2.77 -> 1.49 [ 54%] 0.22 -> 0.16 [ 70%]
keymobi_digg_com.skp 0.42 -> 0.23 [ 55%] 2.34 -> 1.08 [ 46%] 0.25 -> 0.21 [ 83%]
desk_jsfiddlebigcar.skp 0.28 -> 0.16 [ 59%] 1.70 -> 0.96 [ 57%] 0.19 -> 0.14 [ 70%]
top25desk_wordpress.skp 0.45 -> 0.18 [ 40%] 2.78 -> 1.53 [ 55%] 0.21 -> 0.19 [ 94%]
top25desk_weather_com.skp 2.01 -> 1.93 [ 96%] 23.5 -> 2.54 [ 11%] 1.90 -> 1.68 [ 88%]
keymobi_blogger.skp 0.57 -> 0.37 [ 65%] 2.87 -> 1.54 [ 54%] 0.43 -> 0.33 [ 77%]
keymobi_linkedin.skp 0.32 -> 0.17 [ 51%] 1.93 -> 1.04 [ 54%] 0.17 -> 0.15 [ 91%]
keymobi_bing_com_search_... 0.29 -> 0.25 [ 83%] 1.85 -> 1.23 [ 66%] 0.50 -> 0.24 [ 48%]
keymobi_theverge_com_201... 1.00 -> 0.67 [ 68%] 9.46 -> 3.84 [ 41%] 0.72 -> 0.65 [ 90%]
keymobi_sfgate_com_.skp 1.56 -> 1.13 [ 72%] 4.49 -> 2.86 [ 64%] 1.54 -> 1.11 [ 72%]
...
GEOMEAN (All 79 blink skps) 1.04 -> 0.90 [ 86%] 4.22 -> 2.81 [ 67%] 0.95 -> 0.89 [ 94%]
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289363005
Committed: https://skia.googlesource.com/skia/+/db42be9a326c747ff92ed1da8c3536c5b3e8e22b
Review-Url: https://codereview.chromium.org/2289363005
2016-09-06 10:01:07 -07:00
halcanary
e86134fc70
SkDocument: turn off SK_SUPPORT_LEGACY_DOCUMENT_API
...
no one seems to be using it.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2299653002
Review-Url: https://codereview.chromium.org/2299653002
2016-09-06 09:32:13 -07:00
caryclark
c3bfcb803a
Revert of Improve usage of window rectangles (patchset #9 id:160001 of https://codereview.chromium.org/2289363005/ )
...
Reason for revert:
broke build. See
https://build.chromium.org/p/client.skia/builders/Perf-Win8-MSVC-ShuttleA-GPU-GTX960-x86_64-Debug/builds/186
Original issue's description:
> Improve usage of window rectangles
>
> * Skips non-AA diff rect elements and replaces them with window
> rectangles.
> * Places window rectangles in the interiors of antialiased diff rects.
> * Arranges two overlapping window rectangles in a plus shape inside of
> diff rounded rects.
> * Enables window rectangles when clearing and generating clip masks.
>
> GTX 960 perf result (with vs. without window rectangles):
>
> glinst4 msaa16 gpu
> keymobi_pinterest.skp 0.48 -> 0.17 [ 35%] 2.77 -> 1.49 [ 54%] 0.22 -> 0.16 [ 70%]
> keymobi_digg_com.skp 0.42 -> 0.23 [ 55%] 2.34 -> 1.08 [ 46%] 0.25 -> 0.21 [ 83%]
> desk_jsfiddlebigcar.skp 0.28 -> 0.16 [ 59%] 1.70 -> 0.96 [ 57%] 0.19 -> 0.14 [ 70%]
> top25desk_wordpress.skp 0.45 -> 0.18 [ 40%] 2.78 -> 1.53 [ 55%] 0.21 -> 0.19 [ 94%]
> top25desk_weather_com.skp 2.01 -> 1.93 [ 96%] 23.5 -> 2.54 [ 11%] 1.90 -> 1.68 [ 88%]
> keymobi_blogger.skp 0.57 -> 0.37 [ 65%] 2.87 -> 1.54 [ 54%] 0.43 -> 0.33 [ 77%]
> keymobi_linkedin.skp 0.32 -> 0.17 [ 51%] 1.93 -> 1.04 [ 54%] 0.17 -> 0.15 [ 91%]
> keymobi_bing_com_search_... 0.29 -> 0.25 [ 83%] 1.85 -> 1.23 [ 66%] 0.50 -> 0.24 [ 48%]
> keymobi_theverge_com_201... 1.00 -> 0.67 [ 68%] 9.46 -> 3.84 [ 41%] 0.72 -> 0.65 [ 90%]
> keymobi_sfgate_com_.skp 1.56 -> 1.13 [ 72%] 4.49 -> 2.86 [ 64%] 1.54 -> 1.11 [ 72%]
> keymobi_ftw_usatoday_com... 0.59 -> 0.34 [ 57%] 2.80 -> 1.54 [ 55%] 1.21 -> 1.20 [ 99%]
> keymobi_shop_mobileweb_e... 0.46 -> 0.32 [ 70%] 2.60 -> 1.26 [ 48%] 0.35 -> 0.34 [ 97%]
> keymobi_cnn_com.skp 0.68 -> 0.42 [ 63%] 3.40 -> 2.10 [ 62%] 0.49 -> 0.45 [ 93%]
> keymobi_plus_google_com_... 0.77 -> 0.46 [ 60%] 4.83 -> 3.56 [ 74%] 0.52 -> 0.46 [ 89%]
> keymobi_wordpress.skp 0.50 -> 0.40 [ 81%] 2.60 -> 1.31 [ 50%] 0.40 -> 0.37 [ 91%]
> keymobi_androidpolice_co... 0.84 -> 0.73 [ 87%] 4.15 -> 2.05 [ 49%] 0.77 -> 0.67 [ 87%]
> keymobi_online_wsj_com_h... 0.55 -> 0.43 [ 78%] 2.91 -> 1.66 [ 57%] 0.45 -> 0.41 [ 90%]
> keymobi_iphone_capitolvo... 1.18 -> 0.96 [ 81%] 6.26 -> 4.96 [ 79%] 0.95 -> 0.92 [ 97%]
> keymobi_wikipedia__1_tab... 0.46 -> 0.41 [ 89%] 2.51 -> 1.24 [ 49%] 0.40 -> 0.38 [ 95%]
> keymobi_wikipedia__1_tab... 0.46 -> 0.42 [ 90%] 2.52 -> 1.25 [ 50%] 0.40 -> 0.38 [ 96%]
> keymobi_boingboing_net.skp 0.62 -> 0.56 [ 90%] 3.15 -> 1.80 [ 57%] 0.61 -> 0.56 [ 92%]
> keymobi_cnn_com_2012_10_... 0.86 -> 0.82 [ 95%] 2.81 -> 1.50 [ 53%] 0.91 -> 0.83 [ 91%]
> top25desk_techcrunch_com... 0.61 -> 0.56 [ 92%] 3.03 -> 1.76 [ 58%] 0.62 -> 0.56 [ 91%]
> top25desk_ebay_com.skp 1.18 -> 1.08 [ 92%] 2.23 -> 1.24 [ 56%] 1.14 -> 1.09 [ 96%]
> desk_css3gradients.skp 0.64 -> 0.61 [ 95%] 2.99 -> 1.54 [ 52%] 0.62 -> 0.61 [ 99%]
> top25desk_blogger.skp 0.61 -> 0.59 [ 96%] 2.50 -> 1.37 [ 55%] 0.60 -> 0.57 [ 95%]
> keymobi_nytimes_com_.skp 0.65 -> 0.64 [ 98%] 2.69 -> 1.42 [ 53%] 0.62 -> 0.59 [ 96%]
> keymobi_wowwiki_com_worl... 0.99 -> 0.92 [ 92%] 3.46 -> 2.06 [ 60%] 0.98 -> 0.95 [ 96%]
> keymobi_cuteoverload_com... 1.37 -> 1.26 [ 92%] 3.24 -> 2.45 [ 76%] 1.38 -> 1.35 [ 98%]
> keymobi_mobile_news_sand... 0.88 -> 0.81 [ 93%] 3.50 -> 2.07 [ 59%] 0.82 -> 0.81 [100%]
> top25desk_linkedin.skp 0.87 -> 0.87 [100%] 2.92 -> 1.73 [ 59%] 0.94 -> 0.86 [ 91%]
> top25desk_docs___1_open_... 1.43 -> 1.36 [ 95%] 1.87 -> 1.42 [ 76%] 0.73 -> 0.66 [ 91%]
> keymobi_reddit_com_r_pro... 0.68 -> 0.66 [ 96%] 2.49 -> 1.23 [ 49%] 0.65 -> 0.66 [102%]
> ...
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289363005
>
> Committed: https://skia.googlesource.com/skia/+/db42be9a326c747ff92ed1da8c3536c5b3e8e22b
TBR=bsalomon@google.com ,egdaniel@google.com,robertphillips@google.com,csmartdalton@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review-Url: https://codereview.chromium.org/2312173002
2016-09-06 07:09:54 -07:00
robertphillips
48fde9c412
Add a makeDrawContextWithFallback that handles config fallback
...
This fixes a bug in find_or_create_rrect_blur_mask where an A8-based drawContext was desired but creation was failing b.c. A8 wasn't renderable.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2296193005
Review-Url: https://codereview.chromium.org/2296193005
2016-09-06 05:20:20 -07:00
msarett
712bb1ecde
Delete kInvalid_GammaNamed (part 2)
...
We are done using this for UMA.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2306123002
Review-Url: https://codereview.chromium.org/2306123002
2016-09-05 10:33:12 -07:00
mgiuca
008fbd1b8e
Revert of Delete SkColorSpace::kUnknown_Named, remove fNamed field (patchset #1 id:20001 of https://codereview.chromium.org/2302413002/ )
...
Reason for revert:
This CL introduced two static initializers (gAdobeRGB and gSRGB) which are causing a sizes regression on Chromium builders:
https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/24981
Original issue's description:
> Delete SkColorSpace::kUnknown_Named, remove fNamed field
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002
>
> Committed: https://skia.googlesource.com/skia/+/54682e856cb66c653bc7e253981a421a2618398e
TBR=reed@google.com ,brianosman@google.com,msarett@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:5724
Review-Url: https://codereview.chromium.org/2306313002
2016-09-05 04:58:55 -07:00
msarett
54682e856c
Delete SkColorSpace::kUnknown_Named, remove fNamed field
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2302413002
Review-Url: https://codereview.chromium.org/2302413002
2016-09-02 14:25:06 -07:00
reed
de6c531e46
remove unused SkDevice::setMatrixClip
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2308733002
Review-Url: https://codereview.chromium.org/2308733002
2016-09-02 12:10:07 -07:00
csmartdalton
db42be9a32
Improve usage of window rectangles
...
* Skips non-AA diff rect elements and replaces them with window
rectangles.
* Places window rectangles in the interiors of antialiased diff rects.
* Arranges two overlapping window rectangles in a plus shape inside of
diff rounded rects.
* Enables window rectangles when clearing and generating clip masks.
GTX 960 perf result (with vs. without window rectangles):
glinst4 msaa16 gpu
keymobi_pinterest.skp 0.48 -> 0.17 [ 35%] 2.77 -> 1.49 [ 54%] 0.22 -> 0.16 [ 70%]
keymobi_digg_com.skp 0.42 -> 0.23 [ 55%] 2.34 -> 1.08 [ 46%] 0.25 -> 0.21 [ 83%]
desk_jsfiddlebigcar.skp 0.28 -> 0.16 [ 59%] 1.70 -> 0.96 [ 57%] 0.19 -> 0.14 [ 70%]
top25desk_wordpress.skp 0.45 -> 0.18 [ 40%] 2.78 -> 1.53 [ 55%] 0.21 -> 0.19 [ 94%]
top25desk_weather_com.skp 2.01 -> 1.93 [ 96%] 23.5 -> 2.54 [ 11%] 1.90 -> 1.68 [ 88%]
keymobi_blogger.skp 0.57 -> 0.37 [ 65%] 2.87 -> 1.54 [ 54%] 0.43 -> 0.33 [ 77%]
keymobi_linkedin.skp 0.32 -> 0.17 [ 51%] 1.93 -> 1.04 [ 54%] 0.17 -> 0.15 [ 91%]
keymobi_bing_com_search_... 0.29 -> 0.25 [ 83%] 1.85 -> 1.23 [ 66%] 0.50 -> 0.24 [ 48%]
keymobi_theverge_com_201... 1.00 -> 0.67 [ 68%] 9.46 -> 3.84 [ 41%] 0.72 -> 0.65 [ 90%]
keymobi_sfgate_com_.skp 1.56 -> 1.13 [ 72%] 4.49 -> 2.86 [ 64%] 1.54 -> 1.11 [ 72%]
keymobi_ftw_usatoday_com... 0.59 -> 0.34 [ 57%] 2.80 -> 1.54 [ 55%] 1.21 -> 1.20 [ 99%]
keymobi_shop_mobileweb_e... 0.46 -> 0.32 [ 70%] 2.60 -> 1.26 [ 48%] 0.35 -> 0.34 [ 97%]
keymobi_cnn_com.skp 0.68 -> 0.42 [ 63%] 3.40 -> 2.10 [ 62%] 0.49 -> 0.45 [ 93%]
keymobi_plus_google_com_... 0.77 -> 0.46 [ 60%] 4.83 -> 3.56 [ 74%] 0.52 -> 0.46 [ 89%]
keymobi_wordpress.skp 0.50 -> 0.40 [ 81%] 2.60 -> 1.31 [ 50%] 0.40 -> 0.37 [ 91%]
keymobi_androidpolice_co... 0.84 -> 0.73 [ 87%] 4.15 -> 2.05 [ 49%] 0.77 -> 0.67 [ 87%]
keymobi_online_wsj_com_h... 0.55 -> 0.43 [ 78%] 2.91 -> 1.66 [ 57%] 0.45 -> 0.41 [ 90%]
keymobi_iphone_capitolvo... 1.18 -> 0.96 [ 81%] 6.26 -> 4.96 [ 79%] 0.95 -> 0.92 [ 97%]
keymobi_wikipedia__1_tab... 0.46 -> 0.41 [ 89%] 2.51 -> 1.24 [ 49%] 0.40 -> 0.38 [ 95%]
keymobi_wikipedia__1_tab... 0.46 -> 0.42 [ 90%] 2.52 -> 1.25 [ 50%] 0.40 -> 0.38 [ 96%]
keymobi_boingboing_net.skp 0.62 -> 0.56 [ 90%] 3.15 -> 1.80 [ 57%] 0.61 -> 0.56 [ 92%]
keymobi_cnn_com_2012_10_... 0.86 -> 0.82 [ 95%] 2.81 -> 1.50 [ 53%] 0.91 -> 0.83 [ 91%]
top25desk_techcrunch_com... 0.61 -> 0.56 [ 92%] 3.03 -> 1.76 [ 58%] 0.62 -> 0.56 [ 91%]
top25desk_ebay_com.skp 1.18 -> 1.08 [ 92%] 2.23 -> 1.24 [ 56%] 1.14 -> 1.09 [ 96%]
desk_css3gradients.skp 0.64 -> 0.61 [ 95%] 2.99 -> 1.54 [ 52%] 0.62 -> 0.61 [ 99%]
top25desk_blogger.skp 0.61 -> 0.59 [ 96%] 2.50 -> 1.37 [ 55%] 0.60 -> 0.57 [ 95%]
keymobi_nytimes_com_.skp 0.65 -> 0.64 [ 98%] 2.69 -> 1.42 [ 53%] 0.62 -> 0.59 [ 96%]
keymobi_wowwiki_com_worl... 0.99 -> 0.92 [ 92%] 3.46 -> 2.06 [ 60%] 0.98 -> 0.95 [ 96%]
keymobi_cuteoverload_com... 1.37 -> 1.26 [ 92%] 3.24 -> 2.45 [ 76%] 1.38 -> 1.35 [ 98%]
keymobi_mobile_news_sand... 0.88 -> 0.81 [ 93%] 3.50 -> 2.07 [ 59%] 0.82 -> 0.81 [100%]
top25desk_linkedin.skp 0.87 -> 0.87 [100%] 2.92 -> 1.73 [ 59%] 0.94 -> 0.86 [ 91%]
top25desk_docs___1_open_... 1.43 -> 1.36 [ 95%] 1.87 -> 1.42 [ 76%] 0.73 -> 0.66 [ 91%]
keymobi_reddit_com_r_pro... 0.68 -> 0.66 [ 96%] 2.49 -> 1.23 [ 49%] 0.65 -> 0.66 [102%]
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289363005
Review-Url: https://codereview.chromium.org/2289363005
2016-09-02 11:36:25 -07:00
msarett
0764efe6a9
Add option to skip rects to drawImageLattice()
...
HWUI skips transparent rects when drawing.
When skia draws using bilerp, we will blend
transparent rects with neighboring rects and might
draw a bit of a smudge.
This CL adds the option to skip rects, allowing us
to have compatible behavior with the framework.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2305433002
Review-Url: https://codereview.chromium.org/2305433002
2016-09-02 11:24:30 -07:00
robertphillips
13a7eee250
Flush some non-substantive Ganesh changes
...
Split out of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2299523004
Review-Url: https://codereview.chromium.org/2299523004
2016-08-31 15:06:24 -07:00
robertphillips
1da3ecd078
Add read/write-Pixels to GrDrawContext
...
Although not absolutely required this does remove another case where the drawContext's backing store is accessed.
Broken out of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2298253002
Review-Url: https://codereview.chromium.org/2298253002
2016-08-31 14:54:15 -07:00
robertphillips
8abb370aca
Have GrSurfaceProxys and GrGpuResources draw from the same pool of unique ids
...
The idea here is that, for wrapped Proxy objects, we want the uniqueID to reflect that of the wrapped object. For this to work the IDs for the non-wrapped versions can't conflict with GrGpuResource's pool of IDs.
Split off of: https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2301523003
Review-Url: https://codereview.chromium.org/2301523003
2016-08-31 14:04:06 -07:00
csmartdalton
bde96c6263
Move clip mask generation into GrReducedClip
...
This is a temporary solution to facilitate window rectangles and make
clip mask generation more accessible for testing. The eventual goal is
to simplify clips and merge GrReducedClip into GrClipStackClip.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263343002
Review-Url: https://codereview.chromium.org/2263343002
2016-08-31 12:54:46 -07:00
csmartdalton
29df76096f
Define clear regions in terms of GrFixedClip
...
Updates clear APIs to take GrFixedClip instead of a rectangle. This
will allow us to use window rectangles with clears. Removes stencil
knobs from GrFixedClip.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262473003
Review-Url: https://codereview.chromium.org/2262473003
2016-08-31 11:55:52 -07:00
bsalomon
bd4569c232
Remove SkBitmap::getTexture()
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289313002
Review-Url: https://codereview.chromium.org/2289313002
2016-08-30 12:52:49 -07:00
cblume
33e0cb5e7f
Store mipmap levels in deferred texture image
...
This is a follow-up to https://codereview.chromium.org/2115023002/ and
https://codereview.chromium.org/2034933003/ which were reverted due to
an access violation and a memory leak, respectively.
When creating the deferred texture image, detect if using medium / high
quality. If so, generate and store mipmaps in the deferred texture
image.
When creating a texture from that be sure to read it back out.
BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2242883004
Review-Url: https://codereview.chromium.org/2242883004
2016-08-30 12:09:23 -07:00
halcanary
4f0a23a8d5
SkTextBlob: Begin implementing Extended TextBlob API
...
BUG=skia:5434
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2084533004
Review-Url: https://codereview.chromium.org/2084533004
2016-08-30 11:58:33 -07:00
bsalomon
9a44565e99
Remove custom data from GrGpuResource
...
Chrome is no longer relying on this feature to track mailboxes for textures.
BUG=skia:4134
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2291203002
Review-Url: https://codereview.chromium.org/2291203002
2016-08-30 09:42:30 -07:00
vjiaoblack
a8eabc4a2a
Moved ambient lights out of SkLight's light array
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002
Committed: https://skia.googlesource.com/skia/+/8f98f0aa2d3f7571a890b916c7c4b5ee831e9686
Review-Url: https://codereview.chromium.org/2287553002
2016-08-29 10:22:09 -07:00
bsalomon
fc9527a0df
Add support for glDrawRangeElements
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287003002
Review-Url: https://codereview.chromium.org/2287003002
2016-08-29 09:18:39 -07:00
vjiaoblack
84cddf6fa7
Revert of Moved ambient lights out of SkLight's light array (patchset #7 id:120001 of https://codereview.chromium.org/2287553002/ )
...
Reason for revert:
Made Deigo's GM miss their ambient lights
Original issue's description:
> Moved ambient lights out of SkLight's light array
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002
>
> Committed: https://skia.googlesource.com/skia/+/8f98f0aa2d3f7571a890b916c7c4b5ee831e9686
TBR=robertphillips@google.com ,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2291663002
2016-08-29 08:38:04 -07:00
reed
22b2af1dc4
dedup images/blobs/pictures by ID in old serialization format
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2289783002
Review-Url: https://codereview.chromium.org/2289783002
2016-08-29 07:52:13 -07:00
vjiaoblack
8f98f0aa2d
Moved ambient lights out of SkLight's light array
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2287553002
Review-Url: https://codereview.chromium.org/2287553002
2016-08-29 07:08:52 -07:00
halcanary
4871f22777
SkPDF: Glyph validation change
...
Instead of mapping invaid glyphIDs to zero or maxGlyphID,
don't draw them at all.
Validate glyphs when glyph is written, not ahead of time.
Don't allocate array to copy user-provided glyphs.
Easy early exit from SkPDFDevice::internalDrawText()
GlyphPositioner::flush() called ~GlyphPositioner()
SkScopeExit class now exists.
Assume SkTypeface* pointers are now never null in more
places.
precalculate alignmentFactor to clean up code.
SkPDFDevice::updateFont must be called with validated
glyphID. Skip bad glyphs to make this true.
SkPDFDevice::updateFont always succeeds.
SkPDFFont::GetFontResource always succeeds (preconditions are
asserted). If GetMetrics fails, don't call GetFontResource.
SkPDFFont::glyphsToPDFFontEncodingCount() becomes
SkPDFFont::countStretch() and is inlined.
SkPDFFont::glyphsToPDFFontEncoding now works one Glyph at a
time and is inlined.
SkPDFFont::noteGlyphUsage() operates one glyph at a time.
Add SkScopeExit.h; also a unit test for it.
SkPostConfig: Fix SK_UNUSED for Win32.
No public API changes.
TBR=reed@google.com
BUG=625995
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278703002
Review-Url: https://codereview.chromium.org/2278703002
2016-08-26 13:17:44 -07:00
bsalomon
cb31e51d93
Converts a drawPaint through a rrect clip to a drawRRect in GrDrawContext.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2271053004
Review-Url: https://codereview.chromium.org/2271053004
2016-08-26 10:48:19 -07:00
vjiaoblack
56f33ea2ac
Added distance attenuation and diffuse shading to PointLights
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246463004
Review-Url: https://codereview.chromium.org/2246463004
2016-08-26 08:49:46 -07:00
msarett
dca352e2d4
drawRegion() cleanups
...
(1) Move implementation to the cpp.
(2) Check for the isRect() case.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286693002
Review-Url: https://codereview.chromium.org/2286693002
2016-08-26 06:37:45 -07:00
msarett
cc319b95a5
GPU implementation of drawRegion()
...
Nexus 6P drawregion Bench Performance
Before 48.0ms
After 3.57ms
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267273006
Review-Url: https://codereview.chromium.org/2267273006
2016-08-25 18:07:18 -07:00
msarett
44df651ebe
Add drawRegion() API to SkCanvas
...
This will allow us to optimize for the RectGrid macrobench.
Currently, SkiaGL is much slower than OpenGL.
SkiaGL 12 items/s
OpenGL 160 items/s
This contains everything except for the fast implementation on GPU.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277053002
Review-Url: https://codereview.chromium.org/2277053002
2016-08-25 13:54:30 -07:00
bsalomon
21af9ca1b1
Respecify SkCanvas::drawArc, consolidate conversion to SkPath, add GM for oddball drawArcs
...
Allows the arc to wind more than 360 degrees when useCenter is true, specs that nothing draws
if the oval is empty or the sweep angle is 0.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281653002
Review-Url: https://codereview.chromium.org/2281653002
2016-08-25 12:29:24 -07:00
mtklein
f419781d37
update Android auto-detection.
...
Clang defines __ANDROID__
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278483004
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2278483004
2016-08-25 08:44:49 -07:00
vjiaoblack
e6f5d56231
Made shadows blurry (thru implementing variance mapping)
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2224163005
Review-Url: https://codereview.chromium.org/2224163005
2016-08-25 06:30:23 -07:00
hcm
199a2ea665
Update Skia milestone to 55
...
TBR=reed@google.com
No API changes, just moving version fwd.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281533002
Review-Url: https://codereview.chromium.org/2281533002
2016-08-25 06:19:31 -07:00
halcanary
e37aa89c5c
gyp/sfntly: set SK_SFNTLY_SUBSETTER uniformly
...
When Skia is built into the Android framework,
SK_SFNTLY_SUBSETTER="sample/chromium/font_subsetter.h".
This sets the same value for Skia's test framework
I will eventually move away from the
#include PREPROCESSOR_DEFINE
trick, which does not work everywhere.
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2274223002
2016-08-24 12:28:38 -07:00
mtklein
c095df55e8
GN: guard tools (except fiddle) by skia_enable_tools.
...
Our tools use third-party libraries pretty freely, some of which may not
be available in other GN environments (e.g. Fuchsia). Most can also not
function when Skia is built as a shared library.
fiddle stands alone as the exception to both those points: it depends on
only Skia, and works fine with both a shared or static library.
So guard everything but fiddle with this flag skia_enable_tools, disabled
when we're building for Fuchsia or when we're build a shared library.
This CL has a couple of little tweaks to Fiddle to keep it working:
- divorce it from :tool_utils, instead just building SkForceLinking.cpp itself;
- fix up a buggy rebase_path() that was accidentally working when we depended
on :tool_utils;
- drop test_only: it now only requires production-code dependencies.
The SkImageEncoder Create* methods need to be SK_API if we want SkForceLinking
to work across .so's. Without this, SkForceLinking needs to be part of Skia; it
can't be part of the application using Skia.
The rest is mostly just a re-indent under if (skia_enable_tools),
courtesy of gn format.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2273823003
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2273823003
2016-08-24 12:23:52 -07:00
fmalita
bf783b335c
Fix SkTLazy(const T*) initialization
...
Splitting the fix from https://codereview.chromium.org/2271743002/ .
R=bungeman@google.com ,mtklein@google.com
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2278633002
Review-Url: https://codereview.chromium.org/2278633002
2016-08-24 11:03:24 -07:00
ajuma
95243ebb68
Make GrTextureStripAtlas flush pending IO on newly acquired texture
...
GrTextureStripAtlas uses its own lock counts to protect against
overwriting its own earlier writes, but that doesn't protect against
IO that was pending when a texture was first acquired.
BUG=chromium:637678
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2262233002
Review-Url: https://codereview.chromium.org/2262233002
2016-08-24 08:19:03 -07:00
brianosman
8aeec39f1f
New helper for creating a color space from another, with linear gamma
...
Going to need this in many places once we expliclty require F16 surfaces
to have linear gamma color spaces.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270103002
Review-Url: https://codereview.chromium.org/2270103002
2016-08-24 05:11:20 -07:00
bsalomon
19fe41e85e
Remove SkPixelRef::getTexture()
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264293003
Review-Url: https://codereview.chromium.org/2264293003
2016-08-23 14:02:54 -07:00
vjiaoblack
e1e5c74086
Moving SkBlurImageFilter into core
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
Committed: https://skia.googlesource.com/skia/+/4d760175686df8f61a11b66946eb307d89dd2c75
Committed: https://skia.googlesource.com/skia/+/a97a1ab5719d5c355f7900b7f17dec1e467cf57e
Review-Url: https://codereview.chromium.org/2255803003
2016-08-23 11:13:14 -07:00
bungeman
2a57f2fb2f
Revert of Moving SkBlurImageFilter into core (patchset #9 id:160001 of https://codereview.chromium.org/2255803003/ )
...
Reason for revert:
Breaking internal roll. Still needs 'Create'.
Original issue's description:
> Moving SkBlurImageFilter into core
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
>
> Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
> Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
> Committed: https://skia.googlesource.com/skia/+/4d760175686df8f61a11b66946eb307d89dd2c75
> Committed: https://skia.googlesource.com/skia/+/a97a1ab5719d5c355f7900b7f17dec1e467cf57e
TBR=reed@google.com ,fmalita@chromium.org,vjiaoblack@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/2274603003
2016-08-23 10:04:54 -07:00
vjiaoblack
a97a1ab571
Moving SkBlurImageFilter into core
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
Committed: https://skia.googlesource.com/skia/+/4d760175686df8f61a11b66946eb307d89dd2c75
Review-Url: https://codereview.chromium.org/2255803003
2016-08-23 07:50:52 -07:00
bsalomon
4f3a0ca85d
GPU implementation of drawArc.
...
This adds analytic shaders for filled arcs and butt-cap stroked arcs where the center point is not used.
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259323003
Review-Url: https://codereview.chromium.org/2259323003
2016-08-22 13:14:26 -07:00
reed
4d2cce442d
check for wide-open inside quickContains
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2263373002
Review-Url: https://codereview.chromium.org/2263373002
2016-08-22 13:03:47 -07:00
vjiaoblack
a90dcf791b
Revert of Moving SkBlurImageFilter into core (patchset #8 id:140001 of https://codereview.chromium.org/2255803003/ )
...
Reason for revert:
Misnamed function.
Original issue's description:
> Moving SkBlurImageFilter into core
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
>
> Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
> Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
> Committed: https://skia.googlesource.com/skia/+/4d760175686df8f61a11b66946eb307d89dd2c75
TBR=reed@google.com ,fmalita@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/2265263002
2016-08-22 12:04:41 -07:00
vjiaoblack
4d76017568
Moving SkBlurImageFilter into core
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
Review-Url: https://codereview.chromium.org/2255803003
2016-08-22 12:00:25 -07:00
vjiaoblack
7b145120f2
Revert of Moving SkBlurImageFilter into core (patchset #8 id:140001 of https://codereview.chromium.org/2255803003/ )
...
Reason for revert:
Fixed it wrong, needs to revert to re-discuss and re-land.
Original issue's description:
> Moving SkBlurImageFilter into core
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
>
> Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
> Committed: https://skia.googlesource.com/skia/+/e426babe7552b1cb4e27cdf4e90826feabb9e3b0
TBR=reed@google.com ,fmalita@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/2266063002
2016-08-22 11:30:40 -07:00
vjiaoblack
e426babe75
Moving SkBlurImageFilter into core
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
Review-Url: https://codereview.chromium.org/2255803003
2016-08-22 10:51:27 -07:00
mtklein
2ec417257b
Revert of Moving SkBlurImageFilter into core (patchset #6 id:100001 of https://codereview.chromium.org/2255803003/ )
...
Reason for revert:
It looks like this breaks our roll into Google3:
https://test.corp.google.com/ui#id=OCL:130943857:BASE:130944046:1471881622765:61dbdd3
Original issue's description:
> Moving SkBlurImageFilter into core
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
>
> Committed: https://skia.googlesource.com/skia/+/dd3259eb95c3b47e11eefa3b176365a112a32b48
TBR=reed@google.com ,fmalita@chromium.org,vjiaoblack@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/2263283002
2016-08-22 09:25:59 -07:00
vjiaoblack
dd3259eb95
Moving SkBlurImageFilter into core
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255803003
Review-Url: https://codereview.chromium.org/2255803003
2016-08-22 08:50:20 -07:00
reed
a39667c848
add SkMatrixPriv for specialized helpers
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2268443002
Review-Url: https://codereview.chromium.org/2268443002
2016-08-22 06:39:49 -07:00
reed
589a39eb81
store info in basedevice, change getter to non-virtual const&
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261003003
Review-Url: https://codereview.chromium.org/2261003003
2016-08-20 07:59:19 -07:00
csmartdalton
02fa32c6d1
Move GrFixedClip into src directory
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254343003
Review-Url: https://codereview.chromium.org/2254343003
2016-08-19 13:29:27 -07:00
bsalomon
ac3aa245ac
Plumb drawArc to SkDevice.
...
Plumbs the drawArc canvas method down to SkDevice without converting to a path. Plumbs through the various recording canvas classes.
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257023003
Review-Url: https://codereview.chromium.org/2257023003
2016-08-19 11:25:20 -07:00
dvonbeck
af0f6efa35
Added SkColor4f::FromColor3f(SkColor3f, float a)
...
Planning to use this for the ColorDisplay widget in https://codereview.chromium.org/2259183003/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264643002
Review-Url: https://codereview.chromium.org/2264643002
2016-08-19 11:23:15 -07:00
mtklein
cbdf007bc2
Fast path translate() in SkCanvas and SkLiteDL.
...
This adds didTranslate() so that SkLiteDL (and other canvas recorders)
can record the translate rather than the full concat.
It also adds a case to SkMatrix::preTranslate() to fast path
translate x translate -> translate (i.e. +=).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002
Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1c
Misc bots failing in pictureimagefilter replay modes.
https://luci-milo.appspot.com/swarming/task/30b8e53f3a1f4f10/steps/dm/0/stdout
Problem is FMA vs. not.
CQ_INCLUDE_TRYBOTS=master.client.skia:
Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot
Review-Url: https://codereview.chromium.org/2255283002
2016-08-19 09:05:27 -07:00
mtklein
954df2fe9f
Revert of Fast path translate() in SkCanvas and SkLiteDL. (patchset #5 id:80001 of https://codereview.chromium.org/2255283002/ )
...
Reason for revert:
speculative
Original issue's description:
> Fast path translate() in SkCanvas and SkLiteDL.
>
> This adds didTranslate() so that SkLiteDL (and other canvas recorders)
> can record the translate rather than the full concat.
>
> It also adds a case to SkMatrix::preTranslate() to fast path
> translate x translate -> translate (i.e. +=).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002
>
> Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1c
TBR=herb@google.com ,reed@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/2264433002
2016-08-18 17:43:59 -07:00
msarett
10e3d9bf59
Batched implementation of drawLattice() for GPU
...
Bechmarks (Nexus 6P):
Src=100x100, Dst=250x250, NumRects=9
Android 77.7us
Skia (without patch) 57.2us
Skia (with patch) 30.9us
Src=100x100, Dst=500x500, NumRects=9
Android 77.0us
Skia (without patch) 56.9us
Skia (with patch) 31.8us
Src=100x100, Dst=1000x1000, NumRects=9
Android 180us
Skia (without patch) 96.8us
Skia (with patch) 70.5us
Src=100x100, Dst=250x250, NumRects=15
Android 208us
Skia (without patch) 155us
Skia (with patch) 38.2us
Src=100x100, Dst=500x500, NumRects=15
Android 207us
Skia (without patch) 152us
Skia (with patch) 38.4us
Src=100x100, Dst=1000x1000, NumRects=15
Android 233us
Skia (without patch) 156us
Skia (with patch) 99.9us
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255963002
Committed: https://skia.googlesource.com/skia/+/93242c4ae50dfcc0d922cdb3ba80bbc7b4bbe93d
Review-Url: https://codereview.chromium.org/2255963002
2016-08-18 15:46:03 -07:00
mtklein
5fa47f4fd1
Fast path translate() in SkCanvas and SkLiteDL.
...
This adds didTranslate() so that SkLiteDL (and other canvas recorders)
can record the translate rather than the full concat.
It also adds a case to SkMatrix::preTranslate() to fast path
translate x translate -> translate (i.e. +=).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002
Review-Url: https://codereview.chromium.org/2255283002
2016-08-18 15:42:32 -07:00
msarett
7fc08585d0
Revert of Batched implementation of drawLattice() for GPU (patchset #7 id:180001 of https://codereview.chromium.org/2255963002/ )
...
Reason for revert:
Things drawing weird.
Original issue's description:
> Batched implementation of drawLattice() for GPU
>
> Bechmarks (Nexus 6P):
>
> Src=100x100, Dst=250x250, NumRects=9
> Android 77.7us
> Skia (without patch) 57.2us
> Skia (with patch) 34.7us
>
> Src=100x100, Dst=500x500, NumRects=9
> Android 77.0us
> Skia (without patch) 56.9us
> Skia (with patch) 44.5us
>
> Src=100x100, Dst=1000x1000, NumRects=9
> Android 180us
> Skia (without patch) 96.8us
> Skia (with patch) 70.5us
>
> Src=100x100, Dst=250x250, NumRects=15
> Android 208us
> Skia (without patch) 155us
> Skia (with patch) 55.9us
>
> Src=100x100, Dst=500x500, NumRects=15
> Android 207us
> Skia (without patch) 152us
> Skia (with patch) 63.0us
>
> Src=100x100, Dst=1000x1000, NumRects=15
> Android 233us
> Skia (without patch) 156us
> Skia (with patch) 99.9us
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255963002
>
> Committed: https://skia.googlesource.com/skia/+/93242c4ae50dfcc0d922cdb3ba80bbc7b4bbe93d
TBR=bsalomon@google.com ,reed@google.com,djsollen@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review-Url: https://codereview.chromium.org/2255683004
2016-08-18 14:29:22 -07:00
msarett
9637ea91b8
Fix initialization bug for fConservativeIsScaleTranslate
...
Also don't mark it as conservative, we expect it to be correct all
the time.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261573002
Review-Url: https://codereview.chromium.org/2261573002
2016-08-18 14:03:30 -07:00
msarett
93242c4ae5
Batched implementation of drawLattice() for GPU
...
Bechmarks (Nexus 6P):
Src=100x100, Dst=250x250, NumRects=9
Android 77.7us
Skia (without patch) 57.2us
Skia (with patch) 34.7us
Src=100x100, Dst=500x500, NumRects=9
Android 77.0us
Skia (without patch) 56.9us
Skia (with patch) 44.5us
Src=100x100, Dst=1000x1000, NumRects=9
Android 180us
Skia (without patch) 96.8us
Skia (with patch) 70.5us
Src=100x100, Dst=250x250, NumRects=15
Android 208us
Skia (without patch) 155us
Skia (with patch) 55.9us
Src=100x100, Dst=500x500, NumRects=15
Android 207us
Skia (without patch) 152us
Skia (with patch) 63.0us
Src=100x100, Dst=1000x1000, NumRects=15
Android 233us
Skia (without patch) 156us
Skia (with patch) 99.9us
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255963002
Review-Url: https://codereview.chromium.org/2255963002
2016-08-18 13:11:48 -07:00
reed
3aafe111b6
make LayerIter private, and remove skipClip option
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257203002
Review-Url: https://codereview.chromium.org/2257203002
2016-08-18 12:45:34 -07:00
reed
7c1235457f
remove disable aa/dither flags from Props -- never used
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257643003
TBR=bsalomon
Review-Url: https://codereview.chromium.org/2257643003
2016-08-18 09:30:44 -07:00
robertphillips
f1c6cd7603
Rename WorseCaseSize to WorstCasSize
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2259863002
Review-Url: https://codereview.chromium.org/2259863002
2016-08-18 07:11:13 -07:00
brianosman
69c166d2ce
Add alphaType() to SkImage
...
Keep isOpaque as a convenience method -- many places really only need to
know that for optimization purposes (SrcOver -> Src, etc...).
In all the places where we pull data back out or convert to another
object and need to supply an SkImageInfo, we can avoid losing information
about premulness.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250663002
Review-Url: https://codereview.chromium.org/2250663002
2016-08-17 14:01:05 -07:00
csmartdalton
28341fad84
Implement difference clip rects with window rectangles
...
Plumbs the pipeline for window rectangles and uses them for a very
basic implementation of difference clip rects. This puts a common
Blink pattern on fast path, but we will still eventually need to make
more comprehensive use of window rectangles during clipping.
GTX 960 perf result:
gpu glinst4 glinst16
desk_jsfiddlebigcar.skp 0.254 -> 0.177 [70%] 0.279 -> 0.197 [71%] 0.577 -> 0.196 [34%]
keymobi_sfgate_com_.skp 0.697 -> 0.513 [74%] 0.766 -> 0.451 [59%] 0.769 -> 0.597 [78%]
keymobi_blogger.skp 0.406 -> 0.314 [77%] 0.436 -> 0.292 [67%] 0.696 -> 0.319 [46%]
desk_pokemonwiki.skp 0.121 -> 0.098 [81%] 0.13 -> 0.105 [81%] 0.216 -> 0.097 [45%]
desk_wikipedia.skp 0.121 -> 0.098 [81%] 0.13 -> 0.104 [80%] 0.199 -> 0.104 [52%]
keymobi_androidpolice_co... 0.443 -> 0.382 [86%] 0.447 -> 0.398 [89%] 0.444 -> 0.396 [89%]
keymobi_booking_com_sear... 1 .15 -> 1.03 [90%] 1.17 -> 1.06 [91%] 1.17 -> 1.05 [90%]
keymobi_theverge_com.skp 0.417 -> 0.396 [95%] 0.426 -> 0.405 [95%] 0.429 -> 0.4 [93%]
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2251573002
Review-Url: https://codereview.chromium.org/2251573002
2016-08-17 10:00:22 -07:00
msarett
549ca329cf
Modify SkPngCodec to recognize 565 images from the sBIT chunk
...
Conveniently, SkPngImageEncoder already writes the sBIT chunk
appropriately.
BUG=skia:5616
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212563003
Review-Url: https://codereview.chromium.org/2212563003
2016-08-17 08:54:08 -07:00
jvanverth
6c177a1a49
Add alternative ambient shadow method to Android shadow sample
...
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249973003
Review-Url: https://codereview.chromium.org/2249973003
2016-08-17 07:59:41 -07:00
msarett
36931c2b47
Add test for platform encoders, turn off platform encoders by default
...
Clients that like WIC and CG can still use them. And we can be
confident about that, since we now test WIC and CG.
Let Skia always use our own encoders by default, so we can do cool,
custom things on all platforms.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250683003
Review-Url: https://codereview.chromium.org/2250683003
2016-08-16 15:11:24 -07:00
halcanary
3287588a46
SkPDF: SkPDFFont class changes
...
SkPDFFont:
* inline some one-line methdods.
- SkPDFFont::typeface()
- SkPDFFont::fontInfo()
- SkPDFFont::firstGlyphID()
- SkPDFFont::lastGlyphID()
- SkPDFFont::getFontDescriptor()
* de-virtualize some methods:
- SkPDFFont::getType()
- SkPDFFont::multiByteGlyphs()
* Constructor takes more arguments:
fontType, multiByteGlyphs
* re-order fields (pointers before shorts)
* use sk_sp<T> more, T* less
SkAdvancedTypefaceMetrics:
* SkAdvancedTypefaceMetrics::fFont now a uint8_t
* other enumes are sized.
* SkAdvancedTypefaceMetrics::fStyle now big enough.
* remove use of SkTBitOr, replaced with fancy templates
No public API changes.
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246903002
Review-Url: https://codereview.chromium.org/2246903002
2016-08-16 09:36:23 -07:00
mtklein
883c8efae7
SkLiteDL: remove freelisting, add reset() and SKLITEDL_PAGE knob.
...
We think Android can cache these better than a global freelist allows.
This removes the freelisting but adds reset() to allow reuse.
I took the opportunity to abstract 4096 as a define SKLITEDL_PAGE.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248693004
Review-Url: https://codereview.chromium.org/2248693004
2016-08-16 09:36:18 -07:00
msarett
168820625c
Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy
...
out/Release/nanobench --match Lattice --config gpu --ms 3000
3.42ms -> 17.2us
For reference, a loop over drawBitmapRects (which is what
Android currently does) is about 13us.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205273003
Review-Url: https://codereview.chromium.org/2205273003
2016-08-16 09:31:08 -07:00
robertphillips
c4d2f90731
Update ComputeBlurredRRectParams to compute all the parameters needed for occluded blurred rrect ninepatch draws
...
This is split out of: https://codereview.chromium.org/2245653002/ (Start using vertex attributes for nine-patch blurred rrect draws)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248533002
Review-Url: https://codereview.chromium.org/2248533002
2016-08-16 09:30:03 -07:00
hstern
e6f8ff0013
Defined SkDEBUGFAILF on Release builds
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244253003
Review-Url: https://codereview.chromium.org/2244253003
2016-08-15 15:26:31 -07:00
bsalomon
7f0d9f3920
Attempt to throw away rrect clips of rrects.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241273003
Review-Url: https://codereview.chromium.org/2241273003
2016-08-15 14:49:10 -07:00
mtklein
8bbbb696cd
Revert of add parallel public API for recording SkLiteDL. (patchset #1 id:1 of https://codereview.chromium.org/2246893002/ )
...
Reason for revert:
looking like we won't need this
Original issue's description:
> add parallel public API for recording SkLiteDL.
>
> The API is restricted to pretty much just what Derek calls,
> but it's enough that we can switch testing over to use it.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246893002
>
> Committed: https://skia.googlesource.com/skia/+/ced26a3d6b77d3a6744a8ccb8eff23eda45fc867
TBR=djsollen@google.com ,reed@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/2243393002
2016-08-15 12:56:00 -07:00
dvonbeck
6ad75d10eb
LightingFP now supports multiple directional lights
...
BUG=skia:5518
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2239933004
Review-Url: https://codereview.chromium.org/2239933004
2016-08-15 11:35:55 -07:00
csmartdalton
d211e7875d
Convert GrAppliedClip interface to builder style
...
GrAppliedClip was about at its limit for how many "make" functions it
could have. Window rectangles would push it over the edge. This change
makes it so GrDrawTarget supplies the original draw bounds to the
constructor, and then GrClip adds the various required clipping
techniques.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246113002
Review-Url: https://codereview.chromium.org/2246113002
2016-08-15 11:17:19 -07:00
mtklein
ced26a3d6b
add parallel public API for recording SkLiteDL.
...
The API is restricted to pretty much just what Derek calls,
but it's enough that we can switch testing over to use it.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246893002
Review-Url: https://codereview.chromium.org/2246893002
2016-08-15 08:05:39 -07:00
vjiaoblack
772b5ee446
Added PointLights to SkLights::Light
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237493002
Review-Url: https://codereview.chromium.org/2237493002
2016-08-12 11:38:47 -07:00
msarett
fbfa258027
Optimized implementation of quickReject()
...
Impl Overview
(1) Keep the device clip bounds up to date. This
requires minimal additional work in a few places
throughout canvas.
(2) Keep track of if the ctm isScaleTranslate. Yes,
there's a function that does this, but it's slow
to call.
(3) Perform the src->device transform in quick reject,
then check intersection/nan.
Other Notes:
(1) NaN and intersection checks are performed
simultaneously.
(2) We no longer quick reject infinity.
(3) Affine and perspective are both handled in the slow
case.
(4) SkRasterClip::isEmpty() is handled by the intersection
check.
Performance on Nexus 6P:
93.2ms -> 59.8ms
Overall Android Jank Tests Performance Impact:
Should gain us a ms or two on some tests.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002
Committed: https://skia.googlesource.com/skia/+/d22a817ff57986407facd16af36320fc86ce02da
Review-Url: https://codereview.chromium.org/2225393002
2016-08-12 08:29:08 -07:00
mtklein
5aeb2fa253
Revert of Optimized implementation of quickReject() (patchset #12 id:260001 of https://codereview.chromium.org/2225393002/ )
...
Reason for revert:
New assert triggering in the Chrome roll,
https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/208750/steps/webkit_unit_tests%20%28with%20patch%29%20on%20Ubuntu-12.04/logs/FrameThrottlingTest.SynchronousLayoutInAnimationFrameCallback
and breaks the SKNX_NO_SIMD bot,
https://codereview.chromium.org/2236363004
Original issue's description:
> Optimized implementation of quickReject()
>
> Impl Overview
> (1) Keep the device clip bounds up to date. This
> requires minimal additional work in a few places
> throughout canvas.
> (2) Keep track of if the ctm isScaleTranslate. Yes,
> there's a function that does this, but it's slow
> to call.
> (3) Perform the src->device transform in quick reject,
> then check intersection/nan.
>
> Other Notes:
> (1) NaN and intersection checks are performed
> simultaneously.
> (2) We no longer quick reject infinity.
> (3) Affine and perspective are both handled in the slow
> case.
> (4) SkRasterClip::isEmpty() is handled by the intersection
> check.
>
> Performance on Nexus 6P:
> 93.2ms -> 59.8ms
>
> Overall Android Jank Tests Performance Impact:
> Should gain us a ms or two on some tests.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002
>
> Committed: https://skia.googlesource.com/skia/+/d22a817ff57986407facd16af36320fc86ce02da
TBR=reed@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/2231393003
2016-08-12 02:22:33 -07:00
msarett
d22a817ff5
Optimized implementation of quickReject()
...
Impl Overview
(1) Keep the device clip bounds up to date. This
requires minimal additional work in a few places
throughout canvas.
(2) Keep track of if the ctm isScaleTranslate. Yes,
there's a function that does this, but it's slow
to call.
(3) Perform the src->device transform in quick reject,
then check intersection/nan.
Other Notes:
(1) NaN and intersection checks are performed
simultaneously.
(2) We no longer quick reject infinity.
(3) Affine and perspective are both handled in the slow
case.
(4) SkRasterClip::isEmpty() is handled by the intersection
check.
Performance on Nexus 6P:
93.2ms -> 59.8ms
Overall Android Jank Tests Performance Impact:
Should gain us a ms or two on some tests.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002
Review-Url: https://codereview.chromium.org/2225393002
2016-08-11 14:40:04 -07:00
brianosman
86e7626f08
Move GrAtlasTextContext to GrDrawingManager, so we only have one.
...
Ultimately, avoids wasteful redundant computation and storage of distance
field fake-gamma tables.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2240623002
Review-Url: https://codereview.chromium.org/2240623002
2016-08-11 12:17:32 -07:00
msarett
6372e65909
Delete quickRejectY()
...
This is the first step in a refactor of quickReject().
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241473002
Review-Url: https://codereview.chromium.org/2241473002
2016-08-11 10:31:49 -07:00
bsalomon
198ca42c67
Inline fast path for GrPaint::isConstantBlendedColor when no color FPs and src-over blend.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2236423002
Review-Url: https://codereview.chromium.org/2236423002
2016-08-11 07:39:33 -07:00
reed
a9ca05ca5e
Deserialize pictures with custom image-deserializer
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187613002
Review-Url: https://codereview.chromium.org/2187613002
2016-08-11 03:55:15 -07:00
hstern
7cffe9733b
Add constructor to DashInfo to enable initializer lists
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2230143003
Review-Url: https://codereview.chromium.org/2230143003
2016-08-10 16:36:11 -07:00
fmalita
0cbe77c383
Add a SkTLazy copy assignment operator
...
Also scrub for NULL, etc.
R=mtklein@google.com ,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2232913003
Review-Url: https://codereview.chromium.org/2232913003
2016-08-10 16:30:37 -07:00
robertphillips
27cdd94790
Implement GPU occluded blur mask filter
...
Spawned off: https://codereview.chromium.org/2214163003/ (Minor clean up related to blur mask filters)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201133002
Review-Url: https://codereview.chromium.org/2201133002
2016-08-10 16:25:25 -07:00
reed
2ab9057b31
update textblob api to use sk_sp
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2236013002
NOTREECHECKS=True
Review-Url: https://codereview.chromium.org/2236013002
2016-08-10 14:16:41 -07:00
robertphillips
f5a83e8184
Create blurred RRect mask on GPU (rather than uploading it)
...
This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)
All blurred rrects using the "analytic" path will change slightly with this CL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004
Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50
Review-Url: https://codereview.chromium.org/2222083004
2016-08-10 12:00:09 -07:00
csmartdalton
f9635999a4
Add flag for window rectangles to GrRenderTarget
...
Adds a flag to GrRenderTarget that indicates whether it can be used
with window rectangles. Also attempts to clean up some of the mixed
samples API.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225303002
Review-Url: https://codereview.chromium.org/2225303002
2016-08-10 11:09:07 -07:00
csmartdalton
ceeaa78713
Fix SkDEBUGCODE to accept commas
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231663002
Review-Url: https://codereview.chromium.org/2231663002
2016-08-10 10:07:58 -07:00
bungeman
ce81ed58e2
Remove no longer existing friend.
...
sk_fontmgr_create_default used to exist before SkFontMgr::RefDefault
could do the job better. There are no actual implementations for this
function, so SkFontMgr should no longer be friends with it.
TBR=reed
Removes a deceased friend.
Review-Url: https://codereview.chromium.org/2232963002
2016-08-10 09:23:43 -07:00
robertphillips
3f0e6945f8
Revert of Create blurred RRect mask on GPU (rather than uploading it) (patchset #5 id:80001 of https://codereview.chromium.org/2222083004/ )
...
Reason for revert:
No NoGPU bot on commit queue ?
Original issue's description:
> Create blurred RRect mask on GPU (rather than uploading it)
>
> This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)
>
> All blurred rrects using the "analytic" path will change slightly with this CL.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004
>
> Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
> Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50
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/2232953002
2016-08-10 08:40:35 -07:00
mtklein
3ff2cc81a5
constexpr NaN,+Inf,-Inf
...
Reading extern values meant these couldn't be compile-time constants.
math.h has INFINITY, which is macro that is supposed to expand to float +inf.
On MSVC it seems it's natively a double, so we cast just to make sure.
There's nan(const char*) in math.h for NaN too, but I don't trust that
to be compile-time evaluated. So instead, we keep reinterpreting a bit pattern.
I did try to write
static constexpr float float_nan() { ... }
and completely failed. constexpr seems a bit too restrictive in C++11 to make
it work, but Clang kept telling me, you'll be able to do this with C++14.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233853002
Review-Url: https://codereview.chromium.org/2233853002
2016-08-10 08:31:42 -07:00
mtklein
3d96cb8db7
Default GR_GL_FUNCTION_TYPE to __stdcall on Windows.
...
Why is this configurable if we can't work without it?
Just to confirm, this is a Windows constraint, not an MSVC constraint, right?
Clang on Windows also needs __stdcall?
BUG=skia:5617
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233883002
Review-Url: https://codereview.chromium.org/2233883002
2016-08-10 07:30:21 -07:00
robertphillips
94b5c5a411
Create blurred RRect mask on GPU (rather than uploading it)
...
This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)
All blurred rrects using the "analytic" path will change slightly with this CL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004
Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
Review-Url: https://codereview.chromium.org/2222083004
2016-08-10 07:14:55 -07:00
halcanary
c5769b2e49
Revert of Change mapRectScaleTranslate to pass args/ret by value (patchset #2 id:20001 of https://codereview.chromium.org/2138943002/ )
...
Reason for revert:
Build-Ubuntu-GCC-Arm7-Release-Android fails.
Original issue's description:
> Change mapRectScaleTranslate to pass args/ret by value
>
> This reverts commit 6092b6e0e5
.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2138943002
>
> Committed: https://skia.googlesource.com/skia/+/1bd13ca922d6448d595064faee486eaf3fa56e56
TBR=mtklein@google.com ,msarett@google.com,reed@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/2234843002
2016-08-10 07:13:21 -07:00
reed
1bd13ca922
Change mapRectScaleTranslate to pass args/ret by value
...
This reverts commit 6092b6e0e5
.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2138943002
Review-Url: https://codereview.chromium.org/2138943002
2016-08-10 06:17:54 -07:00