Commit Graph

13730 Commits

Author SHA1 Message Date
dvonbeck
6ad75d10eb LightingFP now supports multiple directional lights
BUG=skia:5518
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2239933004

Review-Url: https://codereview.chromium.org/2239933004
2016-08-15 11:35:55 -07:00
csmartdalton
d211e7875d Convert GrAppliedClip interface to builder style
GrAppliedClip was about at its limit for how many "make" functions it
could have. Window rectangles would push it over the edge. This change
makes it so GrDrawTarget supplies the original draw bounds to the
constructor, and then GrClip adds the various required clipping
techniques.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246113002

Review-Url: https://codereview.chromium.org/2246113002
2016-08-15 11:17:19 -07:00
egdaniel
3fe0327585 Fix 4444 on Vulkan devices who don't support RGBA_4444
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2238563002

Committed: https://skia.googlesource.com/skia/+/637b3bf2b9c10398d823bd015a722842d4f2f971
Review-Url: https://codereview.chromium.org/2238563002
2016-08-15 10:59:17 -07:00
robertphillips
0dafbde31f Pull handling of blurred circles out of GrRRectBlurEffect::Make
GrRRectBlurEffect is going away so this process can't live there anymore.

Split out of: https://codereview.chromium.org/2245653002/ (Start using vertex attributes for nine-patch blurred rrect draws)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243133002

