brianosman
1dfec74d6b
Fix SampleApp compilation with skia_gpu=0
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2347593002
Review-Url: https://codereview.chromium.org/2347593002
2016-09-15 07:19:53 -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
brianosman
490452ec47
Add tests for gamma correction of gradient stops to gamma GM
...
Includes three different cases to exercise different cases in Ganesh.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2336973003
Review-Url: https://codereview.chromium.org/2336973003
2016-09-13 08:24:56 -07:00
robertphillips
f619a7af55
Fixup SkRRectsGaussianEdgeShader's shaders
...
This fixes some visual artifacts in the original CL.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335783003
Review-Url: https://codereview.chromium.org/2335783003
2016-09-12 17:25:50 -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
bsalomon
1a1aa93034
Remove unneeded GrGLSLTransformedCoordsArray type
...
Rename GrGLSLFragmentBuilder::ensureFSCoords2D to ensureCoords2D and make it take an arbitrary GrShaderVar.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2324663004
Review-Url: https://codereview.chromium.org/2324663004
2016-09-12 09:30:36 -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
vjiaoblack
b2796fdd9e
Added in Radial Shadows
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2311223004
Review-Url: https://codereview.chromium.org/2311223004
2016-09-09 09:22:40 -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
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
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
brianosman
2c4b64e92a
New gamut GM, to test gamut conversion in various code-paths
...
After several different strategies, this one appears to work
well. The basic test:
1) For a variety of drawing techniques, we render fixed size
rectangles. (Solid colors via paint color, bitmap, etc...)
2) For each method in #1 , we render to both an sRGB and
WideGamutRGB offscreen surface. (AdobeRGB isn't wide enough
to clearly demonstrate if things are working or not).
3) Use readPixels to fetch the raw (still in wide gamut) pixel
data, then draw that directly to the final canvas.
So, for each pair of squares, they should look clearly
different. Currently, with the GPU backend, only the bicubic
bitmap paths have that behavior. Adding more test cases (and
fixing the ones that are already incorrect) will be the long
tail of gamut transformation.
Current output (with my other patchset, which fixes all
bitmap draws): https://screenshot.googleplex.com/wsL3x7eCtWE.png
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2293173002
Review-Url: https://codereview.chromium.org/2293173002
2016-09-07 07:04:45 -07:00
reed
28d1ce5c40
reconfigure dont-clip-to-layer gm to not have transparent pixels in its final output
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2313653005
TBR=
Review-Url: https://codereview.chromium.org/2313653005
2016-09-06 14:57:00 -07:00
mtklein
0a441077dc
kNumWindows is only used in GPU builds
...
TBR=csmartdalton@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2305923004
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot
Committed: https://skia.googlesource.com/skia/+/af92a7f85a5fc774838910444a9f2cddc3e43a2c
Review-Url: https://codereview.chromium.org/2305923004
2016-09-06 11:45:31 -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
reed
02f9ed74ea
test dont-clip-layer
...
depends on fix from https://codereview.chromium.org/2309623002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2296703003
Review-Url: https://codereview.chromium.org/2296703003
2016-09-06 09:06:18 -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
mtklein
af92a7f85a
kNumWindows is only used in GPU builds
...
TBR=csmartdalton@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2305923004
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot
Review-Url: https://codereview.chromium.org/2305923004
2016-09-03 06:17:13 -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
reed
6ae6969434
record drawfilters
...
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2303033002
Review-Url: https://codereview.chromium.org/2303033002
2016-09-02 04:56:53 -07:00
mtklein
dbfd7ab108
Replace a lot of 'static const' with 'constexpr' or 'const'.
...
'static const' means, there must be at most one of these, and initialize it at
compile time if possible or runtime if necessary. This leads to unexpected
code execution, and TSAN* will complain about races on the guard variables.
Generally 'constexpr' or 'const' are better choices. Neither can cause races:
they're either intialized at compile time (constexpr) or intialized each time
independently (const).
This CL prefers constexpr where possible, and uses const where not. It even
prefers constexpr over const where they don't make a difference... I want to have
lots of examples of constexpr for people to see and mimic.
The scoped-to-class static has nothing to do with any of this, and is not changed.
* Not yet on the bots, which use an older TSAN.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005
Review-Url: https://codereview.chromium.org/2300623005
2016-09-01 11:24:54 -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
brianosman
7a99a0a301
Improve the gamma GM significantly
...
- Switch to portable typeface, to avoid per-platform diffs in the labels
- Stretch out the image slightly, to avoid overlap with larger font
- Fix several tests that were no longer matching ground-truth. We treat
SkColor as sRGB, so 0x7F is incorrect, for example. Several of the
XferMode tests had similar math errors now. Computed new values, and
verified that they work as expected.
- Removed a couple tests that were mixing color and alpha in funny ways
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2288053003
Review-Url: https://codereview.chromium.org/2288053003
2016-08-30 07:08:07 -07:00
brianosman
0e22eb8e6e
Some tests around surface creation and snapshotting with color space
...
Verify the rules that we're converging on for surfaces:
- For 8888, we only support sRGB-like gamma, or no color space at all.
- For F16, we require a color space, with linear gamma.
- For all other formats, we do not support color spaces.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2270823002
Review-Url: https://codereview.chromium.org/2270823002
2016-08-30 07:07:59 -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
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
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
fmalita
ab83da7142
drawBitmapRect() should not touch the CTM when mask filters are present
...
Blur sigma calculations are CTM dependent, so we cannot take the
drawBitmap() fast path in the presence of mask filters.
BUG=skia:5682
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286873002
Review-Url: https://codereview.chromium.org/2286873002
2016-08-26 13:04:14 -07:00
msarett
febb224699
Reduce CPU overhead on drawRegion()
...
Only batch when the view matrices are the same.
This allows us to skip applying the matrix and uploading
local coords.
drawregion Bench on Nexus 6P:
Before 4.69ms
After 2.83ms
This puts SkiaGL nearly on par with OpenGL.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2282983003
Review-Url: https://codereview.chromium.org/2282983003
2016-08-26 12:49:27 -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
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