halcanary
5abbb44f68
SkPDF: flip saveLayer rightside up
...
Broken in https://skia.googlesource.com/skia/+/4b1e17e
BUG=632574
TBR=tomhudson@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197623002
Review-Url: https://codereview.chromium.org/2197623002
2016-07-29 08:41:33 -07:00
robertphillips
1e8761809d
Remove GrContext::applyGamma
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2191323002
Review-Url: https://codereview.chromium.org/2191323002
2016-07-29 08:28:25 -07:00
csmartdalton
e0d362929d
Add test configs for instanced rendering
...
Adds the following configs and enables them on select bots:
glinst, glinst4, glinstdit4, glinst16, glinstdit16,
esinst, esinst4, esinstdit4
Makes general changes to GrContextOptions, GrCaps, etc. to facilitate
this.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182783004
Review-Url: https://codereview.chromium.org/2182783004
2016-07-29 08:14:20 -07:00
egdaniel
0d9990f052
Merge ProgramDesc's for GL and Vulkan
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184413002
Review-Url: https://codereview.chromium.org/2184413002
2016-07-29 07:36:52 -07:00
msarett
50ce1f28ff
Add color space xform support to SkJpegCodec (includes F16!)
...
Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA
Instead of:
RGBA->SkPMColor
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
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/+/73d55332e2846dd05e9efdaa2f017bcc3872884b
Review-Url: https://codereview.chromium.org/2174493002
2016-07-29 06:23:33 -07:00
msarett
39979d8c6b
Revert of Add color space xform support to SkJpegCodec (includes F16!) (patchset #9 id:260001 of https://codereview.chromium.org/2174493002/ )
...
Reason for revert:
Breaking MSAN
Original issue's description:
> Add color space xform support to SkJpegCodec (includes F16!)
>
> Also changes SkColorXform to support:
> RGBA->RGBA
> RGBA->BGRA
>
> Instead of:
> RGBA->SkPMColor
>
> TBR=reed@google.com
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
> 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/+/73d55332e2846dd05e9efdaa2f017bcc3872884b
TBR=mtklein@google.com ,reed@google.com,herb@google.com,brianosman@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/2195523002
2016-07-28 17:11:18 -07:00
robertphillips
ecf3dbe8f2
Remove use of MakeRenderTargetDirect from view system
...
Here is the CL that sent me down the SkGammaColorFilter path
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2178353005
Review-Url: https://codereview.chromium.org/2178353005
2016-07-28 15:17:34 -07:00
msarett
73d55332e2
Add color space xform support to SkJpegCodec (includes F16!)
...
Also changes SkColorXform to support:
RGBA->RGBA
RGBA->BGRA
Instead of:
RGBA->SkPMColor
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174493002
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/2174493002
2016-07-28 15:06:16 -07:00
mtklein
dc90b53350
Silence -Wclobbered in each file that needs it.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184823009
Committed: https://skia.googlesource.com/skia/+/03f704a343d7a82974f977eda8789a8c721c93e5
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Win-MSVC-GCE-CPU-AVX2-x86-Release-Trybot
Review-Url: https://codereview.chromium.org/2184823009
2016-07-28 14:45:28 -07:00
halcanary
00450f1ae5
SkPDF: drawText makes use of SkPaint.measureText() for alignment.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188303003
Review-Url: https://codereview.chromium.org/2188303003
2016-07-28 14:33:13 -07:00
reed
9b84f8c812
turn bitmaps into images during recording
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185563003
Review-Url: https://codereview.chromium.org/2185563003
2016-07-28 14:26:13 -07:00
mtklein
2f428966c6
Revert of Silence -Wclobbered in each file that needs it. (patchset #2 id:20001 of https://codereview.chromium.org/2184823009/ )
...
Reason for revert:
Jpeg strategy seems to be leading to crashes. Gonna go back to warning squelch.
Original issue's description:
> Silence -Wclobbered in each file that needs it.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184823009
>
> Committed: https://skia.googlesource.com/skia/+/03f704a343d7a82974f977eda8789a8c721c93e5
TBR=msarett@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/2188313003
2016-07-28 13:59:59 -07:00
bsalomon
4d516a6903
Serialize SkColorSpace into DeferredTextureImage
...
This fixes a memory leak that occurs when DeferredTextureImage is deallocated without being destroyed. It is intended to be stored in discarable memory and thus this has to be safe.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184823010
Review-Url: https://codereview.chromium.org/2184823010
2016-07-28 13:37:31 -07:00
mtklein
03f704a343
Silence -Wclobbered in each file that needs it.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184823009
Review-Url: https://codereview.chromium.org/2184823009
2016-07-28 11:57:31 -07:00
msarett
a0605bf9d1
Add writeToMemory() API to SkColorSpace
...
New API mirrors the form of similar APIs in SkRegion,
SkMatrix, etc.
This also fixes a bug:
SkImageInfo appears in a object that Chrome stores in
discardable memory. So when sk_sp<SkColorSpace> was added
to SkImageInfo a leak was introduced. We'll use this new
method and deserialize to store the SkColorSpace in the
discardable object.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2192903002
Review-Url: https://codereview.chromium.org/2192903002
2016-07-28 10:47:50 -07:00
fmalita
eae6a91277
SkPaint intercept API for SkTextBlob and horizontal text
...
Add getPosTextHIntercepts(), getTextBlobIntercepts().
Consolidate the implementation in GetTextIntercepts<> template.
BUG=chormium:581456
R=caryclark@google.com ,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186663004
Review-Url: https://codereview.chromium.org/2186663004
2016-07-28 09:47:24 -07:00
robertphillips
a408c8fb6d
Add SkGammaColorFilter
...
WDYT about this as a means of replacing GrContext::applyGamma with a normal SkCanvas::drawImage?
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190573002
Review-Url: https://codereview.chromium.org/2190573002
2016-07-28 09:20:33 -07:00
dvonbeck
bba4cfebca
Added API for Bevel NormalSource.
...
This CL adds an API for Bevel normal source and a dummy implementation that returns a normal (0, 0, 1) every time.
This CL's base is the CL for accepting nullptrs: https://codereview.chromium.org/2132113002
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2080993002
Review-Url: https://codereview.chromium.org/2080993002
2016-07-28 08:58:19 -07:00
egdaniel
b4021cfd66
Don't call finish on GrDrawTarget if we drew no batches
...
This might give us some minor perf gains in vulkan since we won't be submitting
command buffers that we've added to batch draws to. Running nanobench this does
seem to happen pretty often.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2179903008
Review-Url: https://codereview.chromium.org/2179903008
2016-07-28 08:53:07 -07:00
tomhudson
92772222bf
Revert of align cap hairline first point (patchset #2 id:20001 of https://codereview.chromium.org/2189583003/ )
...
Reason for revert:
Speculative revert in case this is blocking our roll.
Original issue's description:
> align cap hairline first point
>
> Hairlines with square caps move the endpoints out by 1/2 pixel.
> The last point needs to be the first adjusted point, instead
> of the point supplied to move to.
>
> R=fmalita@chromium.org
> TBR=reed@google.com
> BUG=617658
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189583003
>
> Committed: https://skia.googlesource.com/skia/+/52f85d4d09b815fce6bfe296a1dd2cbf8d792f05
TBR=fmalita@chromium.org ,reed@google.com,caryclark@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=617658
Review-Url: https://codereview.chromium.org/2188483007
2016-07-28 07:36:28 -07:00
halcanary
4b1e17edc7
SkPdf: SkPDFFormXObject de-class-ified.
...
We don't need an object, just a few standard fields on the
base class; the change lets us get rid of a bunch of
boilerplate code.
I think this also reduces the cognitive load of the SkPDF
internals.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185803003
Review-Url: https://codereview.chromium.org/2185803003
2016-07-27 14:49:46 -07:00
halcanary
fe8f0e0d31
SkPDF: refactor font subset: fewer copies
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190643002
Review-Url: https://codereview.chromium.org/2190643002
2016-07-27 14:14:04 -07:00
msarett
7b9b541af8
Expose more gamma info for UMA statistics
...
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188633003
Review-Url: https://codereview.chromium.org/2188633003
2016-07-27 13:51:46 -07:00
csmartdalton
34ee0c950e
Fix GrDrawContextPriv::stencilRect
...
Updates stencilRect to call drawNonAAFilledRect instead of
drawFilledRect. drawFilledRect can use coverage AA, which isn't
appropriate for stencil draws. Also modifies drawNonAAFilledRect to
take a "useHWAA" argument instead of trying to deduce whether it
should be used.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187583002
Review-Url: https://codereview.chromium.org/2187583002
2016-07-27 13:22:27 -07:00
caryclark
52f85d4d09
align cap hairline first point
...
Hairlines with square caps move the endpoints out by 1/2 pixel.
The last point needs to be the first adjusted point, instead
of the point supplied to move to.
R=fmalita@chromium.org
TBR=reed@google.com
BUG=617658
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189583003
Review-Url: https://codereview.chromium.org/2189583003
2016-07-27 12:50:09 -07:00
robertphillips
6738c70242
Rename GrContext's newDrawContext & drawContext to makeDrawContext
...
These both return sk_sp.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186073002
Review-Url: https://codereview.chromium.org/2186073002
2016-07-27 12:13:51 -07:00
caryclark
d6562000ef
require semi at the end of SkASSERT and friends
...
R=bungeman@google.com
TBR=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185063002
Review-Url: https://codereview.chromium.org/2185063002
2016-07-27 12:02:07 -07:00
halcanary
ac0e00dcec
SkPDF: SkPDFStream takes a unique_ptr
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188623004
Review-Url: https://codereview.chromium.org/2188623004
2016-07-27 11:12:23 -07:00
benjaminwagner
cb571e1148
Rename textual includes as *.inc.
...
This makes it easier to distinguish source files that can stand on their own vs files meant to be #included into other source files.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184143002
Review-Url: https://codereview.chromium.org/2184143002
2016-07-27 11:12:12 -07:00
bsalomon
bb0ab4df70
Fix leak of srgb/adobesrgb colorspace objects
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185043002
Review-Url: https://codereview.chromium.org/2185043002
2016-07-27 08:58:31 -07:00
caryclark
fc560e09b3
fuzz wednesday
...
Add debug 'skip assert' access to SkCoincidentSpans.
That permits suppressing asserts to make it easier
to detect when this fuzz data generates unparsable
data.
TBR=reed@google.com
BUG=631564, 631992
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186973002
Review-Url: https://codereview.chromium.org/2186973002
2016-07-27 08:46:10 -07:00
egdaniel
735109c248
Add gyp define to enable vulkan debug layers
...
On Debug vulkan bots, running with the debug layers on seems to be adding
more than an hour to the total running time. Since we suppress any output
on the bots anyways the debug layers are serving no purpose. Thus I am
adding a gyp define to disable the layers on the bot.
With this change, by default when running vulkan in Debug, the debug_layers
will be enabled. The bots should disable the layers. Android framework
should also have them disabled by default.
TBR=djsollen@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185953003
Review-Url: https://codereview.chromium.org/2185953003
2016-07-27 08:03:57 -07:00
brianosman
9f97882322
Simplify color space xform storage and usage (float[] vs. SkMatrix44)
...
Public API is really just internal.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185533005
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/2185533005
2016-07-27 05:25:26 -07:00
csmartdalton
fc49d56feb
Implement coverage AA for skewed rects with local coords
...
Adds a path fallback for rects with local coords that can't be drawn
with an analytic shader. This is accomplished by modifying the view
matrix and then drawing the local rect/quad.
BUG=skia:5500, 7508
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183223002
Review-Url: https://codereview.chromium.org/2183223002
2016-07-26 17:05:47 -07:00
mtklein
7fd93e349a
Start measuring f16 and srgb speed.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2181073003
Review-Url: https://codereview.chromium.org/2181073003
2016-07-26 13:05:31 -07:00
reed
e93393b311
don't specialize drawBitmapRect for minirecorder; no longer called by blink
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183193002
Review-Url: https://codereview.chromium.org/2183193002
2016-07-26 12:21:10 -07:00
bsalomon
d1bdd1fcbd
Use Windowing system-specific WindowContext factories.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2169543002
Review-Url: https://codereview.chromium.org/2169543002
2016-07-26 12:02:51 -07:00
robertphillips
7e92276554
Reduce usage of MakeRenderTargetDirect
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187573002
Review-Url: https://codereview.chromium.org/2187573002
2016-07-26 11:38:17 -07:00
brianosman
3a0dbde1cf
Remove SkSurfaceProps gamma-correctness flag entirely.
...
This is no longer required - gamma-correctness is now just based on the
presence or absence of a color space.
Public API change is just removal of (unused) flag.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188463002
TBR=bsalomon@google.com
Review-Url: https://codereview.chromium.org/2188463002
2016-07-26 11:36:05 -07:00
brianosman
9dc935fa11
Remove all usage of SkSurfaceProps::isGammaCorrect()
...
DrawContext's isGammaCorrect now just based on presence of color space.
Next change will remove the function and flag entirely, but I wanted to
land this separately. This alters a few GMs in srgb/f16 mode, generally
those that are creating off-screen surfaces in ways that were somewhat
lossy before. No unexplained changes.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186633002
Review-Url: https://codereview.chromium.org/2186633002
2016-07-26 10:21:55 -07:00
mtklein
a5e1e33d39
Fix alignment problems in NEON Sk4b.
...
As written at head, the compiler can assume these loads and stores are 4
byte aligned [1]. We want Sk4b to load from any 1-byte aligned address,
to prevent crashes like [2].
[1] https://llvm.org/bugs/show_bug.cgi?id=24421
[2] https://luci-milo.appspot.com/swarming/task/304079e125b1b910/steps/nanobench/0/stdout
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183133002
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/2183133002
2016-07-26 10:07:34 -07:00
caryclark
e25a4f6cbe
fix fuzz bugs
...
Add ability for intersection template to detect that
the test contains bounded numbers so that extra
asserts can trigger.
Add some exit points for out of range numbers
in those templates.
TBR=reed@google.com
BUG=631383,631374,631360
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185703002
Review-Url: https://codereview.chromium.org/2185703002
2016-07-26 09:26:29 -07:00
brianosman
efded51cd8
Always supply a color space (sRGB for now) with F16
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177193004
Review-Url: https://codereview.chromium.org/2177193004
2016-07-26 08:11:50 -07:00
mtklein
f660b7cfcf
Add Sk4h_load4 for loading F16.
...
Should feel very similar to Sk4h_store4:
NEON uses its native instruction, SSE unpacks manually.
Since we'll have our F16s in 4 Sk4h by the time we're done here,
this also extracts an Sk4h->Sk4f routine from the old uint64_t->Sk4f one.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184753002
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/2184753002
2016-07-26 08:01:20 -07:00
robertphillips
8c523e0f3f
Move prepareForExternalIO from GrRenderTarget to GrDrawContext
...
This is part of the push to remove GrRenderTarget from SkGpuDevice
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182543003
Review-Url: https://codereview.chromium.org/2182543003
2016-07-26 07:41:01 -07:00
egdaniel
707bbd622b
Reuse sampler descriptor set allocations in Vulkan
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2172873003
Review-Url: https://codereview.chromium.org/2172873003
2016-07-26 07:19:48 -07:00
reed
27efa2371e
respect kFast_SrcRectConstraint by allowing shader access to entire bitmap
...
BUG=355305
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2176193002
Review-Url: https://codereview.chromium.org/2176193002
2016-07-25 19:10:10 -07:00
msarett
a18c3b8306
Use sk_srgb_to_linear_trunc in SkColorXform_opts
...
This gives us a little more control over instruction order, allowing
us to pipeline the muls and get better performance. Technically,
clang should be able to do this for us anyway...
Performance on HP z620 (201295.jpg):
toSRGB: 371us -> 356us
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175413002
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/2175413002
2016-07-25 18:58:11 -07:00
msarett
3418c0e797
Delete SkDefaultXform, handle edge cases in SkColorSpaceXform_Base
...
"Edge" cases include:
(1) Matrices with translation
(2) colorLUTs
Performance on HP z620:
201295.jpg
to2Dot2: 386us -> 414us
toSRGB: 346us -> 371us
toHalf: 282us -> 302us
strange0-translate.jpg
toSRGB: 1060us -> 244us
strange1-colorLUT.jpg
toSRGB: 2.74ms -> 2.00ms
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177173003
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/2177173003
2016-07-25 18:23:18 -07:00
brianosman
9ac6d8d9f1
Fix F16 raster text masks. We don't want fake gamma in that case.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184443002
Review-Url: https://codereview.chromium.org/2184443002
2016-07-25 17:41:44 -07:00