Review-Url: https://codereview.chromium.org/2243133002
2016-08-15 09:04:45 -07:00
caryclark
8a65fc8c32 Revert of increase small allocator limit to encompass compose shader (patchset #1 id:1 of https://codereview.chromium.org/2234423005/ )
Reason for revert:
Increase in stack broke Google3

Original issue's description:
> increase small allocator limit to encompass compose shader
>
> R=reed@google.com
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234423005
>
> Committed: https://skia.googlesource.com/skia/+/8c200694f8eec5f623b3934b85c31dbb382be12c

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2244293002
2016-08-15 08:44:46 -07:00
msarett
200877eeca Optimize color xforms when src and dst are matching
Useful when:
(1) Client does not realize src and dst match (calls color
    xform anyway).
(2) Client wants half floats, src and dst have matching
    gamuts
(3) Client wants premul (done correctly in linear space),
    src and dst have matching gamuts.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206403003

Review-Url: https://codereview.chromium.org/2206403003
2016-08-15 08:10:44 -07:00
egdaniel
a95d46b4ac Fix copying of data in vulkan testing texture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248703002

Review-Url: https://codereview.chromium.org/2248703002
2016-08-15 08:06:29 -07:00
mtklein
ced26a3d6b add parallel public API for recording SkLiteDL.
The API is restricted to pretty much just what Derek calls,
but it's enough that we can switch testing over to use it.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246893002

Review-Url: https://codereview.chromium.org/2246893002
2016-08-15 08:05:39 -07:00
fmenozzi
cd9a1d0ec3 Add specialized code for hard stop gradients on GPU
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223203003

Committed: https://skia.googlesource.com/skia/+/0c63006b88a16e3418d92852a62771615799839d
Committed: https://skia.googlesource.com/skia/+/99818d69372d29a139935cfe5c379e491432931b
Committed: https://skia.googlesource.com/skia/+/2a4959181fc98d5d7ee862e7cd1c7993b3343be6
Review-Url: https://codereview.chromium.org/2223203003
2016-08-15 07:03:47 -07:00
caryclark
8c200694f8 increase small allocator limit to encompass compose shader
R=reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234423005

Review-Url: https://codereview.chromium.org/2234423005
2016-08-14 17:26:28 -07:00
msarett
de44222033 Webp has_alpha is a hint only
The has_alpha bit on webps is a hint only.  We are correct to always
assume that the image may have alpha.
https://groups.google.com/a/webmproject.org/forum/#!msg/webp-discuss/2rFPKOzxuSM/uabYhmSNJAAJ

TBR=scroggo@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243153002

Review-Url: https://codereview.chromium.org/2243153002
2016-08-14 15:31:28 -07:00
msarett
0c685ee188 Assert fDeviceClipBounds is always empty when clip is empty
I've fixed a few issues where this assert triggers.  The
nastiest case is when the client sets the clip to a strange
version of an empty rect (Ex: L,T,R,B=0,0,0,10).

I think I've made sufficient fixes so that
fDeviceClipBounds is always empty when clip is empty.

Let's test it though.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246503003

Review-Url: https://codereview.chromium.org/2246503003
2016-08-14 13:51:16 -07:00
gogil
40ff5fe59b Prevent overflows when using gamma_alloc_size
BUG=636268
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2230163002

Review-Url: https://codereview.chromium.org/2230163002
2016-08-14 02:12:40 -07:00
csmartdalton
5c6fc4fbfd Remove stencil settings param from stencilPath()
stencilPath() picks its own user stencil settings. This argument
should not be there.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241873002

Review-Url: https://codereview.chromium.org/2241873002
2016-08-12 15:11:51 -07:00
dvonbeck
09e12a6d4a Re-adding analytical GeoProc for rectangles
Adapted old GeoProc because its knowledge of the geometry is helpful for computing the distance vector: https://skia.googlesource.com/skia/+/6006d0f8c4f19d19a12de20826f731f52ac822a7/src/gpu/GrAARectRenderer.cpp

Added distance vector capabilities to this GeoProc.

Modified GrDrawContext to used this GeoProc when drawing anti-aliased vectors with a shader that requires distance vectors.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2230513004

Review-Url: https://codereview.chromium.org/2230513004
2016-08-12 12:50:36 -07:00
halcanary
8a822ba4a3 Revert of Exact Ganesh Gradients for Special Cases (patchset #9 id:160001 of https://codereview.chromium.org/2223203003/ )
Reason for revert:
specualtive revert to fix valgrind bot
Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind

Original issue's description:
> Remove generalized gradient code
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223203003
>
> Committed: https://skia.googlesource.com/skia/+/0c63006b88a16e3418d92852a62771615799839d
> Committed: https://skia.googlesource.com/skia/+/99818d69372d29a139935cfe5c379e491432931b
> Committed: https://skia.googlesource.com/skia/+/2a4959181fc98d5d7ee862e7cd1c7993b3343be6

TBR=bsalomon@google.com,fmenozzi@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/2245533005
2016-08-12 12:35:51 -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
msarett
fbfa258027 Optimized implementation of quickReject()
Impl Overview
(1) Keep the device clip bounds up to date.  This
    requires minimal additional work in a few places
    throughout canvas.
(2) Keep track of if the ctm isScaleTranslate.  Yes,
    there's a function that does this, but it's slow
    to call.
(3) Perform the src->device transform in quick reject,
    then check intersection/nan.

Other Notes:
(1) NaN and intersection checks are performed
    simultaneously.
(2) We no longer quick reject infinity.
(3) Affine and perspective are both handled in the slow
    case.
(4) SkRasterClip::isEmpty() is handled by the intersection
    check.

Performance on Nexus 6P:
93.2ms -> 59.8ms

Overall Android Jank Tests Performance Impact:
Should gain us a ms or two on some tests.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002

Committed: https://skia.googlesource.com/skia/+/d22a817ff57986407facd16af36320fc86ce02da
Review-Url: https://codereview.chromium.org/2225393002
2016-08-12 08:29:08 -07:00
halcanary
7e8d5d3519 SkPDF: Subset Type3 (fallback) font
Motivation: significant file-size reduction.

Also: SkPDFFont::subsetFont() returns a sk_sp<SkPDFObject>
rather than a SkPDFFont*.

SkPDFType3Font constructor no longer populates font info;
relies on subsetting.

SkPDFFont::Create is easier to read

Also: SkPDFType3Font are scaled by emSize rather than 1000.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231483002

Committed: https://skia.googlesource.com/skia/+/88b138da99328b04cae9a8ee19c3882b8847a550
Review-Url: https://codereview.chromium.org/2231483002
2016-08-12 07:59:38 -07:00
fmenozzi
2a4959181f Remove generalized gradient code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223203003

Committed: https://skia.googlesource.com/skia/+/0c63006b88a16e3418d92852a62771615799839d
Committed: https://skia.googlesource.com/skia/+/99818d69372d29a139935cfe5c379e491432931b
Review-Url: https://codereview.chromium.org/2223203003
2016-08-12 06:33:52 -07:00
mtklein
5aeb2fa253 Revert of Optimized implementation of quickReject() (patchset #12 id:260001 of https://codereview.chromium.org/2225393002/ )
Reason for revert:
New assert triggering in the Chrome roll,
https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/208750/steps/webkit_unit_tests%20%28with%20patch%29%20on%20Ubuntu-12.04/logs/FrameThrottlingTest.SynchronousLayoutInAnimationFrameCallback

and breaks the SKNX_NO_SIMD bot,
https://codereview.chromium.org/2236363004

Original issue's description:
> Optimized implementation of quickReject()
>
> Impl Overview
> (1) Keep the device clip bounds up to date.  This
>     requires minimal additional work in a few places
>     throughout canvas.
> (2) Keep track of if the ctm isScaleTranslate.  Yes,
>     there's a function that does this, but it's slow
>     to call.
> (3) Perform the src->device transform in quick reject,
>     then check intersection/nan.
>
> Other Notes:
> (1) NaN and intersection checks are performed
>     simultaneously.
> (2) We no longer quick reject infinity.
> (3) Affine and perspective are both handled in the slow
>     case.
> (4) SkRasterClip::isEmpty() is handled by the intersection
>     check.
>
> Performance on Nexus 6P:
> 93.2ms -> 59.8ms
>
> Overall Android Jank Tests Performance Impact:
> Should gain us a ms or two on some tests.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002
>
> Committed: https://skia.googlesource.com/skia/+/d22a817ff57986407facd16af36320fc86ce02da

TBR=reed@google.com,herb@google.com,msarett@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2231393003
2016-08-12 02:22:33 -07:00
halcanary
cf736d7b66 Revert of Exact Ganesh Gradients for Special Cases (patchset #8 id:140001 of https://codereview.chromium.org/2223203003/ )
Reason for revert:
Chrome iOS build break
https://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/50777/steps/compile/logs/stdio
error: unused function 'close_to_one_half'

Original issue's description:
> Remove generalized gradient code
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223203003
>
> Committed: https://skia.googlesource.com/skia/+/0c63006b88a16e3418d92852a62771615799839d
> Committed: https://skia.googlesource.com/skia/+/99818d69372d29a139935cfe5c379e491432931b

TBR=bsalomon@google.com,fmenozzi@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/2241483003
2016-08-11 18:07:37 -07:00
egdaniel
a825d5317c Revert of Fix 4444 on Vulkan devices who don't support RGBA_4444 (patchset #4 id:60001 of https://codereview.chromium.org/2238563002/ )
Reason for revert:
test failing on some gpus

Original issue's description:
> Fix 4444 on Vulkan devices who don't support RGBA_4444
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2238563002
>
> Committed: https://skia.googlesource.com/skia/+/637b3bf2b9c10398d823bd015a722842d4f2f971

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2240713003
2016-08-11 16:17:39 -07:00
msarett
d22a817ff5 Optimized implementation of quickReject()
Impl Overview
(1) Keep the device clip bounds up to date.  This
    requires minimal additional work in a few places
    throughout canvas.
(2) Keep track of if the ctm isScaleTranslate.  Yes,
    there's a function that does this, but it's slow
    to call.
(3) Perform the src->device transform in quick reject,
    then check intersection/nan.

Other Notes:
(1) NaN and intersection checks are performed
    simultaneously.
(2) We no longer quick reject infinity.
(3) Affine and perspective are both handled in the slow
    case.
(4) SkRasterClip::isEmpty() is handled by the intersection
    check.

Performance on Nexus 6P:
93.2ms -> 59.8ms

Overall Android Jank Tests Performance Impact:
Should gain us a ms or two on some tests.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225393002

Review-Url: https://codereview.chromium.org/2225393002
2016-08-11 14:40:04 -07:00
dvonbeck
ee92063f9e LightingShader and NormalSource comment and style fixes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237963002

Review-Url: https://codereview.chromium.org/2237963002
2016-08-11 14:17:59 -07:00
halcanary
5bf60adaaf Revert of SkPDF: Subset Type3 (fallback) font (patchset #8 id:200001 of https://codereview.chromium.org/2231483002/ )
Reason for revert:
internal failing

Original issue's description:
> SkPDF: Subset Type3 (fallback) font
>
> Motivation: significant file-size reduction.
>
> Also: SkPDFFont::subsetFont() returns a sk_sp<SkPDFObject>
> rather than a SkPDFFont*.
>
> SkPDFType3Font constructor no longer populates font info;
> relies on subsetting.
>
> SkPDFFont::Create is easier to read
>
> Also: SkPDFType3Font are scaled by emSize rather than 1000.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231483002
>
> Committed: https://skia.googlesource.com/skia/+/88b138da99328b04cae9a8ee19c3882b8847a550

TBR=bungeman@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/2232283003
2016-08-11 13:59:19 -07:00
egdaniel
637b3bf2b9 Fix 4444 on Vulkan devices who don't support RGBA_4444
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2238563002

Review-Url: https://codereview.chromium.org/2238563002
2016-08-11 13:44:23 -07:00
fmenozzi
99818d6937 Remove generalized gradient code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223203003

Committed: https://skia.googlesource.com/skia/+/0c63006b88a16e3418d92852a62771615799839d
Review-Url: https://codereview.chromium.org/2223203003
2016-08-11 12:32:10 -07:00
halcanary
88b138da99 SkPDF: Subset Type3 (fallback) font
Motivation: significant file-size reduction.

Also: SkPDFFont::subsetFont() returns a sk_sp<SkPDFObject>
rather than a SkPDFFont*.

SkPDFType3Font constructor no longer populates font info;
relies on subsetting.

SkPDFFont::Create is easier to read

Also: SkPDFType3Font are scaled by emSize rather than 1000.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231483002

Review-Url: https://codereview.chromium.org/2231483002
2016-08-11 12:25:09 -07:00
brianosman
86e7626f08 Move GrAtlasTextContext to GrDrawingManager, so we only have one.
Ultimately, avoids wasteful redundant computation and storage of distance
field fake-gamma tables.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2240623002

Review-Url: https://codereview.chromium.org/2240623002
2016-08-11 12:17:32 -07:00
caryclark
c6d855f7f3 start working on tiger again
The tiger tests are a suite under development
that exercise many coincident edge cases.

This fixes the case when a duplicate point is not
ignored when the coincident span references the
primary point.

TBR=reed@google.com
BUG=skia:5131
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2239803002

Review-Url: https://codereview.chromium.org/2239803002
2016-08-11 11:59:48 -07:00
bsalomon
fd8d013f0d Avoid creating full screen clear batches when there is already one in the queue.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2237633003

Review-Url: https://codereview.chromium.org/2237633003
2016-08-11 11:25:33 -07:00
msarett
6372e65909 Delete quickRejectY()
This is the first step in a refactor of quickReject().

TBR=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241473002

Review-Url: https://codereview.chromium.org/2241473002
2016-08-11 10:31:49 -07:00
robertphillips
865606df97 Always give simple circular rrects a shot at being directly blurred on the GPU
I believe we want to do this but split it out of https://codereview.chromium.org/2201133002/ (Implement GPU occluded blur mask filter) b.c. it has its own perf implications and changes several GMs on its own.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2232263002

Review-Url: https://codereview.chromium.org/2232263002
2016-08-11 08:24:42 -07:00
bsalomon
198ca42c67 Inline fast path for GrPaint::isConstantBlendedColor when no color FPs and src-over blend.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2236423002

Review-Url: https://codereview.chromium.org/2236423002
2016-08-11 07:39:33 -07:00
mtklein
d559eb2f47 SkLiteDL: turn vtable sideways
Instead of using virtuals for polymorphism, store each polymorphic operation
in its own array of function pointers.  This removes an indirection when calling
the function, and lets us use nullptr as a signal to skip the call entirely.

Unfortunately (as the old code is rather simpler) this makes an unambiguous speed improvement.

Before:
curr/maxrss	loops	min	median	mean	max	stddev	samples	config	bench
  21/26  MB	2	44.6µs	46.4µs	48.3µs	274µs	13%	51724	nonrendering	desk_nytimes.skp
  23/26  MB	11	11.4µs	11.9µs	12.4µs	75.1µs	15%	36716	nonrendering	keymobi_nytimes_com_.skp

After:
  19/26  MB	4	40.4µs	41.6µs	42.5µs	197µs	10%	29379	nonrendering	desk_nytimes.skp
  20/26  MB	14	10.5µs	10.7µs	11.2µs	59.5µs	13%	31971	nonrendering	keymobi_nytimes_com_.skp

Broader comparison:
               keymobi_linkedin.skp	1.76us -> 1.77us	1x
keymobi_bing_com_search_q_sloth.skp	5.09us -> 5.05us	0.99x
               keymobi_digg_com.skp	17.4us -> 17.3us	0.99x
           keymobi_theverge_com.skp	3.37us -> 3.34us	0.99x
top25desk_mail_google_com_mail_.skp	30.8us -> 30.4us	0.99x
                     tabl_gmail.skp	3.44us -> 3.38us	0.98x
    top25desk_wikipedia__1_tab_.skp	 100us -> 97.7us	0.98x
keymobi_cnn_com_2012_10_03_poli.skp	52.9us -> 51.7us	0.98x
                desk_chalkboard.skp	 107us ->  104us	0.97x
             desk_css3gradients.skp	17.8us -> 17.3us	0.97x
keymobi_androidpolice_com_2012_.skp	42.3us -> 41.1us	0.97x
                desk_googlehome.skp	1.94us -> 1.88us	0.97x
               keymobi_mlb_com_.skp	5.38us -> 5.18us	0.96x
            top25desk_pinterest.skp	92.1us -> 88.5us	0.96x
keymobi_iphone_capitolvolkswage.skp	15.1us -> 14.5us	0.96x
         keymobi_techcrunch_com.skp	9.45us -> 9.05us	0.96x
                      desk_espn.skp	31.3us ->   30us	0.96x
          keymobi_slashdot_org_.skp	8.72us -> 8.34us	0.96x
                 desk_tiger8svg.skp	30.6us -> 29.2us	0.96x
                keymobi_blogger.skp	4.09us -> 3.91us	0.95x
keymobi_baidu_com_s_wd_barack_o.skp	11.9us -> 11.3us	0.95x
       keymobi_cuteoverload_com.skp	54.2us -> 51.6us	0.95x
        keymobi_deviantart_com_.skp	17.2us -> 16.4us	0.95x
                    desk_mapsvg.skp	 163ns ->  155ns	0.95x
              keymobi_pinterest.skp	6.97us -> 6.62us	0.95x
      top25desk_games_yahoo_com.skp	94.1us -> 89.3us	0.95x
 top25desk_google_com_calendar_.skp	  18us ->   17us	0.95x
keymobi_google_co_uk_search_hl_.skp	11.4us -> 10.8us	0.95x
                    tabl_pravda.skp	38.5us -> 36.4us	0.94x
               desk_gmailthread.skp	  19us -> 17.9us	0.94x
keymobi_reddit_com_r_programmin.skp	76.1us -> 71.7us	0.94x
             top25desk_linkedin.skp	  20us -> 18.8us	0.94x
               tabl_gamedeksiam.skp	 118us ->  112us	0.94x
         keymobi_boingboing_net.skp	20.4us -> 19.1us	0.93x
top25desk_google_com__hl_en_q_b.skp	17.6us -> 16.4us	0.93x
keymobi_amazon_com_gp_aw_s_ref_.skp	12.5us -> 11.6us	0.93x
            keymobi_sfgate_com_.skp	16.6us -> 15.5us	0.93x
keymobi_booking_com_searchresul.skp	16.2us -> 15.1us	0.93x
                      tabl_digg.skp	28.8us -> 26.8us	0.93x
                   tabl_mozilla.skp	80.4us -> 74.6us	0.93x
                   desk_wowwiki.skp	39.2us -> 36.4us	0.93x
          top25desk_youtube_com.skp	  42us -> 38.9us	0.93x
             top25desk_facebook.skp	23.7us ->   22us	0.93x
              top25desk_blogger.skp	38.2us -> 35.4us	0.93x
keymobi_online_wsj_com_home_pag.skp	12.8us -> 11.9us	0.93x
            top25desk_wordpress.skp	28.9us -> 26.8us	0.93x
    top25desk_answers_yahoo_com.skp	37.2us -> 34.4us	0.93x
keymobi_plus_google_com_app_bas.skp	9.56us -> 8.85us	0.93x
              keymobi_wordpress.skp	16.1us -> 14.9us	0.92x
keymobi_mobile_news_sandbox_goo.skp	27.1us -> 24.9us	0.92x
       top25desk_techcrunch_com.skp	31.1us -> 28.6us	0.92x
      keymobi_worldjournal_com_.skp	50.7us -> 46.5us	0.92x
keymobi_theverge_com_2012_10_28.skp	26.2us ->   24us	0.92x
            desk_jsfiddlebigcar.skp	1.73us -> 1.59us	0.92x
          top25desk_weather_com.skp	31.3us -> 28.7us	0.92x
top25desk_google_com_search_q_c.skp	48.2us -> 44.1us	0.92x
              top25desk_twitter.skp	27.8us -> 25.5us	0.92x
              tabl_worldjournal.skp	29.3us -> 26.8us	0.91x
                   desk_nytimes.skp	  46us ->   42us	0.91x
top25desk_docs___1_open_documen.skp	6.04us -> 5.51us	0.91x
      keymobi_wikipedia__1_tab_.skp	59.7us -> 54.4us	0.91x
              desk_unicodetable.skp	1.12ms -> 1.02ms	0.91x
             top25desk_ebay_com.skp	17.8us -> 16.2us	0.91x
keymobi_ftw_usatoday_com_2014_0.skp	26.8us -> 24.3us	0.91x
    top25desk_sports_yahoo_com_.skp	49.9us -> 45.3us	0.91x
                keymobi_cnn_com.skp	9.94us -> 9.03us	0.91x
keymobi_m_youtube_com_watch_v_9.skp	13.4us -> 12.2us	0.91x
           top25desk_amazon_com.skp	26.6us -> 24.1us	0.91x
         keymobi_news_yahoo_com.skp	17.5us -> 15.8us	0.9x
keymobi_wowwiki_com_world_of_wa.skp	11.2us -> 10.2us	0.9x
top25desk_plus_google_com_11003.skp	93.5us -> 84.4us	0.9x
                    desk_carsvg.skp	53.5us -> 48.2us	0.9x
       top25desk_news_yahoo_com.skp	44.7us -> 40.3us	0.9x
keymobi_wikipedia__1_tab____del.skp	59.4us -> 53.4us	0.9x
         desk_googlespreadsheet.skp	  66us -> 59.2us	0.9x
keymobi_answers_yahoo_com_quest.skp	30.2us ->   27us	0.89x
             desk_ugamsolutions.skp	  13us -> 11.6us	0.89x
keymobi_shop_mobileweb_ebay_com.skp	6.96us -> 6.21us	0.89x
           keymobi_nytimes_com_.skp	12.1us -> 10.8us	0.89x
                 keymobi_gsp_ro.skp	5.54us -> 4.92us	0.89x
          top25desk_booking_com.skp	54.9us -> 48.6us	0.89x
                 top25desk_espn.skp	  37us -> 32.6us	0.88x
keymobi_facebook_com_barackobam.skp	23.3us -> 20.4us	0.88x

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231103002

Committed: https://skia.googlesource.com/skia/+/ac243914af957a806d842318a43dddaf5f941dc3

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng

Review-Url: https://codereview.chromium.org/2231103002
2016-08-11 07:08:28 -07:00
reed
6b2d7acecd fix memory leak, remake Imageshader to use sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2239723002

Review-Url: https://codereview.chromium.org/2239723002
2016-08-11 06:42:26 -07:00
jcgregorio
0be353487c Remove a useless call: Calling lineVec.dot(qPts[0])
This is from https://github.com/google/skia/pull/9, an external pull
request from https://github.com/sylvestre.

BUG=skia:
R=bsalomon
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234563003

Review-Url: https://codereview.chromium.org/2234563003
2016-08-11 04:43:39 -07:00
reed
d230149ef8 Revert of SkLiteDL: turn vtable sideways (patchset #7 id:120001 of https://codereview.chromium.org/2231103002/ )
Reason for revert:
speculative revert to fix DEPS roll

Original issue's description:
> SkLiteDL: turn vtable sideways
>
> Instead of using virtuals for polymorphism, store each polymorphic operation
> in its own array of function pointers.  This removes an indirection when calling
> the function, and lets us use nullptr as a signal to skip the call entirely.
>
> Unfortunately (as the old code is rather simpler) this makes an unambiguous speed improvement.
>
> Before:
> curr/maxrss	loops	min	median	mean	max	stddev	samples	config	bench
>   21/26  MB	2	44.6µs	46.4µs	48.3µs	274µs	13%	51724	nonrendering	desk_nytimes.skp
>   23/26  MB	11	11.4µs	11.9µs	12.4µs	75.1µs	15%	36716	nonrendering	keymobi_nytimes_com_.skp
>
> After:
>   19/26  MB	4	40.4µs	41.6µs	42.5µs	197µs	10%	29379	nonrendering	desk_nytimes.skp
>   20/26  MB	14	10.5µs	10.7µs	11.2µs	59.5µs	13%	31971	nonrendering	keymobi_nytimes_com_.skp
>
> Broader comparison:
>                keymobi_linkedin.skp	1.76us -> 1.77us	1x
> keymobi_bing_com_search_q_sloth.skp	5.09us -> 5.05us	0.99x
>                keymobi_digg_com.skp	17.4us -> 17.3us	0.99x
>            keymobi_theverge_com.skp	3.37us -> 3.34us	0.99x
> top25desk_mail_google_com_mail_.skp	30.8us -> 30.4us	0.99x
>                      tabl_gmail.skp	3.44us -> 3.38us	0.98x
>     top25desk_wikipedia__1_tab_.skp	 100us -> 97.7us	0.98x
> keymobi_cnn_com_2012_10_03_poli.skp	52.9us -> 51.7us	0.98x
>                 desk_chalkboard.skp	 107us ->  104us	0.97x
>              desk_css3gradients.skp	17.8us -> 17.3us	0.97x
> keymobi_androidpolice_com_2012_.skp	42.3us -> 41.1us	0.97x
>                 desk_googlehome.skp	1.94us -> 1.88us	0.97x
>                keymobi_mlb_com_.skp	5.38us -> 5.18us	0.96x
>             top25desk_pinterest.skp	92.1us -> 88.5us	0.96x
> keymobi_iphone_capitolvolkswage.skp	15.1us -> 14.5us	0.96x
>          keymobi_techcrunch_com.skp	9.45us -> 9.05us	0.96x
>                       desk_espn.skp	31.3us ->   30us	0.96x
>           keymobi_slashdot_org_.skp	8.72us -> 8.34us	0.96x
>                  desk_tiger8svg.skp	30.6us -> 29.2us	0.96x
>                 keymobi_blogger.skp	4.09us -> 3.91us	0.95x
> keymobi_baidu_com_s_wd_barack_o.skp	11.9us -> 11.3us	0.95x
>        keymobi_cuteoverload_com.skp	54.2us -> 51.6us	0.95x
>         keymobi_deviantart_com_.skp	17.2us -> 16.4us	0.95x
>                     desk_mapsvg.skp	 163ns ->  155ns	0.95x
>               keymobi_pinterest.skp	6.97us -> 6.62us	0.95x
>       top25desk_games_yahoo_com.skp	94.1us -> 89.3us	0.95x
>  top25desk_google_com_calendar_.skp	  18us ->   17us	0.95x
> keymobi_google_co_uk_search_hl_.skp	11.4us -> 10.8us	0.95x
>                     tabl_pravda.skp	38.5us -> 36.4us	0.94x
>                desk_gmailthread.skp	  19us -> 17.9us	0.94x
> keymobi_reddit_com_r_programmin.skp	76.1us -> 71.7us	0.94x
>              top25desk_linkedin.skp	  20us -> 18.8us	0.94x
>                tabl_gamedeksiam.skp	 118us ->  112us	0.94x
>          keymobi_boingboing_net.skp	20.4us -> 19.1us	0.93x
> top25desk_google_com__hl_en_q_b.skp	17.6us -> 16.4us	0.93x
> keymobi_amazon_com_gp_aw_s_ref_.skp	12.5us -> 11.6us	0.93x
>             keymobi_sfgate_com_.skp	16.6us -> 15.5us	0.93x
> keymobi_booking_com_searchresul.skp	16.2us -> 15.1us	0.93x
>                       tabl_digg.skp	28.8us -> 26.8us	0.93x
>                    tabl_mozilla.skp	80.4us -> 74.6us	0.93x
>                    desk_wowwiki.skp	39.2us -> 36.4us	0.93x
>           top25desk_youtube_com.skp	  42us -> 38.9us	0.93x
>              top25desk_facebook.skp	23.7us ->   22us	0.93x
>               top25desk_blogger.skp	38.2us -> 35.4us	0.93x
> keymobi_online_wsj_com_home_pag.skp	12.8us -> 11.9us	0.93x
>             top25desk_wordpress.skp	28.9us -> 26.8us	0.93x
>     top25desk_answers_yahoo_com.skp	37.2us -> 34.4us	0.93x
> keymobi_plus_google_com_app_bas.skp	9.56us -> 8.85us	0.93x
>               keymobi_wordpress.skp	16.1us -> 14.9us	0.92x
> keymobi_mobile_news_sandbox_goo.skp	27.1us -> 24.9us	0.92x
>        top25desk_techcrunch_com.skp	31.1us -> 28.6us	0.92x
>       keymobi_worldjournal_com_.skp	50.7us -> 46.5us	0.92x
> keymobi_theverge_com_2012_10_28.skp	26.2us ->   24us	0.92x
>             desk_jsfiddlebigcar.skp	1.73us -> 1.59us	0.92x
>           top25desk_weather_com.skp	31.3us -> 28.7us	0.92x
> top25desk_google_com_search_q_c.skp	48.2us -> 44.1us	0.92x
>               top25desk_twitter.skp	27.8us -> 25.5us	0.92x
>               tabl_worldjournal.skp	29.3us -> 26.8us	0.91x
>                    desk_nytimes.skp	  46us ->   42us	0.91x
> top25desk_docs___1_open_documen.skp	6.04us -> 5.51us	0.91x
>       keymobi_wikipedia__1_tab_.skp	59.7us -> 54.4us	0.91x
>               desk_unicodetable.skp	1.12ms -> 1.02ms	0.91x
>              top25desk_ebay_com.skp	17.8us -> 16.2us	0.91x
> keymobi_ftw_usatoday_com_2014_0.skp	26.8us -> 24.3us	0.91x
>     top25desk_sports_yahoo_com_.skp	49.9us -> 45.3us	0.91x
>                 keymobi_cnn_com.skp	9.94us -> 9.03us	0.91x
> keymobi_m_youtube_com_watch_v_9.skp	13.4us -> 12.2us	0.91x
>            top25desk_amazon_com.skp	26.6us -> 24.1us	0.91x
>          keymobi_news_yahoo_com.skp	17.5us -> 15.8us	0.9x
> keymobi_wowwiki_com_world_of_wa.skp	11.2us -> 10.2us	0.9x
> top25desk_plus_google_com_11003.skp	93.5us -> 84.4us	0.9x
>                     desk_carsvg.skp	53.5us -> 48.2us	0.9x
>        top25desk_news_yahoo_com.skp	44.7us -> 40.3us	0.9x
> keymobi_wikipedia__1_tab____del.skp	59.4us -> 53.4us	0.9x
>          desk_googlespreadsheet.skp	  66us -> 59.2us	0.9x
> keymobi_answers_yahoo_com_quest.skp	30.2us ->   27us	0.89x
>              desk_ugamsolutions.skp	  13us -> 11.6us	0.89x
> keymobi_shop_mobileweb_ebay_com.skp	6.96us -> 6.21us	0.89x
>            keymobi_nytimes_com_.skp	12.1us -> 10.8us	0.89x
>                  keymobi_gsp_ro.skp	5.54us -> 4.92us	0.89x
>           top25desk_booking_com.skp	54.9us -> 48.6us	0.89x
>                  top25desk_espn.skp	  37us -> 32.6us	0.88x
> keymobi_facebook_com_barackobam.skp	23.3us -> 20.4us	0.88x
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231103002
>
> Committed: https://skia.googlesource.com/skia/+/ac243914af957a806d842318a43dddaf5f941dc3

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:

Review-Url: https://codereview.chromium.org/2232183002
2016-08-11 03:56:13 -07:00
reed
a9ca05ca5e Deserialize pictures with custom image-deserializer
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187613002

Review-Url: https://codereview.chromium.org/2187613002
2016-08-11 03:55:15 -07:00
hstern
5a4b18c6f2 Add better bounds checks for getTime to fix perf debug assert below
Due to rounding, we request a length slightly larger than the total
length in MeasureBench. This will be fixed in a following CL and there
will be another CL adding unit tests for bounds checking and other
problems.

Revert "Revert  386ba54 and  4ab47e0 : perf debug assert."

This reverts commit 69aaa5a49a.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233983003

Review-Url: https://codereview.chromium.org/2233983003
2016-08-10 16:31:10 -07:00
bsalomon
9f129de595 Add a full clear method to GrDrawTarget.
This will allow us to avoid ClearBatch creation for successive clears.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233043002

Review-Url: https://codereview.chromium.org/2233043002
2016-08-10 16:31:06 -07:00
mtklein
ac243914af SkLiteDL: turn vtable sideways
Instead of using virtuals for polymorphism, store each polymorphic operation
in its own array of function pointers.  This removes an indirection when calling
the function, and lets us use nullptr as a signal to skip the call entirely.

Unfortunately (as the old code is rather simpler) this makes an unambiguous speed improvement.

Before:
curr/maxrss	loops	min	median	mean	max	stddev	samples	config	bench
  21/26  MB	2	44.6µs	46.4µs	48.3µs	274µs	13%	51724	nonrendering	desk_nytimes.skp
  23/26  MB	11	11.4µs	11.9µs	12.4µs	75.1µs	15%	36716	nonrendering	keymobi_nytimes_com_.skp

After:
  19/26  MB	4	40.4µs	41.6µs	42.5µs	197µs	10%	29379	nonrendering	desk_nytimes.skp
  20/26  MB	14	10.5µs	10.7µs	11.2µs	59.5µs	13%	31971	nonrendering	keymobi_nytimes_com_.skp

Broader comparison:
               keymobi_linkedin.skp	1.76us -> 1.77us	1x
keymobi_bing_com_search_q_sloth.skp	5.09us -> 5.05us	0.99x
               keymobi_digg_com.skp	17.4us -> 17.3us	0.99x
           keymobi_theverge_com.skp	3.37us -> 3.34us	0.99x
top25desk_mail_google_com_mail_.skp	30.8us -> 30.4us	0.99x
                     tabl_gmail.skp	3.44us -> 3.38us	0.98x
    top25desk_wikipedia__1_tab_.skp	 100us -> 97.7us	0.98x
keymobi_cnn_com_2012_10_03_poli.skp	52.9us -> 51.7us	0.98x
                desk_chalkboard.skp	 107us ->  104us	0.97x
             desk_css3gradients.skp	17.8us -> 17.3us	0.97x
keymobi_androidpolice_com_2012_.skp	42.3us -> 41.1us	0.97x
                desk_googlehome.skp	1.94us -> 1.88us	0.97x
               keymobi_mlb_com_.skp	5.38us -> 5.18us	0.96x
            top25desk_pinterest.skp	92.1us -> 88.5us	0.96x
keymobi_iphone_capitolvolkswage.skp	15.1us -> 14.5us	0.96x
         keymobi_techcrunch_com.skp	9.45us -> 9.05us	0.96x
                      desk_espn.skp	31.3us ->   30us	0.96x
          keymobi_slashdot_org_.skp	8.72us -> 8.34us	0.96x
                 desk_tiger8svg.skp	30.6us -> 29.2us	0.96x
                keymobi_blogger.skp	4.09us -> 3.91us	0.95x
keymobi_baidu_com_s_wd_barack_o.skp	11.9us -> 11.3us	0.95x
       keymobi_cuteoverload_com.skp	54.2us -> 51.6us	0.95x
        keymobi_deviantart_com_.skp	17.2us -> 16.4us	0.95x
                    desk_mapsvg.skp	 163ns ->  155ns	0.95x
              keymobi_pinterest.skp	6.97us -> 6.62us	0.95x
      top25desk_games_yahoo_com.skp	94.1us -> 89.3us	0.95x
 top25desk_google_com_calendar_.skp	  18us ->   17us	0.95x
keymobi_google_co_uk_search_hl_.skp	11.4us -> 10.8us	0.95x
                    tabl_pravda.skp	38.5us -> 36.4us	0.94x
               desk_gmailthread.skp	  19us -> 17.9us	0.94x
keymobi_reddit_com_r_programmin.skp	76.1us -> 71.7us	0.94x
             top25desk_linkedin.skp	  20us -> 18.8us	0.94x
               tabl_gamedeksiam.skp	 118us ->  112us	0.94x
         keymobi_boingboing_net.skp	20.4us -> 19.1us	0.93x
top25desk_google_com__hl_en_q_b.skp	17.6us -> 16.4us	0.93x
keymobi_amazon_com_gp_aw_s_ref_.skp	12.5us -> 11.6us	0.93x
            keymobi_sfgate_com_.skp	16.6us -> 15.5us	0.93x
keymobi_booking_com_searchresul.skp	16.2us -> 15.1us	0.93x
                      tabl_digg.skp	28.8us -> 26.8us	0.93x
                   tabl_mozilla.skp	80.4us -> 74.6us	0.93x
                   desk_wowwiki.skp	39.2us -> 36.4us	0.93x
          top25desk_youtube_com.skp	  42us -> 38.9us	0.93x
             top25desk_facebook.skp	23.7us ->   22us	0.93x
              top25desk_blogger.skp	38.2us -> 35.4us	0.93x
keymobi_online_wsj_com_home_pag.skp	12.8us -> 11.9us	0.93x
            top25desk_wordpress.skp	28.9us -> 26.8us	0.93x
    top25desk_answers_yahoo_com.skp	37.2us -> 34.4us	0.93x
keymobi_plus_google_com_app_bas.skp	9.56us -> 8.85us	0.93x
              keymobi_wordpress.skp	16.1us -> 14.9us	0.92x
keymobi_mobile_news_sandbox_goo.skp	27.1us -> 24.9us	0.92x
       top25desk_techcrunch_com.skp	31.1us -> 28.6us	0.92x
      keymobi_worldjournal_com_.skp	50.7us -> 46.5us	0.92x
keymobi_theverge_com_2012_10_28.skp	26.2us ->   24us	0.92x
            desk_jsfiddlebigcar.skp	1.73us -> 1.59us	0.92x
          top25desk_weather_com.skp	31.3us -> 28.7us	0.92x
top25desk_google_com_search_q_c.skp	48.2us -> 44.1us	0.92x
              top25desk_twitter.skp	27.8us -> 25.5us	0.92x
              tabl_worldjournal.skp	29.3us -> 26.8us	0.91x
                   desk_nytimes.skp	  46us ->   42us	0.91x
top25desk_docs___1_open_documen.skp	6.04us -> 5.51us	0.91x
      keymobi_wikipedia__1_tab_.skp	59.7us -> 54.4us	0.91x
              desk_unicodetable.skp	1.12ms -> 1.02ms	0.91x
             top25desk_ebay_com.skp	17.8us -> 16.2us	0.91x
keymobi_ftw_usatoday_com_2014_0.skp	26.8us -> 24.3us	0.91x
    top25desk_sports_yahoo_com_.skp	49.9us -> 45.3us	0.91x
                keymobi_cnn_com.skp	9.94us -> 9.03us	0.91x
keymobi_m_youtube_com_watch_v_9.skp	13.4us -> 12.2us	0.91x
           top25desk_amazon_com.skp	26.6us -> 24.1us	0.91x
         keymobi_news_yahoo_com.skp	17.5us -> 15.8us	0.9x
keymobi_wowwiki_com_world_of_wa.skp	11.2us -> 10.2us	0.9x
top25desk_plus_google_com_11003.skp	93.5us -> 84.4us	0.9x
                    desk_carsvg.skp	53.5us -> 48.2us	0.9x
       top25desk_news_yahoo_com.skp	44.7us -> 40.3us	0.9x
keymobi_wikipedia__1_tab____del.skp	59.4us -> 53.4us	0.9x
         desk_googlespreadsheet.skp	  66us -> 59.2us	0.9x
keymobi_answers_yahoo_com_quest.skp	30.2us ->   27us	0.89x
             desk_ugamsolutions.skp	  13us -> 11.6us	0.89x
keymobi_shop_mobileweb_ebay_com.skp	6.96us -> 6.21us	0.89x
           keymobi_nytimes_com_.skp	12.1us -> 10.8us	0.89x
                 keymobi_gsp_ro.skp	5.54us -> 4.92us	0.89x
          top25desk_booking_com.skp	54.9us -> 48.6us	0.89x
                 top25desk_espn.skp	  37us -> 32.6us	0.88x
keymobi_facebook_com_barackobam.skp	23.3us -> 20.4us	0.88x

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231103002

Review-Url: https://codereview.chromium.org/2231103002
2016-08-10 16:30:33 -07:00
robertphillips
27cdd94790 Implement GPU occluded blur mask filter
Spawned off: https://codereview.chromium.org/2214163003/ (Minor clean up related to blur mask filters)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201133002

Review-Url: https://codereview.chromium.org/2201133002
2016-08-10 16:25:25 -07:00
reed
2ab9057b31 update textblob api to use sk_sp
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2236013002

NOTREECHECKS=True

Review-Url: https://codereview.chromium.org/2236013002
2016-08-10 14:16:41 -07:00
fmenozzi
568de46cb1 Revert "Remove generalized gradient code"
This reverts commit 0c63006b88.

BUG=skia:
NOTREECHECKS=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235953003

Review-Url: https://codereview.chromium.org/2235953003
2016-08-10 13:01:35 -07:00
bsalomon
80e38ac117 Add more error printing to know why command buffer lib failed to load.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233073002

Review-Url: https://codereview.chromium.org/2233073002
2016-08-10 12:26:00 -07:00
robertphillips
f5a83e8184 Create blurred RRect mask on GPU (rather than uploading it)
This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)

All blurred rrects using the "analytic" path will change slightly with this CL.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004

Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50
Review-Url: https://codereview.chromium.org/2222083004
2016-08-10 12:00:09 -07:00
halcanary
69aaa5a49a Revert 386ba54 and 4ab47e0 : perf debug assert.
Revert "Refactor SkCurveMeasure to use existing eval code"

This reverts commit 4ab47e087e.

Revert "Fastpath lines in SkCurveMeasure"

This reverts commit 386ba54061.

TBR=
NOTRY=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233683004

Review-Url: https://codereview.chromium.org/2233683004
2016-08-10 11:40:37 -07:00
hstern
386ba54061 Fastpath lines in SkCurveMeasure
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2229403004

Review-Url: https://codereview.chromium.org/2229403004
2016-08-10 11:12:22 -07:00
csmartdalton
f9635999a4 Add flag for window rectangles to GrRenderTarget
Adds a flag to GrRenderTarget that indicates whether it can be used
with window rectangles. Also attempts to clean up some of the mixed
samples API.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225303002

Review-Url: https://codereview.chromium.org/2225303002
2016-08-10 11:09:07 -07:00
hstern
4ab47e087e Refactor SkCurveMeasure to use existing eval code
- Use quad, cubic, conic eval code from SkGeometry.h
- Implement evaluateDerivativeLength, evaluateDerivative and evaluate switch cases for lines along with the refactor

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226973004

Review-Url: https://codereview.chromium.org/2226973004
2016-08-10 10:55:09 -07:00
halcanary
cb0f4c3404 SkGradientShader.cpp: fix build when SK_SUPPORT_GPU=0
NOTRY=true
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235863002

Review-Url: https://codereview.chromium.org/2235863002
2016-08-10 10:11:35 -07:00
csmartdalton
ceeaa78713 Fix SkDEBUGCODE to accept commas
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231663002

Review-Url: https://codereview.chromium.org/2231663002
2016-08-10 10:07:58 -07:00
fmenozzi
0c63006b88 Remove generalized gradient code
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223203003

Review-Url: https://codereview.chromium.org/2223203003
2016-08-10 08:57:24 -07:00
robertphillips
3f0e6945f8 Revert of Create blurred RRect mask on GPU (rather than uploading it) (patchset #5 id:80001 of https://codereview.chromium.org/2222083004/ )
Reason for revert:
No NoGPU bot on commit queue ?

Original issue's description:
> Create blurred RRect mask on GPU (rather than uploading it)
>
> This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)
>
> All blurred rrects using the "analytic" path will change slightly with this CL.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004
>
> Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
> Committed: https://skia.googlesource.com/skia/+/94b5c5a41160e0f55e267fc3d830df65736fac50

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2232953002
2016-08-10 08:40:35 -07:00
mtklein
3ff2cc81a5 constexpr NaN,+Inf,-Inf
Reading extern values meant these couldn't be compile-time constants.

math.h has INFINITY, which is macro that is supposed to expand to float +inf.
On MSVC it seems it's natively a double, so we cast just to make sure.

There's nan(const char*) in math.h for NaN too, but I don't trust that
to be compile-time evaluated.  So instead, we keep reinterpreting a bit pattern.

I did try to write

    static constexpr float float_nan() { ... }

and completely failed.  constexpr seems a bit too restrictive in C++11 to make
it work, but Clang kept telling me, you'll be able to do this with C++14.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233853002

Review-Url: https://codereview.chromium.org/2233853002
2016-08-10 08:31:42 -07:00
egdaniel
6e90d42d3d Check allignment of sub heap allocation in vulkan
Certain Vulkan devices will return difference alignment requirements for
a given allocation even if using the same heap. Thus we need to check
this alignment as well when deciding which subheap we want to use in our
memory allocation.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2232803003

Review-Url: https://codereview.chromium.org/2232803003
2016-08-10 08:29:53 -07:00
hstern
80ac591f99 Add time return argument to SkCurveMeasure's getPosTan, rename to getPosTanTime
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2229893002

Review-Url: https://codereview.chromium.org/2229893002
2016-08-10 07:45:31 -07:00
robertphillips
94b5c5a411 Create blurred RRect mask on GPU (rather than uploading it)
This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)

All blurred rrects using the "analytic" path will change slightly with this CL.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004

Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479
Review-Url: https://codereview.chromium.org/2222083004
2016-08-10 07:14:55 -07:00
halcanary
c5769b2e49 Revert of Change mapRectScaleTranslate to pass args/ret by value (patchset #2 id:20001 of https://codereview.chromium.org/2138943002/ )
Reason for revert:
Build-Ubuntu-GCC-Arm7-Release-Android fails.

Original issue's description:
> Change mapRectScaleTranslate to pass args/ret by value
>
> This reverts commit 6092b6e0e5.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2138943002
>
> Committed: https://skia.googlesource.com/skia/+/1bd13ca922d6448d595064faee486eaf3fa56e56

TBR=mtklein@google.com,msarett@google.com,reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2234843002
2016-08-10 07:13:21 -07:00
reed
d5b88a3dc5 remove support for serializing bitmaps in old format
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2230973002

Review-Url: https://codereview.chromium.org/2230973002
2016-08-10 06:37:43 -07:00
reed
1bd13ca922 Change mapRectScaleTranslate to pass args/ret by value
This reverts commit 6092b6e0e5.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2138943002

Review-Url: https://codereview.chromium.org/2138943002
2016-08-10 06:17:54 -07:00
robertphillips
69cfa9c28d Revert of Create blurred RRect mask on GPU (rather than uploading it) (patchset #4 id:60001 of https://codereview.chromium.org/2222083004/ )
Reason for revert:
Erg - dumb bug

Original issue's description:
> Create blurred RRect mask on GPU (rather than uploading it)
>
> This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)
>
> All blurred rrects using the "analytic" path will change slightly with this CL.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004
>
> Committed: https://skia.googlesource.com/skia/+/75ccdc77a70ec2083141bf9ba98eb2f01ece2479

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/2236493002
2016-08-10 06:15:33 -07:00
fmalita
c52310402c Prevent degenerate linear gradient instantiation
If the point distance exceeds SkScalar, nasty things tend to happen.

R=reed@google.com
BUG=636194
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234663002

Review-Url: https://codereview.chromium.org/2234663002
2016-08-10 05:45:50 -07:00
robertphillips
75ccdc77a7 Create blurred RRect mask on GPU (rather than uploading it)
This CL doesn't try to resolve any of the larger issues. It just moves the computation of the blurred RRect to the gpu and sets up to start using vertex attributes for a nine patch draw (i.e., returning the texture coordinates)

All blurred rrects using the "analytic" path will change slightly with this CL.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222083004

Review-Url: https://codereview.chromium.org/2222083004
2016-08-10 05:33:12 -07:00
halcanary
d0c38315e8 SkPDF: bikeshed: use auto less
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234623002

Review-Url: https://codereview.chromium.org/2234623002
2016-08-09 20:04:01 -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
mtklein
cd8864111d constexpr infinity
~/skia (inf) $ nm /tmp/rel/obj/src/core/libskia.SkLiteDL.o | grep GLOBAL__sub
<nothing>

TBR=halcanary@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2228203002

Review-Url: https://codereview.chromium.org/2228203002
2016-08-09 16:37:47 -07:00
mtklein
b20283357a allocate memory manually in SkLiteDL
Instead of growing at SkTDArray's chosen rate (+4, then *1.25),
grow in additive 4K pages.  This is my attempt to make realloc()
have the best chance of not copying and to keep fragmentation down.
Because we use a freelist the rate we grow doesn't affect performance
too much.

I'm not getting very reliable numbers, but this looks maybe 5-10% faster
for recording, mainly I think from inlining the allocation fast path into
push().

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231553002

Review-Url: https://codereview.chromium.org/2231553002
2016-08-09 15:13:18 -07:00
mtklein
baeec6d25e SkLiteDL: add some missing std::move()
This cuts a ref+unref roundtrip on all draw{Bitmap,Image}

I set this up originally and just... forgot.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234483002

Review-Url: https://codereview.chromium.org/2234483002
2016-08-09 15:09:39 -07:00
brianosman
5702c861c4 Restore scratch texture reuse on Adreno.
New testing shows that it's a win on our slowest SKPs, and pretty much a
wash on faster tests (mixed results). However, it also saves us ~3 ms on
the hwui bitmap upload jank test.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2227983003

Review-Url: https://codereview.chromium.org/2227983003
2016-08-09 14:02:13 -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
halcanary
8eccc308c8 SkPDF: SkPDFFont organization changes.
SkPDFFont:
  - SkPDFType1Font::populate() encode advances correctly.
  - break out logically independent code into new files:
    * SkPDFConvertType1FontStream
    * SkPDFMakeToUnicodeCmap
    SkPDFFont.cpp is now 380 lines smaller.
    Expose `SkPDFAppendCmapSections()` for testing.

SkPDFFontImpl.h
  - Fold into SkPDFFont.

SkPDFConvertType1FontStream:
  - Now assume given a SkStreamAsset

SkPDFFont:
  - AdvanceMetric now hidden in a anonymous namespace.

No public API changes.
TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221163002

Review-Url: https://codereview.chromium.org/2221163002
2016-08-09 13:04:34 -07:00
csmartdalton
9bc1187249 Include EXT_window_rectangles API
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221393004

Review-Url: https://codereview.chromium.org/2221393004
2016-08-09 12:42:47 -07:00
mtklein
b47cd4b3d6 Use SkNVRefCnt for a couple common types.
These types are ref-counted, but don't otherwise need a vtable.
This makes them good candidates for SkNVRefCnt.

Destruction can be a little more direct, and if nothing else,
sizeof(T) will get a little smaller by dropping the vptr.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2232433002

Review-Url: https://codereview.chromium.org/2232433002
2016-08-09 12:20:04 -07:00
mtklein
c0fc9d6356 SkLiteDL: tiny perf tweak
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2229003003

Review-Url: https://codereview.chromium.org/2229003003
2016-08-09 11:44:12 -07:00
mtklein
2ee6982d95 Sample app uses Ganesh before calling SkGraphics::Init().
This causes inconsistent hashing.  Before Init(), we use portable Murmur3,
after a faster SSE4.2-based hash.

To fix, call SkGraphics::Init() first.

BUG=skia:5625
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2229853002

Review-Url: https://codereview.chromium.org/2229853002
2016-08-09 10:13:28 -07:00
hstern
23d9776024 Move seg_to to a new header, define SkSegType enum there
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221203002

Review-Url: https://codereview.chromium.org/2221203002
2016-08-09 09:38:30 -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
fmenozzi
55d318d35f Refactor various gradient effect classes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221133002

Review-Url: https://codereview.chromium.org/2221133002
2016-08-09 08:05:58 -07:00
mtklein
0c753e5c26 Purge the SkLiteDL freelist when PurgeAllCaches() is called.
Seems like the polite thing to do.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2228953002

Review-Url: https://codereview.chromium.org/2228953002
2016-08-09 07:40:23 -07:00
mtklein
8369e32a05 SkLiteRecorder: don't tell SkCanvas about clips
If no one reads our clip, and we don't expect quickReject() to help,
we can probably get away without maintaining a proper clip stack.

This puts us at about 0.6-0.7x of previous record cost.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2227833004

Review-Url: https://codereview.chromium.org/2227833004
2016-08-09 07:19:02 -07:00
caryclark
643ede6921 template intersection fuzz fixes
Plumb in the ability to ignore asserts for out of range input
deeper into the template intersection code.

Exit gracefully when error conditions are found.

TBR=reed@google.com
BUG=632607,632628,633063,633065,634251,633608
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2224823004

Review-Url: https://codereview.chromium.org/2224823004
2016-08-08 14:27:45 -07:00
lsalzman
0adbd3e0a6 make SpecialLineRec::addSegment assert more permissive to accomodate rounding error
Because the driving code that calls SpecialLineRec::addSegment uses double precision,
when converted back to single precision this may round such that d0 and d1 are the same.
This causes the assert to trigger. The simplest thing to do here is to modify the assert
to not be so picky and allow the rare/occasional equality.

Downstream Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1290628

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2209303004

Review-Url: https://codereview.chromium.org/2209303004
2016-08-08 13:40:27 -07:00
hstern
0446a3c8e2 Add initial CurveMeasure code
- This code is entirely private and is not being used by anything.

- In a future CL we will write a class that uses CurveMeasure to compute dash points. In order to determine whether CurveMeasure or PathMeasure should be faster, we need the dash info (the sum of the on/off intervals and how many there are)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2187083002

Review-Url: https://codereview.chromium.org/2187083002
2016-08-08 12:28:13 -07:00
mtklein
765b6e6548 SkLiteDL: control reuse by a single parameter
This simply caps the number of times a display list can be reused.
As this number goes up, the average amount of memory we cache goes up
and the expected number of mallocs per SkLiteDL::New() goes down.

This strategy does not need a hard-coded cap on how many display lists
to cache, or how big they can grow.

TBR=herb@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226813002

Review-Url: https://codereview.chromium.org/2226813002
2016-08-08 12:23:02 -07:00
dvonbeck
84bca78ab4 Split distance vector into direction and magnitude components
The vector was split because the vector's users need it split, and we were creating it from the split components in the first place, so it made sense to skip that step.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223053002

Review-Url: https://codereview.chromium.org/2223053002
2016-08-08 11:47:12 -07:00
dvonbeck
f621ff49a2 Fixed comment about SkLightingShader::Context memory handling
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225093002

Review-Url: https://codereview.chromium.org/2225093002
2016-08-08 11:25:13 -07:00
halcanary
eba373ef0a SkTypeface_win_dw.cpp remove unused fn
TBR=bungeman@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226653003

Review-Url: https://codereview.chromium.org/2226653003
2016-08-08 11:09:33 -07:00
csmartdalton
77f2fae49e Encapsulate GrReducedClip result in class members
Updates GrReducedClip to store its result in class members instead of
various pointer arguments. This helps clean up calling code and will
make it easier to reduce the clip higher in the stack.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222873002

Review-Url: https://codereview.chromium.org/2222873002
2016-08-08 09:55:06 -07:00
halcanary
8b1d32c8d0 SkPDF/SkAdvancedTypefaceMetrics: simplify ATM, PDF takes over
No public API changes.
TBR=reed@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222523003

Review-Url: https://codereview.chromium.org/2222523003
2016-08-08 09:09:59 -07:00
mtklein
4e97607d9a Use sse4.2 CRC32 instructions to hash when available.
About 9x faster than Murmur3 for long inputs.

Most of this is a mechanical change from SkChecksum::Murmur3(...) to SkOpts::hash(...).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2208903002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;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/2208903002
2016-08-08 09:06:28 -07:00
reed
9a5a201472 use onPeekBitmap instead of asLegacyBitmap
Since we know we are raster-backed at this point, it is fine, plus it avoids the copy-mutable logic in asLegacyBitmap, which is not needed here (and is slower if our bitmap was built with kNever_SkCopyPixelsMode).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2223653002

Review-Url: https://codereview.chromium.org/2223653002
2016-08-08 09:00:29 -07:00
msarett
b9a10d8c75 Fix alpha bug in SkColorXform
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2221933002

Review-Url: https://codereview.chromium.org/2221933002
2016-08-08 08:13:09 -07:00
halcanary
9be372041e std::move(SkTDArray)
Since we don't support MSVC2013 anymore, we can be more
succinct when defining move constructors of compound types.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2227673002

Review-Url: https://codereview.chromium.org/2227673002
2016-08-08 07:21:42 -07:00
fmalita
5d2befe006 Avoid caching resources for volatile bitmap shaders
SkBitmapProvider::isVolatile() treats all SkImages as non-volatile,
which is not what we want for temp SkImage wrappers of volatile bitmaps.

R=reed@google.com
BUG=chromium:633941
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222783002

Review-Url: https://codereview.chromium.org/2222783002
2016-08-08 07:08:37 -07:00
mtklein
03591a762c finish SkLiteDL
- makeThreadsafe()
    - fix up some alignment problems
    - drawVertices / drawPatch
    - work around drawPicture() + default paint bugs?
    - turn on tests.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2219343002

Review-Url: https://codereview.chromium.org/2219343002
2016-08-07 13:35:47 -07:00
mtklein
29de8d938d SkLiteDL, very nearly the rest
fix saveLayer bounds
    all the misc calls
    a bit of refactoring

just drawVertices and drawPatch to go, plus some todos and likely bug fixes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226563002

Review-Url: https://codereview.chromium.org/2226563002
2016-08-07 11:35:08 -07:00
mtklein
ec559591ae SkLiteDL: closing in
- optimizeFor(GrContext*)
 - images
 - basic text

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2224753002

Review-Url: https://codereview.chromium.org/2224753002
2016-08-06 20:31:31 -07:00
mtklein
6f8411dfa4 flesh out more of SkLiteDL:
save layer, clips, simple draws

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226513002

Review-Url: https://codereview.chromium.org/2226513002
2016-08-06 15:28:11 -07:00
mtklein
9c5052f16b SkLite*
SkLiteRecorder, a new SkCanvas, fills out SkLiteDL, a new SkDrawable.

This SkDrawable is a display list similar to SkRecord and SkBigPicture / SkRecordedDrawable, but with a few new design points inspired by Android and slimming paint:

  1) SkLiteDL is structured as one big contiguous array rather than the two layer structure of SkRecord.  This trades away flexibility and large-op-count performance for better data locality for small to medium size pictures.

  2) We keep a global freelist of SkLiteDLs, both reusing the SkLiteDL struct itself and its contiguous byte array.  This keeps the expected number of mallocs per display list allocation <1 (really, ~0) for cyclical use cases.

These two together mean recording is faster.  Measuring against the code we use at head, SkLiteRecorder trends about ~3x faster across various size pictures, matching speed at 0 draws and beating the special-case 1-draw pictures we have today.  (I.e. we won't need those special case implementations anymore, because they're slower than this new generic code.)  This new strategy records 10 drawRects() in about the same time the old strategy took for 2.

This strategy stays the winner until at least 500 drawRect()s on my laptop, where I stopped checking.

A simpler alternative to freelisting is also possible (but not implemented here), where we allow the client to manually reset() an SkLiteDL for reuse when its refcnt is 1.  That's essentially what we're doing with the freelist, except tracking what's available for reuse globally instead of making the client do it.

This code is not fully capable yet, but most of the key design points are there.  The internal structure of SkLiteDL is the area I expect to be most volatile (anything involving Op), but its interface and the whole of SkLiteRecorder ought to be just about done.

You can run nanobench --match picture_overhead as a demo.  Everything it exercises is fully fleshed out, so what it tests is an apples-to-apples comparison as far as recording costs go.  I have not yet compared playback performance.

It should be simple to wrap this into an SkPicture subclass if we want.

I won't start proposing we replace anything old with anything new quite yet until I have more ducks in a row, but this does look pretty promising (similar to the SkRecord over old SkPicture change a couple years ago) and I'd like to land, experiment, iterate, especially with an eye toward Android.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2213333002

Review-Url: https://codereview.chromium.org/2213333002
2016-08-06 12:51:51 -07:00
csmartdalton
c6f411e72b Merge GrClipMaskManager into GrClipStackClip
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196393007

Review-Url: https://codereview.chromium.org/2196393007
2016-08-05 22:32:12 -07:00
reed
4c1abdcd21 use tmp allocator for images in temp shaders
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222593003

Review-Url: https://codereview.chromium.org/2222593003
2016-08-05 14:50:19 -07:00
halcanary
462d0148a5 SkPDF: Stop using kHAdvance_PerGlyphInfo
SkPDFFont:
- never request kHAdvance_PerGlyphInfo from typeface.
- set_glyph_widths() fn uses a glyph cache to get advances.
- stop expecting vertical advances that are never requested.
- composeAdvanceData() now non-templated
- appendAdvance() one-line function removed

SkPDFDevice:
- use a glyph cache for getting repeated advances.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2219733004

Review-Url: https://codereview.chromium.org/2219733004
2016-08-05 13:51:46 -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
reed
f77c47b782 use SkMakeBitmapShader to not force copies when possible
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2216403002

Review-Url: https://codereview.chromium.org/2216403002
2016-08-05 10:15:00 -07:00
robertphillips
29f9fe45ef Rename GrDrawingManager::drawContext to makeDrawContext
This was violating our naming convention

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2216643002

Review-Url: https://codereview.chromium.org/2216643002
2016-08-05 09:28:20 -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
bungeman
feb3c1a57f Move to SkDataTable::MakeXXX and sk_sp.
Change SkDataTable::NewXXX to SkDataTable::MakeXXX and return sk_sp.
This updates users of SkDataTable to sk_sp as well.
There do not appear to be any external users of these methods.

Review-Url: https://codereview.chromium.org/2211143002
2016-08-05 06:51:50 -07:00
egdaniel
4c35a3f905 Fix vulkan resolve
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2215353003

Review-Url: https://codereview.chromium.org/2215353003
2016-08-05 06:35:39 -07:00
reed
ac09554dce check zero-length text draws
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2215113002

TBR=

Review-Url: https://codereview.chromium.org/2215113002
2016-08-04 15:54:41 -07:00
csmartdalton
3b88a03e98 Remove color-dodge/burn from NVIDIA blacklist on 355.00+
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212593002

Review-Url: https://codereview.chromium.org/2212593002
2016-08-04 14:43:50 -07:00
egdaniel
52ad25151a Implement Vulkan Resolve.
First step to getting msaa running on vulkan

BUG=skia:5127
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2210383002

Review-Url: https://codereview.chromium.org/2210383002
2016-08-04 12:50:01 -07:00
jvanverth
1ba1d372c2 Get Mac viewer working with SDL
Also fixes SkiaSDLExample.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2210603003

Review-Url: https://codereview.chromium.org/2210603003
2016-08-04 12:30:31 -07:00
dvonbeck
1b9e2fb494 This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151653002

Review-Url: https://codereview.chromium.org/2151653002
2016-08-04 12:27:26 -07:00
msarett
b8d1aac87a Create a separate src for colorspace tests
This will allow me to run these tests in sRGB mode, while
leaving most of the image tests disabled.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206953006

Review-Url: https://codereview.chromium.org/2206953006
2016-08-04 12:22:06 -07:00
halcanary
4e44efe504 SkRTConf: eliminate
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212473002
DOCS_PREVIEW= https://skia.org/?cl=2212473002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

[mtklein]
TBR=reed@google.com
Only removing unused public API.

Review-Url: https://codereview.chromium.org/2212473002
2016-08-04 10:47:16 -07:00
robertphillips
15c42ca310 Remove SkSurface::MakeRenderTargetDirect
split into:
https://codereview.chromium.org/2182543003/ (Move prepareForExternalIO from GrRenderTarget to GrDrawContext)
https://codereview.chromium.org/2187573002/ (Reduce usage of MakeRenderTargetDirect)
https://codereview.chromium.org/2186073002/ (Rename GrContext's newDrawContext & drawContext to makeDrawContext)
https://codereview.chromium.org/2178353005/ (Remove use of MakeRenderTargetDirect from view system)
https://codereview.chromium.org/2198433003/ (Remove some ancillary users of SkSurface::MakeRenderTargetDirect)
https://codereview.chromium.org/2208483004/ (Remove GrRenderTarget member variable from SkGpuDevice)
https://codereview.chromium.org/2211473002/ (Move GrContext::makeDrawContext to new GrContextPriv object)

TBR=bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2176333002

Review-Url: https://codereview.chromium.org/2176333002
2016-08-04 08:45:02 -07:00
robertphillips
714712bfc9 Remove GrRenderTarget member variable from SkGpuDevice
Split out of: https://codereview.chromium.org/2176333002/ (Remove SkSurface::MakeRenderTargetDirect)

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2208483004

Review-Url: https://codereview.chromium.org/2208483004
2016-08-04 06:20:45 -07:00
mtklein
b979634012 Revert of SkRTConf: reduce functionality to what we use, increase simplicity (patchset #8 id:150001 of https://codereview.chromium.org/2212473002/ )
Reason for revert:
missed GrVkPipelineStateCache

Original issue's description:
> SkRTConf: reduce functionality to what we use, increase simplicity
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212473002
> DOCS_PREVIEW= https://skia.org/?cl=2212473002
> CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
>
> [mtklein]
> TBR=reed@google.com
> Only removing unused public API.
>
> Committed: https://skia.googlesource.com/skia/+/ef59974708dade6fa72fb0218d4f8a9590175c47

TBR=halcanary@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/2215433003
2016-08-03 19:19:48 -07:00
msarett
a5c357f2d4 Fix compiler complaints about uninit vars
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206143003

Review-Url: https://codereview.chromium.org/2206143003
2016-08-03 15:46:33 -07:00
halcanary
ef59974708 SkRTConf: reduce functionality to what we use, increase simplicity
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2212473002
DOCS_PREVIEW= https://skia.org/?cl=2212473002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

[mtklein]
TBR=reed@google.com
Only removing unused public API.

Review-Url: https://codereview.chromium.org/2212473002
2016-08-03 15:30:37 -07:00
robertphillips
4fd74aec9f Move GrContext::makeDrawContext to new GrContextPriv object
We don't want external clients to be able to call the wrapping makeDrawContext. The "creating" makeDrawContext needs to be public for external image filters.

The 3 specialized drawContext creators on GrContextPriv (to wrap backend objects) are also to be kept from public use and will be used to remove SkSurface::MakeRenderTargetDirect.

Split out of: https://codereview.chromium.org/2176333002/ (Remove SkSurface::MakeRenderTargetDirect)

TBR=bsalomon@google.com

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2211473002

Review-Url: https://codereview.chromium.org/2211473002
2016-08-03 14:26:53 -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
msarett
d1ec89b1ac Perform color correction on png decodes
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2184543003
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/2184543003
2016-08-03 12:59:27 -07:00
ethannicholas
f789b38935 added initial GLSL support to skslc
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2185393003

Review-Url: https://codereview.chromium.org/2185393003
2016-08-03 12:43:36 -07:00
halcanary
dabd4f0b79 SkPDF: PDFShader code modernized.
Motivation:  reduce code complexity.

SkCanon stores SkPDFShader::State next to SkDFObject, not inside.

many places use sk_sp<T> rather than T* to represent ownership.

SkPDFShader::State no longer holds bitmap.

SkPDFShader::State gets move constructor, no longer heap-allocated.

Classes removed:
  SkPDFFunctionShader
  SkPDFAlphaFunctionShader
  SkPDFImageShader

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193973002

Review-Url: https://codereview.chromium.org/2193973002
2016-08-03 11:16:57 -07:00
msarett
96206a96f3 Finish delete of SkNinePatch
TBR=djsollen@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206333002

Review-Url: https://codereview.chromium.org/2206333002
2016-08-03 11:04:01 -07:00
deanm
bb75a951f3 Don't leave fResScale uninitialized when constructing an SkStroke.
Set a default value of 1.  Users can set it with setResScale, but it's better
that the constructor doesn't just leave the field uninitialized otherwise.

R=reed@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2207753003

Review-Url: https://codereview.chromium.org/2207753003
2016-08-03 07:21:04 -07:00
msarett
552bca9afa Fix copy-paste bugs in SkCanvas Nine and Lattice
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2203983002

Review-Url: https://codereview.chromium.org/2203983002
2016-08-03 06:53:26 -07:00
dvonbeck
9d65bb4795 Fixed ambient lighting calculations on SkLightingShader
BUG=skia:5520
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202233003

Review-Url: https://codereview.chromium.org/2202233003
2016-08-02 14:46:34 -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
msarett
a25f470bc7 Delete SkNinePatch
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2206663002

Review-Url: https://codereview.chromium.org/2206663002
2016-08-02 13:55:10 -07:00
mtklein
091cb8d72d Delete SkARGBImageEncoder.
It appears to be unused now except by its unit test, also deleted.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2208433002

No public API changes.
TBR=reed@google.com

Review-Url: https://codereview.chromium.org/2208433002
2016-08-02 12:57:33 -07:00
msarett
15ee3deee8 Refactor of SkColorSpaceXformOpts
(1) Performance is better or stays the same.

(2) Code is split into functions (RasterPipeline-ish
    design).  IMO, it's not really more or less readable.
    But I think it's now much easier add capabilities,
    apply optimizations, or do more refactors.  Or to
    actually use RasterPipeline.  I help back from trying
    any of these to try to keep this CL sane.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194303002
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/2194303002
2016-08-02 11:30:30 -07:00
bungeman
b605f89398 Remove now unused source files.
These files have been renamed and exist only as stubs for transition
reasons. Remove these now unused stubs.

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/2197423003
2016-08-02 11:18:48 -07:00
hstern
0b401ce663 Add code to lua paths to get the fill path and get lists of verbs and
points

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199823002

Review-Url: https://codereview.chromium.org/2199823002
2016-08-02 09:17:59 -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
bungeman
7d0e3bc785 Rename FontConfigInterface font manager files.
These files are now so badly misnamed that it is causing problems.
The original files are kept as shells until Chromium and PDFium can
be updated. After Chromium and PDFium builds are updated, the old
files will be removed and the cmake and bzl builds will be updated.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199973002
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/2199973002
2016-08-02 07:07:33 -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
msarett
6fd4c05aaf Fix SkJpegCodec::onSkipScanlines when TURBO_HAS_SKIP is not defined
I think I just broke this in:
https://codereview.chromium.org/2174493002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202763002

Review-Url: https://codereview.chromium.org/2202763002
2016-08-01 15:08:03 -07:00
msarett
c213f0df22 Hide (mostly) unused SkColorSpace writeToICC() function
This originally was intended to be used for serialization, but
we've chosen another approach.

Includes a revert of:
https://codereview.chromium.org/2012133003/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193223002

Review-Url: https://codereview.chromium.org/2193223002
2016-08-01 14:23:32 -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
dvonbeck
68f2f7dc42 Added distance vector support for CircleGeometryProcessor
This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190023002

Committed: https://skia.googlesource.com/skia/+/779e1924eaf7c5652dee93e0e8e975bbf5723b37
Review-Url: https://codereview.chromium.org/2190023002
2016-08-01 11:37:45 -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
reed
2dad769dc9 make an image from a mutable bitmap
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2199813002

Review-Url: https://codereview.chromium.org/2199813002
2016-08-01 11:12:58 -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
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
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
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
mtklein
7c0db75f40 Revert of Tidy up SkNx_neon. (patchset #3 id:40001 of https://codereview.chromium.org/2196773002/ )
Reason for revert:
https://luci-milo.appspot.com/swarming/task/3055149a25621b10

Not Nexus 5 specific.   Reproduces on Pixel C with --gcc -t Debug -d arm_v7_neon.  Not sure about other configs yet.

Original issue's description:
> Tidy up SkNx_neon.
>
> This takes advantage of the fact that all the compilers we use that
> support NEON implement it with their own vector extensions.  This means
> normal things like c = a + b work on the underlying vector types already.
> Odd instructions like min or saturated add need to stay intrinsics.
>
> Also, rearrange functions to a more consistent order.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196773002
> 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/+/6ad22315eb6eacfcd35497cd118440a619d05b18

TBR=msarett@google.com,mtklein@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:

Review-Url: https://codereview.chromium.org/2196953002
2016-07-30 14:18:49 -07:00
mtklein
570f8af473 Revert of Added distance vector support for CircleGeometryProcessor (patchset #4 id:60001 of https://codereview.chromium.org/2190023002/ )
Reason for revert:
Reverting so I can revert https://codereview.chromium.org/2114993002/

Original issue's description:
> Added distance vector support for CircleGeometryProcessor
>
> This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190023002
>
> Committed: https://skia.googlesource.com/skia/+/779e1924eaf7c5652dee93e0e8e975bbf5723b37

TBR=egdaniel@google.com,robertphillips@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/2196053002
2016-07-30 13:31:53 -07:00
mtklein
fe2042e60f SkRasterPipeline: new APIs for fusion
Most visibly this adds a macro SK_RASTER_STAGE that cuts down on the boilerplate of defining a raster pipeline stage function.

Most interestingly, SK_RASTER_STAGE doesn't define a SkRasterPipeline::Fn, but rather a new type EasyFn.  This function is always static and inlined, and the details of interacting with the SkRasterPipeline::Stage are taken care of for you: ctx is just passed as a void*, and st->next() is always called.  All EasyFns have to do is take care of the meat of the work: update r,g,b, etc. and read and write from their context.

The really neat new feature here is that you can either add EasyFns to a pipeline with the new append() functions, _or_ call them directly yourself.  This lets you use the same set of pieces to build either a pipelined version of the function or a custom, fused version.  The bench shows this off.

On my desktop, the pipeline version of the bench takes about 25% more time to run than the fused one.

The old approach to creating stages still works fine.  I haven't updated SkXfermode.cpp or SkArithmeticMode.cpp because they seemed just as clear using Fn directly as they would have using EasyFn.

If this looks okay to you I will rework the comments in SkRasterPipeline to explain SK_RASTER_STAGE and EasyFn a bit as I've done here in the CL description.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195853002

Review-Url: https://codereview.chromium.org/2195853002
2016-07-29 14:27:41 -07:00
mtklein
79b59e6a38 simplify neon shifts
These still generate vshr/vshl with immediates with both GCC and Clang.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194953002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Based on https://codereview.chromium.org/2196773002

Review-Url: https://codereview.chromium.org/2194953002
2016-07-29 12:28:44 -07:00
bsalomon
6d9a213694 If scissor would be empty in GrClipMaskManager::SetupClipping indicate draw can be skipped.
BUG=chromium:632185
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196803002

Review-Url: https://codereview.chromium.org/2196803002
2016-07-29 12:24:29 -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
egdaniel
848904e5b3 Fix vulkan build
TBR=bsalomon@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193883002

Review-Url: https://codereview.chromium.org/2193883002
2016-07-29 11:47:58 -07:00
dvonbeck
779e1924ea Added distance vector support for CircleGeometryProcessor
This CL's base is the CL that sets up the distance vector field req. exposure: https://codereview.chromium.org/2114993002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190023002

Review-Url: https://codereview.chromium.org/2190023002
2016-07-29 11:11:51 -07:00
mtklein
6ad22315eb Tidy up SkNx_neon.
This takes advantage of the fact that all the compilers we use that
support NEON implement it with their own vector extensions.  This means
normal things like c = a + b work on the underlying vector types already.
Odd instructions like min or saturated add need to stay intrinsics.

Also, rearrange functions to a more consistent order.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2196773002
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/2196773002
2016-07-29 11:11:12 -07:00
egdaniel
31bc7df59b Properly recycle uniform buffers in vulkan
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2195713002

Review-Url: https://codereview.chromium.org/2195713002
2016-07-29 10:46:06 -07:00
halcanary
fa25106f02 SkPDF: PDFStream has-a not is-a PDFDict
Motivation:
SkPDFStream and SkPDFSharedStream now work the same.

Also:
- move SkPDFStream into SkPDFTypes (it's a fundamental PDF type).
- minor refactor of SkPDFSharedStream
- SkPDFSharedStream takes unique_ptr to represent ownership

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2190883003

Review-Url: https://codereview.chromium.org/2190883003
2016-07-29 10:13:18 -07:00
mtklein
d05a875273 SkNx: add Sk4u
This lets us get at logical >> in a nicely principled way.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197683002
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/2197683002
2016-07-29 10:10:15 -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
msarett
a714bc3929 Fix various SkColorSpace bugs
(1) Fixes serialization/deserialization of wacky SkColorSpaces
(2) Fix gamma equals checking

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194903002

Review-Url: https://codereview.chromium.org/2194903002
2016-07-29 08:58:33 -07:00
egdaniel
00db3fd7a7 Use HashSet instead of Dynamic hash for tracking vulkan resources
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2194823003

Review-Url: https://codereview.chromium.org/2194823003
2016-07-29 08:55:53 -07:00
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
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
mtklein
4e90e3eb5e Have SkRasterPipelineBlitter take over for F16 when it can.
3 minor diffs to a couple GMs from fixed transfermodes (arithmetic and plus).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2181033002

Review-Url: https://codereview.chromium.org/2181033002
2016-07-25 14:35:31 -07:00
reed
bd2bd5c56d lock special-raster while the caller's bitmap is in-scope
previous CL that removed the specialimage subclass that wrapped the original image: https://codereview.chromium.org/2164073004

BUG=skia:5574
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183483003

Review-Url: https://codereview.chromium.org/2183483003
2016-07-25 14:26:02 -07:00
halcanary
56586b6f3d SkPDF: re-work SkPDFUtils::FloatToDecimal
* do a lot less floating-point math by converting to
    an integer as early as possible [faster].
  * round rather than truncate.
  * use 8 significant digits rather than 9 when possible.
  * remove trailing zeros in fractions.

before:
      0.12 !    PDFScalar   nonrendering
after:
      0.07 !    PDFScalar   nonrendering

Accuracy guaranteed by existing unit test.

Example diffs:

    -/Shading <</Function <</C0 [.321568638 .333333343 .321568638]
    +/Shading <</Function <</C0 [.32156864 .33333334 .32156864]

    -/C1 [.258823543 .270588248 .258823543]
    +/C1 [.25882354 .27058825 .25882354]

    -1 0 0 -1 20 120.394500 Tm
    +1 0 0 -1 20 120.394501 Tm

    -1 0 0 -1 20 184.789001 Tm
    +1 0 0 -1 20 184.789 Tm

    -291.503997 0 l
    +291.504 0 l

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2146103004

Review-Url: https://codereview.chromium.org/2146103004
2016-07-25 13:59:30 -07:00
mtklein
1ab9e59da0 Google3 <functional> has a global "using std::plus"...
... so we can't use the name plus().  -_-

TBR=tomhudson@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2183453003

Review-Url: https://codereview.chromium.org/2183453003
2016-07-25 13:24:09 -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
mtklein
64665440ef stages for most xfermodes
also assumes the clamp from https://codereview.chromium.org/2178793002/ is present

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2177103002

Review-Url: https://codereview.chromium.org/2177103002
2016-07-25 11:00:47 -07:00
ethannicholas
d598f7981f SkSL performance improvements (plus a couple of minor warning fixes)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131223002

Committed: https://skia.googlesource.com/skia/+/9fd67a1f53809f5eff1210dd107241b450c48acc
Review-Url: https://codereview.chromium.org/2131223002
2016-07-25 10:08:54 -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
mtklein
b5acf6e702 Add a clamp stage to SkRasterPipelineBlitter.
This clamps to [0,1] premul just before every store to memory.

By making the clamp a stage itself, this design makes it easy to move the clamp
around, to replace it with a debug-only assert-we're-clamped stage for certain
formats, clamp in more places, programatically not clamp, etc. etc.

Before this change, clamping was a little haphazard: store_srgb clamped
R, G and B to [0,1], but not A, and didn't clamp the colors to A.  565
didn't clamp at all.

6 GMs draw subtly differently in sRGB, I think because we've started clamping
colors to alpha to enforce premultiplication better.  No changes for 565.

My hope is that now no other stage need ever concern itself with clamping.

So we don't double-clamp, I've added a _noclamp version of sk_linear_to_srgb()
that simply asserts a clamp isn't necessary.  This happens to expose the Sk4f
_needs_trunc version that might be useful for power users (*cough* Matt *cough*).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2178793002

Review-Url: https://codereview.chromium.org/2178793002
2016-07-25 06:13:47 -07:00
caryclark
8bc90e2db6 fix fuzz
Extreme inputs trigger asserts intended for in range data.
Return an error without asserting unless the test signals
otherwise.

TBR=reed@google.com
BUG=630736
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2178923002

Review-Url: https://codereview.chromium.org/2178923002
2016-07-25 06:05:08 -07:00
mtklein
05e3c39d93 Arithmetic xfermode stage.
565 is identical, and as usual the old sRGB path was broken.  :)
It was unimplemented, so the default missing Sk4f implementation was mimicking Src.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175133002

Review-Url: https://codereview.chromium.org/2175133002
2016-07-25 05:56:16 -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
bsalomon
057ae8a15d Fix misdetection of rectangles in SkPath::IsSimpleClosedRect.
BUG=chromium:630369
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2175923002

Review-Url: https://codereview.chromium.org/2175923002
2016-07-24 05:37:26 -07:00
egdaniel
0e72e9ee3b Remove asserts on scissor size in Vulkan
These are asserts are firing from a recent change to our scissor code.
Since these asserts were added, the Vulkan spec has been updated to no
longer require the scissor is insides the bounds of the image, just that
x + width does not overflow.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2171283004

Review-Url: https://codereview.chromium.org/2171283004
2016-07-22 14:41:30 -07:00
mtklein
8e4373f40b Have SkRasterPipelineBlitter take over for 565 when it can.
This is an experiment / demo to have our 565 backend fold into
SkRasterPipelineBlitter as it grows more powerful.  I plan to follow up with
the same for the other 8888 format.

Blur mask filters look significantly different (better) after this change.
We keep the full 13-14-13 bits of precision for mask blits, where the old code
uses 11-11-10 bit intermediates.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2172343002

Review-Url: https://codereview.chromium.org/2172343002
2016-07-22 14:20:28 -07:00
msarett
554479527c Convert XYZ values from PNGs to D50
Previously, we were storing whatever values we got out of the file
and pretending they were D50.  Brian has demonstrated that this
doesn't really work.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2180483003

Review-Url: https://codereview.chromium.org/2180483003
2016-07-22 14:07:23 -07:00
herb
86a6c6d8bd In the current code, tiling and bilerp sampling are strongly tied together. They can be separated by taking advantage of observation that translating a sample point into filter points in the bilerp stage the filter points will be at most 0.5 outside the tile. This allows simplified repositioning for the various tiling modes; clamp and mirror use min and max while repeat has max -> 0 and 0-> max. This allows bilerp to simply treat the filter points that fall off the tile. This allows tiling and bilerp sampling to be totally separate.
This CL has several parts that are intertwined:
* move pin/wrap functionality into BilerpSampler.
* remove the nearest neighbor and bilerp tilers
* create a simplified general tiler
* remove the pipeline virtual calls bilerpEdge and bilerpSpan because everything works of sample points now.
* redo all the bilerp sampling to use the new local to methods to wrap/pin.
* introduce a new medium rate sample that handles spans with 1 < |dx| < 2.

This change improves the performance as displayed below:
Most of top 25 desktop improves or are the same. A few are worse, but close to the noise floor. In addition, this change has about 3% smaller code.

old time     new time   new/old
13274693  8414645  0.633886  top25desk_google_com_search_q_c.skp_1
4946466   3258018  0.658656  top25desk_wordpress.skp_1
6977187   5737584  0.822335  top25desk_youtube_com.skp_1
3770021   3296831  0.874486  top25desk_google_com__hl_en_q_b.skp_1
8890813   8600143  0.967307  top25desk_answers_yahoo_com.skp_1
3178974   3094300  0.973364  top25desk_facebook.skp_1
8871835   8711260  0.981901  top25desk_twitter.skp_1
838509    829290   0.989005  top25desk_blogger.skp_1
2821870   2801111  0.992644  top25desk_plus_google_com_11003.skp_1
511978    509530   0.995219  top25desk_techcrunch_com.skp_1
2408588   2397435  0.995369  top25desk_ebay_com.skp_1
4446919   4448004  1.00024   top25desk_espn.skp_1
2863241   2875696  1.00435   top25desk_google_com_calendar_.skp_1
7170086   7208447  1.00535   top25desk_booking_com.skp_1
7356109   7417776  1.00838   top25desk_pinterest.skp_1
5265591   5340392  1.01421   top25desk_weather_com.skp_1
5675244   5774144  1.01743   top25desk_sports_yahoo_com_.skp_1
1048531   1067663  1.01825   top25desk_games_yahoo_com.skp_1
2075501   2115131  1.01909   top25desk_amazon_com.skp_1
4262170   4370441  1.0254    top25desk_news_yahoo_com.skp_1
3789319   3897996  1.02868   top25desk_docs___1_open_documen.skp_1
919336    949979   1.03333   top25desk_wikipedia__1_tab_.skp_1
4274454   4489369  1.05028   top25desk_mail_google_com_mail_.skp_1
4149326   4376556  1.05476   top25desk_linkedin.skp_1

BUG=skia:5566
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2134893002
CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Committed: https://skia.googlesource.com/skia/+/8602ede5fdfa721dcad4dcb11db028c1c24265f1
Review-Url: https://codereview.chromium.org/2134893002
2016-07-22 14:06:27 -07:00
bungeman
f149169352 Correct advances for 'monospace' fonts in PDF.
FT_IS_FIXED_WIDTH, kCTFontMonoSpaceTrait, and TMPF_FIXED_PITCH
are style bits, they do not imply that all advances are the same.

BUG=skia:5537
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2162023002

Review-Url: https://codereview.chromium.org/2162023002
2016-07-22 11:19:24 -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
caryclark
8a8accbcd1 limit number of searched roots
Extreme numbers can generate more than
three found cubic roots when the roots
are found through a binary search.

Fail in this case.

TBR=reed@google.com
BUG=630649
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2176733002

Review-Url: https://codereview.chromium.org/2176733002
2016-07-22 10:56:26 -07:00
jvanverth
4c6e47a8a8 Recycle small uniform buffers.
BUG=skia:5031
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2159333002

Review-Url: https://codereview.chromium.org/2159333002
2016-07-22 10:34:52 -07:00
brianosman
500bb3e3e4 Connect dst color space in a few places (removing TODOs)
There is one more XFORMTODO left, but it requires more plumbing.
With this change, certain drawing paths do gamut conversion with
no special hacking required.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2174843002

Review-Url: https://codereview.chromium.org/2174843002
2016-07-22 10:33:07 -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