bungeman
b1dd067128
Remove 'Ulta' width.
...
All users of this old name appear to be updated.
TBR=reed
Removing unused and mis-spelled API.
Review-Url: https://codereview.chromium.org/2206453003
2016-08-02 10:43:29 -07:00
msarett
c573a40ed5
Add drawImageLattice() and drawBitmapLattice() APIs
...
The specified image/bitmap is divided into rects, which
can be draw stretched, shrunk, or at a fixed size. Will be
used by Android to draw 9patch (which are acutally N-patch)
images.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1992283002
Review-Url: https://codereview.chromium.org/1992283002
2016-08-02 08:05:56 -07:00
reed
320a40d773
Always return ImageShader, even from SkShader::MakeBitmapShader
...
Lessons learned
1. ImageShader (correctly) always compresses (typically via PNG) during serialization. This has the surprise results of
- if the image was marked opaque, but has some non-opaque pixels (i.e. bug in blitter or caller), then compressing may "fix" those pixels, making the deserialized version draw differently. bug filed.
- 565 compressess/decompresses to 8888 (at least on Mac), which draws differently (esp. under some filters). bug filed.
2. BitmapShader did not enforce a copy for mutable bitmaps, but ImageShader does (since it creates an Image). Thus the former would see subsequent changes to the pixels after shader creation, while the latter does not, hence the change to the BlitRow test to avoid this modify-after-create pattern. I sure hope this prev. behavior was a bug/undefined-behavior, since this CL changes that.
BUG=skia:5595
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195893002
Review-Url: https://codereview.chromium.org/2195893002
2016-08-02 06:12:06 -07:00
mtklein
1bb5fecbea
Sketch SkPictureRecorder::optimizeFor(GrContext*).
...
I'm open to API suggestions.
We can pass this in finishAs(), up front, whatever.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2203453002
Review-Url: https://codereview.chromium.org/2203453002
2016-08-01 13:17:47 -07:00
bungeman
d783e08004
Replace 'Ulta' with 'Ultra'.
...
Start fixing a typo in an enum name.
TBR=reed
This is just a typo fix.
Review-Url: https://codereview.chromium.org/2202703002
2016-08-01 12:37:13 -07:00
reed
f1ac18229c
implement isABitmap for imageshader, return localmatrix for bitmap's impl
...
For imageshader, I only return true if the image is explicitly raster-backed. I do not return true for texture, nor for generator (i.e. lazy/picture) backed. Is that ok?
BUG=skia:5592
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197323002
Review-Url: https://codereview.chromium.org/2197323002
2016-08-01 11:24:14 -07:00
mtklein
da574d17f8
Replace old SkRecords RefBox with sk_sp.
...
The main differences are that RefBox's constructor reffed and sk_sp's doesn't,
and that RefBox auto-casts to the underlying pointer while sk_sp doesn't.
I've added a bunch of sk_ref_sp() and .get() to compensate.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197243003
Review-Url: https://codereview.chromium.org/2197243003
2016-08-01 11:24:03 -07:00
dvonbeck
9b03e7b29d
GrFP can express distance vector field req., program builder declares variable for it
...
This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:
- from child FPs to their parent
- from parent FPs to the GrPaint
- from GrPaint through the PipelineBuilder into GrPipeline
- acessed from GrPipeline by GrGLSLProgramBuilder
GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.
This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002
Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196
Review-Url: https://codereview.chromium.org/2114993002
2016-08-01 11:01:56 -07:00
msarett
abbd6d5e02
Add SkColorSpace::Equals() API
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196743002
Review-Url: https://codereview.chromium.org/2196743002
2016-08-01 09:43:08 -07:00
mtklein
8d7f5c3f29
Default fake gamma to sRGB.
...
No one appears to be using the default 2.2.
This makes SK_GAMMA_SRGB the default / a no-op, which seems more realistic.
Chrome's explicitly setting SK_GAMMA_EXPONENT or SK_GAMMA_SRGB.
We set Android platform explicitly to 1.4.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2198073002
Review-Url: https://codereview.chromium.org/2198073002
2016-08-01 09:22:12 -07:00
robertphillips
12e9662cf7
Remove some ancillary users of SkSurface::MakeRenderTargetDirect
...
calved off of: https://codereview.chromium.org/2176333002/ (Remove SkSurface::MakeRenderTargetDirect)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2198433003
Review-Url: https://codereview.chromium.org/2198433003
2016-08-01 05:53:23 -07:00
mtklein
02aed95f9c
Revert of GrFP can express distance vector field req., program builder declares variable for it (patchset #20 id:370001 of https://codereview.chromium.org/2114993002/ )
...
Reason for revert:
UBSAN says we're reading a bad bool here:
bool usesDistanceVectorField() const { return fUsesDistanceVectorField; }
../../../include/gpu/GrPaint.h:83:51: runtime error: load of value 239, which is not a valid value for type 'bool'
SUMMARY: AddressSanitizer: undefined-behavior ../../../include/gpu/GrPaint.h:83:51 in
Seems likely also the root of Valgrind failure:
https://luci-milo.appspot.com/swarming/task/30522e4f2241cb10
Original issue's description:
> GrFP can express distance vector field req., program builder declares variable for it
>
> This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:
>
> - from child FPs to their parent
> - from parent FPs to the GrPaint
> - from GrPaint through the PipelineBuilder into GrPipeline
> - acessed from GrPipeline by GrGLSLProgramBuilder
>
> GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.
>
> This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002
>
> Committed: https://skia.googlesource.com/skia/+/4ef6dfa7089c092c67b0d5ec34e89c1e319af196
TBR=egdaniel@google.com ,robertphillips@google.com,bsalomon@google.com,dvonbeck@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review-Url: https://codereview.chromium.org/2201613002
2016-07-30 14:21:10 -07:00
csmartdalton
4c18b62a00
Add ES 3.0 fallback for instanced rendering
...
Adds the ability for GLInstancedRendering to use
glDrawElementsInstanced when glDrawElementsIndirect is not supported.
The only remaining 3.1 dependency now is EXT_texture_buffer.
Also moves the cap for glDraw*Instanced out of GrCaps and into
GrGLCaps.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193303002
Review-Url: https://codereview.chromium.org/2193303002
2016-07-29 12:19:28 -07:00
bungeman
aa8f39402c
Conditionally define SK_SUPPORT_LEGACY_DATA_FACTORIES.
...
In order to remove this define it will first need to be defined in
Chromium. However, doing so causes redefinition warnings as errors.
Only define this macro if it is not already defined to avoid this.
TBR=reed
This doesn't change any API.
Review-Url: https://codereview.chromium.org/2198453002
2016-07-29 10:47:45 -07:00
dvonbeck
4ef6dfa708
GrFP can express distance vector field req., program builder declares variable for it
...
This update allows fragment processors to require a field of vectors to the nearest edge. This requirement propagates:
- from child FPs to their parent
- from parent FPs to the GrPaint
- from GrPaint through the PipelineBuilder into GrPipeline
- acessed from GrPipeline by GrGLSLProgramBuilder
GrGLSL generates a variable for the distance vector and passes it down to the GeometryProcessor->emitCode() method.
This CL's base is the CL for adding the BevelNormalSource API: https://codereview.chromium.org/2080993002
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2114993002
Review-Url: https://codereview.chromium.org/2114993002
2016-07-29 09:53:56 -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
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
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
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
mtklein
fa84d94bb0
Make both SK_API definition points identical and order independent.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2189983002
Review-Url: https://codereview.chromium.org/2189983002
2016-07-28 09:45:15 -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
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
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
mtklein
570c868b38
Clean up some unused atomic routines.
...
AtomicTest was the only use of sk_atomic_add().
AtomicInc64 bench was the only use of sk_atomic_inc(int64_t*).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183473005
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN-Trybot,Test-Ubuntu-GCC-Golo-GPU-GT610-x86_64-Release-TSAN-Trybot
Review-Url: https://codereview.chromium.org/2183473005
2016-07-27 08:40:45 -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
fmalita
6ceef3dd67
Initial SVG model
...
A minimal subset needed to render tiger.svg: <svg>, <g>, <path>, 'd', 'fill'/'stroke' (color-only), 'transform'.
R=reed@google.com ,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164193002
Review-Url: https://codereview.chromium.org/2164193002
2016-07-26 18:46:34 -07:00
jcgregorio
aef94d1818
Avoid warnings on GCC 4.8.4
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183243002
[mtklein adds...]
TBR=reed@google.com
No public API changes.
Review-Url: https://codereview.chromium.org/2183243002
2016-07-26 14:10:17 -07:00
mtklein
1b51e0ec46
Move SkJSONCPP.h to tools. It tool-only.
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184483003
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2184483003
2016-07-26 12:41:27 -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
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
bungeman
b8113780c3
Update typeface serialization style.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2030683002
Committed: https://skia.googlesource.com/skia/+/7ae1c72e593823e6e300e4199558555765bcec17
Review-Url: https://codereview.chromium.org/2030683002
2016-07-25 16:54:59 -07:00
bungeman
6e45bda29e
Add test for typeface style round trip.
...
This also fixes the CG and GDI ports so they pass the test.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2171163002
Review-Url: https://codereview.chromium.org/2171163002
2016-07-25 15:11:49 -07:00
brianosman
8fe485b793
Just pass the draw context to paint conversion
...
Concentrate on using draw context functionality to answer gamma and color
related queries in more places.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2182603003
Review-Url: https://codereview.chromium.org/2182603003
2016-07-25 12:31:51 -07:00
reed
c7ec7c9cab
remove/deprecate SkBitmap::getTexture, as it now always returns false
...
oh happy day
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175873002
Review-Url: https://codereview.chromium.org/2175873002
2016-07-25 08:29:10 -07:00
reed
2c9e20055b
remove fClipStack and attach/deattach-from-canvas
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180793002
Review-Url: https://codereview.chromium.org/2180793002
2016-07-25 08:05:23 -07:00
halcanary
d0e95a524c
typedef uint16_t SkGlyphID
...
This goes well with our existing `typedef int32_t SkUnichar`.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2095263003
Review-Url: https://codereview.chromium.org/2095263003
2016-07-25 07:18:12 -07:00
brianosman
1638c0deea
Add destination color space to AsFPArgs. Eliminates last XFORMTODO.
...
This is going to be needed in many more places as I finish connecting the
dots. Even better - I'd like to switch to a world where SkColorSpace !=
nullptr is the only signal we use for gamma-correct rendering, so I can
eliminate SkSourceGammaTreatment and SkSurfaceProps::isGammaCorrect.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180503002
Review-Url: https://codereview.chromium.org/2180503002
2016-07-25 05:12:53 -07:00
reed
b560b5c8c0
lockPixelsAreWritable is deprecated
...
BUG=skia:4328
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177063002
TBR=
Review-Url: https://codereview.chromium.org/2177063002
2016-07-24 12:30:34 -07:00
senorblanco
9c1d45d986
Always init SkPathRef variables.
...
BUG=623195
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2173853003
Review-Url: https://codereview.chromium.org/2173853003
2016-07-22 13:51:42 -07:00
mtklein
9a5c47f4ef
Add SkRasterPipeline blitter.
...
This is now pixel-exact with the existing sRGB SW impl as far as I've tested.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146413002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot
Committed: https://skia.googlesource.com/skia/+/3011e337693a9786f62d8de9ac4b239ad6dbdaca
Review-Url: https://codereview.chromium.org/2146413002
2016-07-22 11:05:04 -07:00
brianosman
839345d634
Bundle SkShader::asFragmentProcessor arguments in a struct
...
The signature of this thing keeps changing (and is about to change again).
This just makes maintenance much easier.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175563003
Review-Url: https://codereview.chromium.org/2175563003
2016-07-22 11:04:53 -07:00
mtklein
aa29b27329
Revert of Add SkRasterPipeline blitter. (patchset #18 id:340001 of https://codereview.chromium.org/2146413002/ )
...
Reason for revert:
Leaking the blitter
https://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/7908/steps/test_skia%20on%20Ubuntu/logs/stdio
Original issue's description:
> Add SkRasterPipeline blitter.
>
> This is now pixel-exact with the existing sRGB SW impl as far as I've tested.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146413002
> 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/+/3011e337693a9786f62d8de9ac4b239ad6dbdaca
TBR=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/2178523002
2016-07-22 10:20:52 -07:00
vjiaoblack
5bfee98c8c
Creating framework for drawShadowedPicture
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146073003
Committed: https://skia.googlesource.com/skia/+/0ae097d116f4332be02a135ffc99c162473dee6a
Committed: https://skia.googlesource.com/skia/+/95302da19d8b0a3bcd9d9be0e79f486760787f09
Review-Url: https://codereview.chromium.org/2146073003
2016-07-22 10:04:15 -07:00
csmartdalton
cbecb082d1
Allow GrReducedClip to take non-integer query bounds
...
Fixes places where AA bloat was being conflated with geometric
boundaries and updates GrReducedClip to work with non-integer query
bounds. This allows for better clip reduction with AA shared edges.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2160093002
Review-Url: https://codereview.chromium.org/2160093002
2016-07-22 08:59:08 -07:00
mtklein
3011e33769
Add SkRasterPipeline blitter.
...
This is now pixel-exact with the existing sRGB SW impl as far as I've tested.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146413002
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/2146413002
2016-07-22 08:53:26 -07:00
bsalomon
bb24383abb
Revert of Retract PipelineBuilder some more (patchset #9 id:160001 of https://codereview.chromium.org/2092893003/ )
...
Reason for revert:
skbug.com/5559
Original issue's description:
> Retract PipelineBuilder some more
>
> The main part of this CL is widening SkDrawContext::drawBatch's API to accept the userStencilSettings & drawFace
>
> There is some ancillary spookiness related to expanding the should_apply_coverage_aa & mustUseHWAA methods to encompass mixedSamples
>
> Calved off:
> https://codereview.chromium.org/2165283002/ (Remove DrawFace enum from GrPipelineBuilder)
> https://codereview.chromium.org/2167183002/ (Minor change to Ganesh path renderers)
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2092893003
>
> Committed: https://skia.googlesource.com/skia/+/2895eeb11a9f0d9c0018d49dd4bc45f6c6fc062c
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/2175573004
2016-07-22 07:10:20 -07:00
brianosman
396fcdba14
Cleanup of code that converts from GPU-backed resources to SkImageInfo
...
Functions like GrMakeInfoFromTexture encouraged incorrect code to be
written. Similarly, the ability to construct an info from any GrSurface
was never going to be correct. Luckily, the only client of that had all
of the correct parameters much higher on the stack (and dictated or
replaced most of the properties of the returned info anyway).
With this, I can finally remove the color space as an output of the
pixel config -> color type conversion, which was never going to be
correct.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2173513002
Review-Url: https://codereview.chromium.org/2173513002
2016-07-22 06:26:11 -07:00
brianosman
dfe4f2e4fe
Add SkColorSpace to GrDrawContext
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164363002
Review-Url: https://codereview.chromium.org/2164363002
2016-07-21 13:28:36 -07:00
robertphillips
2895eeb11a
Retract PipelineBuilder some more
...
The main part of this CL is widening SkDrawContext::drawBatch's API to accept the userStencilSettings & drawFace
There is some ancillary spookiness related to expanding the should_apply_coverage_aa & mustUseHWAA methods to encompass mixedSamples
Calved off:
https://codereview.chromium.org/2165283002/ (Remove DrawFace enum from GrPipelineBuilder)
https://codereview.chromium.org/2167183002/ (Minor change to Ganesh path renderers)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2092893003
Review-Url: https://codereview.chromium.org/2092893003
2016-07-21 12:04:08 -07:00
msarett
530c844d25
Remove unnecessary getColorSpace() API from SkCodec
...
Not needed since now we can get it from the SkImageInfo.
TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2170793004
Review-Url: https://codereview.chromium.org/2170793004
2016-07-21 11:57:49 -07:00
vjiaoblack
95302da19d
Creating framework for drawShadowedPicture
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146073003
Committed: https://skia.googlesource.com/skia/+/0ae097d116f4332be02a135ffc99c162473dee6a
Review-Url: https://codereview.chromium.org/2146073003
2016-07-21 10:25:54 -07:00
vjiaoblack
33d325890e
Revert of Creating framework for drawShadowedPicture (patchset #14 id:260001 of https://codereview.chromium.org/2146073003/ )
...
Reason for revert:
Decided to re-wait for a final LGTM.
Already found a bug in variable naming to fix.
Original issue's description:
> Creating framework for drawShadowedPicture
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146073003
>
> Committed: https://skia.googlesource.com/skia/+/0ae097d116f4332be02a135ffc99c162473dee6a
TBR=reed@google.com ,robertphillips@google.com,bsalomon@google.com,jvanverth@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/2167223002
2016-07-21 09:24:16 -07:00
robertphillips
5fa7f30331
Remove DrawFace enum from GrPipelineBuilder
...
This gets GrPipelineBuilder.h out of the headers
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165283002
Committed: https://skia.googlesource.com/skia/+/da152ebb032c61bb2561bbb3e9a78037ad174d34
Review-Url: https://codereview.chromium.org/2165283002
2016-07-21 09:21:04 -07:00
vjiaoblack
0ae097d116
Creating framework for drawShadowedPicture
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146073003
Review-Url: https://codereview.chromium.org/2146073003
2016-07-21 09:10:23 -07:00
robertphillips
5d1676c751
Revert of Remove DrawFace enum from GrPipelineBuilder (patchset #2 id:20001 of https://codereview.chromium.org/2165283002/ )
...
Reason for revert:
No Vulkan bot in CQ :(
Original issue's description:
> Remove DrawFace enum from GrPipelineBuilder
>
> This gets GrPipelineBuilder.h out of the headers
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165283002
>
> Committed: https://skia.googlesource.com/skia/+/da152ebb032c61bb2561bbb3e9a78037ad174d34
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/2167193002
2016-07-21 08:18:05 -07:00
robertphillips
da152ebb03
Remove DrawFace enum from GrPipelineBuilder
...
This gets GrPipelineBuilder.h out of the headers
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165283002
Review-Url: https://codereview.chromium.org/2165283002
2016-07-21 07:58:41 -07:00
robertphillips
1f3923e4e5
Deprecate SkDevice::accessBitmap method
...
Relies on https://codereview.chromium.org/2162423003/ (Add SK_SUPPORT_LEGACY_ACCESSBITMAP Skia guard) landing in Chromium first.
Calved off: https://codereview.chromium.org/2163323002/ (Add desired width & height to drawContext (as opposed to using the width & height of the RT))
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2168483003
Review-Url: https://codereview.chromium.org/2168483003
2016-07-21 07:17:54 -07:00
brianosman
afbf71dd92
Adding color space to SkSpecialImage
...
Mostly means that GPU backed special images need to be supplied (and
store) a color space object.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163343002
Review-Url: https://codereview.chromium.org/2163343002
2016-07-21 07:15:37 -07:00
brianosman
dddbe380b0
Adding an SkColorSpace to SkImage_Gpu
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165703003
Review-Url: https://codereview.chromium.org/2165703003
2016-07-20 13:55:39 -07:00
reed
cf5c846b41
remove dead methods now that we use specials exclusively for imagefilters
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164763003
Review-Url: https://codereview.chromium.org/2164763003
2016-07-20 12:28:40 -07:00
dvonbeck
c526da94e4
SkLS now accepting nullptr for diffuse shader and normal source, now accurately handling alpha
...
This CL's base is the CL for taking in a diffuse shader into SkLS on the API side: https://codereview.chromium.org/2064153002
BUG=skia:5502,skia:5517
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132113002
Review-Url: https://codereview.chromium.org/2132113002
2016-07-20 11:20:30 -07:00
bungeman
1f790aaeef
Improve assert reporting.
...
Make SkASSERTF output readable.
Ensure the assert predicate is stringified once.
Make the abort code consistent.
TBR=reed
This doesn't change any public API, most of this should be privatized.
Review-Url: https://codereview.chromium.org/2161103002
2016-07-20 09:49:10 -07:00
robertphillips
ea70c4bb22
Remove SkDevice::accessRenderTarget virtual
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167723002
Review-Url: https://codereview.chromium.org/2167723002
2016-07-20 08:54:31 -07:00
reed
a2217ef965
use special-image for imagefilters and save/restore layer
...
add special virtuals to device, in preparation for using them instead of bitmap for imagefilters
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2155933002
patch from issue 2155933002 at patchset 20001 (http://crrev.com/2155933002#ps20001 )
use specialimages instead of bitmaps for imagefiltering
Review-Url: https://codereview.chromium.org/2155063002
2016-07-20 06:04:34 -07:00
reed
e51c356ae4
pre-land special methods on device
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161233002
Review-Url: https://codereview.chromium.org/2161233002
2016-07-19 14:33:20 -07:00
brianosman
9ecaa1d9f0
Remove unused MakeFromTextureCopy API
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2165803002
Review-Url: https://codereview.chromium.org/2165803002
2016-07-19 14:16:49 -07:00
robertphillips
e34f17d236
Make SkFont a bit more useable
...
Split out of https://codereview.chromium.org/2163483002/ (Use SkFont in GrStencilAndCoverTextContext)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163633002
Review-Url: https://codereview.chromium.org/2163633002
2016-07-19 07:59:22 -07:00
fmalita
01c97230f8
Delete the legacy SVG parser
...
Unused.
R=reed@google.com ,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154193003
CQ_INCLUDE_TRYBOTS=master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot
Review-Url: https://codereview.chromium.org/2154193003
2016-07-19 06:12:54 -07:00
fmalita
fd75dd4086
Delete SkXMLPullParser
...
Unused & not being built.
R=reed@google.com ,robertphillips@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2163463002
Review-Url: https://codereview.chromium.org/2163463002
2016-07-19 05:14:41 -07:00
fmalita
a427cc4d6b
Remove SkDOM::build(const char doc[], size_t len)
...
This flavor is unused, and we have the more general SkStream API.
R=stephana@google.com ,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154733003
Review-Url: https://codereview.chromium.org/2154733003
2016-07-18 10:56:43 -07:00
brianosman
54f30c13fc
Introduce GrColorSpaceXform, for gamut conversion on textures
...
GrTextureAccess optionally includes an instance, computed from the src
and dst color spaces. In all common cases (no color space for either src
or dst, or same color space for both), no object is allocated.
This change is orthogonal to my attempts to get color space attached to
render targets - regardless of how we choose to do that, this will give
us the source color space at all points where we are connecting src to
dst.
There are many dangling injection points where I've been inserting
nullptr, but I have a record of all of them. Additionally, there are now
three places (the most common simple paths for bitmap/image rendering)
where things are plumbed enough that I expect to have access to the dst
color space (all marked with XFORMTODO).
In addition to getting the dst color space, I need to inject shader code
and uniform uploading for appendTextureLookup and friends.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2154753003
Review-Url: https://codereview.chromium.org/2154753003
2016-07-18 10:53:52 -07:00
robertphillips
6451a0cea6
Add makeSpecial calls to SkGpuDevice
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161533003
Review-Url: https://codereview.chromium.org/2161533003
2016-07-18 08:31:31 -07:00
jcgregorio
eb9a84aa57
Revert of remove unused TableMaskFilter (patchset #1 id:1 of https://codereview.chromium.org/2156463002/ )
...
Reason for revert:
Needed for Android:
frameworks/base/core/jni/android/graphics/MaskFilter.cpp:5:10: fatal error: 'SkTableMaskFilter.h' file not found
Original issue's description:
> remove unused TableMaskFilter
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2156463002
>
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/59779ae8ce316bf8b8082ec2df1683ccd38161f1
TBR=reed@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review-Url: https://codereview.chromium.org/2156183002
2016-07-18 08:18:51 -07:00
bsalomon
0ae36a2ceb
In GrShape detect that stroked axis-aligned lines are rrects.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151313002
Review-Url: https://codereview.chromium.org/2151313002
2016-07-18 07:31:13 -07:00
abarth
6fc8ff024b
Add support for Fuchsia
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2152273002
[mtklein edit from here down]
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2152273002
2016-07-15 15:15:15 -07:00
reed
7503d60847
move responsibility for creating raster-device into pdf
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146333004
NOTRY=True
win failure seems unrelated
Review-Url: https://codereview.chromium.org/2146333004
2016-07-15 14:23:30 -07:00
reed
cd4051e1c4
remove unused CreateInfo flag
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2153173002
NOTRY=True
Review-Url: https://codereview.chromium.org/2153173002
2016-07-15 09:41:27 -07:00
fmalita
7445e86bac
Dust-off SkXMLParser
...
Hook up SkXMLParser to Expat, such that it can actually parse, err,
XML.
Add a trivial unit test.
R=robertphillips@google.com ,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142893006
Review-Url: https://codereview.chromium.org/2142893006
2016-07-14 19:14:06 -07:00
reed
59779ae8ce
remove unused TableMaskFilter
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2156463002
TBR=
Review-Url: https://codereview.chromium.org/2156463002
2016-07-14 19:13:20 -07:00
robertphillips
4c7e117b69
Remove dead flag from SkPictureRecorder
...
With the Chrome CL (https://codereview.chromium.org/2149533003/ (Remove use of unsupported Skia flag)) landed, this should be good to go.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2152943002
Review-Url: https://codereview.chromium.org/2152943002
2016-07-14 13:44:14 -07:00
dvonbeck
cfc79fe9a3
Added premulFourChannelColor to GrInvariantOutput
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2148273002
Review-Url: https://codereview.chromium.org/2148273002
2016-07-14 09:02:18 -07:00
bsalomon
614d8f9a3c
Remove GrWrapTextureInBitmap from public API
...
BUG=skia:5531
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2147053002
Review-Url: https://codereview.chromium.org/2147053002
2016-07-13 15:42:40 -07:00
egdaniel
990dbc8879
Add Texture2D and Sampler GrSLTypes
...
These two new types are in support of Vulkan and the ability to send
separate texture and sampler uniforms to the shader. They don't really fit
well in the current system, since the current system ties together to idea
of intended use and how to emit shader code into the same GrSLType enum.
In vulkan, I want the GrGLSLSampler object to be used as a Sampler2D, but
when appending its declaration it will emit a Texture2D and sampler object.
Our query for GrSLTypeIsSamplerType refers more to the combination of texture
and sampler and not just the sampler part. The GrSLTypeIs2DTextureType query
is for is a a SamplerType that uses Texture2Ds. My new types don't really fit
into either these categories as they are just half of the whole.
In some refactoring down the road (possibly connected with SkSL), I suggest we
split apart the concept of how we intend to use a GrGLSLSampler (Sampler2D, SamplerBuffer,
etc.), from how we actually add it to the code (sampler, texture2D, sampler2D, etc.).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2143143002
Review-Url: https://codereview.chromium.org/2143143002
2016-07-13 14:09:31 -07:00
vjiaoblack
e5de130788
Added the framework for having canvas/recorder/picture record depth_set's.
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2127233002
Committed: https://skia.googlesource.com/skia/+/6d3fb898d5f73a82e36f11c712a633c3921ed518
Committed: https://skia.googlesource.com/skia/+/1185d90c785f743364cc9113d7007a59af07470c
Review-Url: https://codereview.chromium.org/2127233002
2016-07-13 14:05:28 -07:00
reed
9f01276464
move GrPixelRef headers to private (as we work to eliminate them)
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2150693002
Review-Url: https://codereview.chromium.org/2150693002
2016-07-13 13:43:49 -07:00
csmartdalton
97f6cd5d0f
Pre-crop filled rects to avoid scissor
...
Updates GrDrawContext to crop filled rects to the clip bounds before
creating batches for them. Also adds clipping logic to ignore scissor
when the draw falls completely inside. These two changes combined
reduce API traffic and improve batching.
In the future this can and should be improved by switching to floating
point clip boundaries, thus allowing us to throw out non pixel aligned
rectangle clips as well.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
Review-Url: https://codereview.chromium.org/2132073002
2016-07-13 13:37:08 -07:00
liyuqian
0d2c234e44
Fix SkFixedDiv macro
...
Previously, the macro won't pass the unit test that I just added in this
CL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2149733002
Review-Url: https://codereview.chromium.org/2149733002
2016-07-13 13:34:46 -07:00
robertphillips
dda54455a2
Remove GrLayerHoister
...
This relies on https://codereview.chromium.org/1944013002/ (Add legacy flag to allow Skia to remove Ganesh layer hoister) landing first so as to not break the DEPS roll.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1950523002
Review-Url: https://codereview.chromium.org/1950523002
2016-07-13 13:27:16 -07:00