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
fmalita
ce2fc6a045
Add imagemasksubset GM
...
(GM for non-N32 SkImage subsetting)
BUG=skia:5687
R=bsalomon@google.com ,robertphillips@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286733002
Review-Url: https://codereview.chromium.org/2286733002
2016-08-26 10:13:40 -07:00
robertphillips
55713afb7a
Move work from ctor to onOnceBeforeDraw in ShowMipLevel GMs
...
These were making debugging stroking more difficult than necessary
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2285813002
Review-Url: https://codereview.chromium.org/2285813002
2016-08-26 10:04:26 -07:00
caryclark
f71ab8f58b
avoid generating degenerate conic from arc
...
R=bsalomon@google.com
BUG=skia:5672
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2281953002
Review-Url: https://codereview.chromium.org/2281953002
2016-08-26 09:54:25 -07:00
robertphillips
ad2344693c
Ignore fill when stroke & filling convex line-only paths
...
This seems to work well for miter and bevel joins with the resulting stroke and fill path remaining convex. There seems to be an issue with round joins where the outer generated shell is usually not convex. Without this CL the resulting stroke & filled paths are always concave.
Perf-wise (on Windows):
convex-lineonly-paths-stroke-and-fill bench
(in ms) w/o w/CL %decrease
8888 2.88 2.01 30.2
gpu 4.4 1.38 68.6
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2275243003
Review-Url: https://codereview.chromium.org/2275243003
2016-08-26 05:30:19 -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
bsalomon
48b2461ee0
Make bleed GM produce consistent bitmaps on all platforms
...
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264133003
Review-Url: https://codereview.chromium.org/2264133003
2016-08-25 06:45:29 -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
jvanverth
250d00bba1
Add fat stroke test case to roundrects GM.
...
Prep for supporting fat stroked roundrects in Ganesh.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2272703009
Review-Url: https://codereview.chromium.org/2272703009
2016-08-25 05:53:00 -07:00
caryclark
531191fefe
tiny line breaks gl render
...
This pie cut draws correctly
on raster but extends to the
right on Ganesh.
The path is not convex, and
has a tiny line that contributes
to the error.
TBR=robertphillips@google.com
BUG=640176
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2276083002
Review-Url: https://codereview.chromium.org/2276083002
2016-08-24 11:59:30 -07:00
bsalomon
4c261d0c1e
Add cap type variations to circular arcs GMs
...
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2269723002
Review-Url: https://codereview.chromium.org/2269723002
2016-08-22 13:10:46 -07:00
bsalomon
ac1d0abfd8
Add stroke-and-fill circular arc test, test near 180deg arc in all circular_arc_tests
...
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261233002
Review-Url: https://codereview.chromium.org/2261233002
2016-08-22 10:00:14 -07:00
bsalomon
36da771226
Adjust angles in circular arcs GMs to test smaller arcs
...
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2267713002
Review-Url: https://codereview.chromium.org/2267713002
2016-08-22 07:26:08 -07:00
reed
577e012e40
add translate to exercise non-identity ctm performance
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261063002
TBR=
Review-Url: https://codereview.chromium.org/2261063002
2016-08-21 15:03:47 -07:00
bsalomon
4c54788e92
Rename circular_arcs_circular_arcs_fill to circular_arcs_fill.
...
Also fix issue with second paint's alpha getting overwritten.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2265643002
Review-Url: https://codereview.chromium.org/2265643002
2016-08-19 13:41:29 -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
71c5eee9d5
Add GMs for testing drawArc.
...
This is in preparation for virtualizing this on SkCanvas/SkDevice.
Tests the following variations:
aa and non-aa
stroke/hairline/fill
cap types
using center point and not
BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2264593002
Review-Url: https://codereview.chromium.org/2264593002
2016-08-19 10:53:14 -07:00
reed
c1fb8e8b59
must call rand in reliable order for bots
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254403002
TBR=
Review-Url: https://codereview.chromium.org/2254403002
2016-08-18 19:35:52 -07:00
reed
5e0d927694
add simplerect gm
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257263002
TBR=bsalomon
NOTRY=True
Review-Url: https://codereview.chromium.org/2257263002
2016-08-18 15:01:11 -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
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
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
msarett
36c38cbb29
Fix WIC encoder to support kJPEG_Type
...
(1) Add support for kJPEG to WIC
(2) Add encoding test.
(3) Turn on WIC jpeg encoder on Windows and CG jpeg
encoder on Mac.
A follow-up may make Skia's encoders the default on all
platforms. But, in order to do that, I think we need
to write better encoding unit tests for CG and WIC.
BUG=skia:3969
BUG=skia:5632
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245453002
Committed: https://skia.googlesource.com/skia/+/b3a7ef1fc0adc24859d2498aee54d3ec2cbcac3a
Review-Url: https://codereview.chromium.org/2245453002
2016-08-15 18:52:17 -07:00
msarett
93963ba84e
Revert of Fix WIC encoder to support kJPEG_Type (patchset #3 id:140001 of https://codereview.chromium.org/2245453002/ )
...
Reason for revert:
Broken Windows bot.
Original issue's description:
> Fix WIC encoder to support kJPEG_Type
>
> (1) Add support for kJPEG to WIC
> (2) Add encoding test.
> (3) Turn on WIC jpeg encoder on Windows and CG jpeg
> encoder on Mac.
>
> A follow-up may make Skia's encoders the default on all
> platforms. But, in order to do that, I think we need
> to write better encoding unit tests for CG and WIC.
>
> BUG=skia:3969
> BUG=skia:5632
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245453002
>
> Committed: https://skia.googlesource.com/skia/+/b3a7ef1fc0adc24859d2498aee54d3ec2cbcac3a
TBR=mtklein@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:3969
Review-Url: https://codereview.chromium.org/2246203002
2016-08-15 13:52:31 -07:00
msarett
b3a7ef1fc0
Fix WIC encoder to support kJPEG_Type
...
(1) Add support for kJPEG to WIC
(2) Add encoding test.
(3) Turn on WIC jpeg encoder on Windows and CG jpeg
encoder on Mac.
A follow-up may make Skia's encoders the default on all
platforms. But, in order to do that, I think we need
to write better encoding unit tests for CG and WIC.
BUG=skia:3969
BUG=skia:5632
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2245453002
Review-Url: https://codereview.chromium.org/2245453002
2016-08-15 13:19:20 -07:00
caryclark
c2ad65e94d
add gm that exercises compose shader allocations
...
This gm triggers the assert in SkSmallAllocator.h
commented out by this CL.
PDFium constructs shaders that resemble the GM.
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249703002
Review-Url: https://codereview.chromium.org/2249703002
2016-08-15 12:03:33 -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
egdaniel
3602d4f16a
Allow vulkan to upload data to testing textures with optimal layouts
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2242553002
Review-Url: https://codereview.chromium.org/2242553002
2016-08-12 11:58:53 -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
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
halcanary
e9d55c57a6
Revert of Store mipmap levels in deferred texture image (patchset #11 id:200001 of https://codereview.chromium.org/2115023002/ )
...
Reason for revert:
speculative revert: android dm crashes
Original issue's description:
> Store mipmap levels in deferred texture image
>
> This is a follow-up to https://codereview.chromium.org/2034933003/ which
> was reverted due to a memory leak.
>
> 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=2115023002
>
> Committed: https://skia.googlesource.com/skia/+/d6113140f7ae8996f679ac6698a60fb8c1386da3
TBR=brianosman@google.com ,bsalomon@google.com,ericrk@chromium.org,cblume@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=578304
Review-Url: https://codereview.chromium.org/2227323002
2016-08-09 17:46:25 -07:00
cblume
d6113140f7
Store mipmap levels in deferred texture image
...
This is a follow-up to https://codereview.chromium.org/2034933003/ which
was reverted due to a memory leak.
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=2115023002
Review-Url: https://codereview.chromium.org/2115023002
2016-08-09 13:45:56 -07:00
vjiaoblack
904527d165
moved code into onDrawShadowedPic, only renders into shadow maps if needed
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220633002
Review-Url: https://codereview.chromium.org/2220633002
2016-08-09 09:32:09 -07:00
hstern
bb9b2247a2
Rework Overstroke GM to show differences between expected and actual
...
Draw the perpendiculars of the curve with the stroke width. See Cary's
SampleQuadStroker.cpp for what we are attempting to mimic.
BUG=589769,skia:5405,skia:5406
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2218773003
Review-Url: https://codereview.chromium.org/2218773003
2016-08-09 08:53:30 -07:00
reed
1ec04d9553
rename FoceCopyMode to SkCopyPixelMode
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220603002
Review-Url: https://codereview.chromium.org/2220603002
2016-08-05 12:07:41 -07:00
lsalzman
40254c2c2d
SkBlendARGB32 and S32[A]_Blend_BlitRow32 are currently formulated as: SkAlphaMulQ(src, src_scale) + SkAlphaMulQ(dst, dst_scale), which boils down to ((src*src_scale)>>8) + ((dst*dst_scale)>>8). In particular, note that the intermediate precision is discarded before the two parts are added together, causing the final result to possibly inaccurate.
...
In Firefox, we use SkCanvas::saveLayer in combination with a backdrop that initializes the layer to the background. When this is blended back onto background using transparency, where the source and destination pixel colors are the same, the resulting color after the blend is not preserved due to the lost precision mentioned above. In cases where this operation is repeatedly performed, this causes substantially noticeable differences in color as evidenced in this downstream Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1200684
In the test-case in the downstream report, essentially it does blend(src=0xFF2E3338, dst=0xFF2E3338, scale=217), which gives the result 0xFF2E3237, while we would expect to get back 0xFF2E3338.
This problem goes away if the blend is instead reformulated to effectively do (src*src_scale + dst*dst_scale)>>8, which keeps the intermediate precision during the addition before shifting it off.
This modifies the blending operations thusly. The performance should remain mostly unchanged, or possibly improve slightly, so there should be no real downside to doing this, with the benefit of making the results more accurate. Without this, it is currently unsafe for Firefox to blend a layer back onto itself that was initialized with a copy of its background.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2097883002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
[mtklein adds...]
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2097883002
2016-08-05 11:48:45 -07:00
vjiaoblack
955e879c6d
Making a sample for shadow maps for more intensive development
...
Merge branch 'shadow-gm' into shadow-sample
Added variable size shadow maps. Also fixed some bugs
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2198933002
Review-Url: https://codereview.chromium.org/2198933002
2016-08-05 07:55:01 -07:00
robertphillips
9aff85a545
Minor clean up related to blur mask filters
...
This is the non-substantive portion of: https://codereview.chromium.org/2201133002/ (Implement GPU occluded blur mask filter)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2214163003
Review-Url: https://codereview.chromium.org/2214163003
2016-08-05 07:51:30 -07:00
robertphillips
401c1968a1
Add new GM for occluded blurmask filter draws
...
This splits out just the GM portion of https://codereview.chromium.org/2201993003/ (Add GM to test out blurmaskfilter occluders) which included some API changes
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2214033002
Review-Url: https://codereview.chromium.org/2214033002
2016-08-04 12:35:46 -07:00
mtklein
7a1f45f9e5
spin off easy stuff from Herb's windows GN CL
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2209533004
No public API changes.
TBR=reed@google.com
Review-Url: https://codereview.chromium.org/2209533004
2016-08-04 06:19:33 -07:00
bungeman
ffae30db4a
Convert SkAutoTUnref<SkData> to sk_sp<SkData>.
...
With the move from SkData::NewXXX to SkData::MakeXXX most
SkAutoTUnref<SkData> were changed to sk_sp<SkData>. However,
there are still a few SkAutoTUnref<SkData> around, so clean
them up.
Review-Url: https://codereview.chromium.org/2212493002
2016-08-03 13:32:32 -07:00
fmenozzi
7a9f3766aa
Update hardstop_gradients GM to include more special cases
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2204873005
Review-Url: https://codereview.chromium.org/2204873005
2016-08-03 07:58:06 -07:00
bungeman
38d909ec28
Move off SK_SUPPORT_LEGACY_DATA_FACTORIES.
...
This moves Skia code off of SK_SUPPORT_LEGACY_DATA_FACTORIES.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206633004
Review-Url: https://codereview.chromium.org/2206633004
2016-08-02 14:40:46 -07:00
hstern
02aea1c92c
Add Overstroke gm
...
Already exists as a sampleapp, but sampleapps don't get tested
automatically
BUG=skia:5405,5406,chrome:589769
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2161633002
Review-Url: https://codereview.chromium.org/2161633002
2016-08-02 10:35:57 -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
vjiaoblack
53da5ba619
adding new GM to demostrate new shadows
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2118553002
Review-Url: https://codereview.chromium.org/2118553002
2016-08-01 10:02:31 -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