Commit Graph

3869 Commits

Author SHA1 Message Date
bsalomon
6cb807bf99 Simplify adding attributes to GrGeometryProcessor
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248323003

Review-Url: https://codereview.chromium.org/2248323003
2016-08-17 11:33:39 -07:00
csmartdalton
28341fad84 Implement difference clip rects with window rectangles
Plumbs the pipeline for window rectangles and uses them for a very
basic implementation of difference clip rects. This puts a common
Blink pattern on fast path, but we will still eventually need to make
more comprehensive use of window rectangles during clipping.

GTX 960 perf result:
                              gpu                     glinst4                 glinst16
desk_jsfiddlebigcar.skp       0.254 -> 0.177 [70%]    0.279 -> 0.197 [71%]    0.577 -> 0.196 [34%]
keymobi_sfgate_com_.skp       0.697 -> 0.513 [74%]    0.766 -> 0.451 [59%]    0.769 -> 0.597 [78%]
keymobi_blogger.skp           0.406 -> 0.314 [77%]    0.436 -> 0.292 [67%]    0.696 -> 0.319 [46%]
desk_pokemonwiki.skp          0.121 -> 0.098 [81%]     0.13 -> 0.105 [81%]    0.216 -> 0.097 [45%]
desk_wikipedia.skp            0.121 -> 0.098 [81%]     0.13 -> 0.104 [80%]    0.199 -> 0.104 [52%]
keymobi_androidpolice_co...   0.443 -> 0.382 [86%]    0.447 -> 0.398 [89%]    0.444 -> 0.396 [89%]
keymobi_booking_com_sear...   1 .15 ->  1.03 [90%]     1.17 ->  1.06 [91%]     1.17 ->  1.05 [90%]
keymobi_theverge_com.skp      0.417 -> 0.396 [95%]    0.426 -> 0.405 [95%]    0.429 ->   0.4 [93%]

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

Review-Url: https://codereview.chromium.org/2251573002
2016-08-17 10:00:22 -07:00
csmartdalton
8d3f92a92b Make GrReducedClip's gen ID only apply to the element list
Renames fGenID to fElementsGenID and designates this value as
undefined when when the element list is empty.

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

Review-Url: https://codereview.chromium.org/2244223004
2016-08-17 09:39:38 -07:00
msarett
549ca329cf Modify SkPngCodec to recognize 565 images from the sBIT chunk
Conveniently, SkPngImageEncoder already writes the sBIT chunk
appropriately.

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

Review-Url: https://codereview.chromium.org/2212563003
2016-08-17 08:54:08 -07:00
reed
ff863bc550 move private test for sect_with_horizontal into unittests
BUG=638575
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250353004

Review-Url: https://codereview.chromium.org/2250353004
2016-08-17 07:37:57 -07:00
caryclark
8ccc075a90 fix fuzz
TBR=reed@google.com
BUG=638496
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250413002

Review-Url: https://codereview.chromium.org/2250413002
2016-08-17 06:14:06 -07:00
caryclark
a1b42d91a5 fix fuzz bug
TBR=reed@google.com
BUG=637968, 638002
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250573003

Review-Url: https://codereview.chromium.org/2250573003
2016-08-16 10:25:29 -07:00
mtklein
883c8efae7 SkLiteDL: remove freelisting, add reset() and SKLITEDL_PAGE knob.
We think Android can cache these better than a global freelist allows.
This removes the freelisting but adds reset() to allow reuse.

I took the opportunity to abstract 4096 as a define SKLITEDL_PAGE.

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

Review-Url: https://codereview.chromium.org/2248693004
2016-08-16 09:36:18 -07:00
robertphillips
c4d2f90731 Update ComputeBlurredRRectParams to compute all the parameters needed for occluded blurred rrect ninepatch draws
This is 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=2248533002

Review-Url: https://codereview.chromium.org/2248533002
2016-08-16 09:30:03 -07:00
msarett
c5064d9c3d Revert of Add regression test (patchset #2 id:20001 of https://codereview.chromium.org/2243143002/ )
Reason for revert:
Nexus 9 and Nexus Player failures.

Original issue's description:
> Add regression test
>
> Original bug fix was in:
> https://codereview.chromium.org/2230163002
>
> BUG:636268
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243143002
>
> Committed: https://skia.googlesource.com/skia/+/bcae9d3d15d34a59d279c34e187e6101975500c0

TBR=reed@google.com,gogil@stealien.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/2243403003
2016-08-16 04:54:19 -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
msarett
bcae9d3d15 Add regression test
Original bug fix was in:
https://codereview.chromium.org/2230163002

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

Review-Url: https://codereview.chromium.org/2243143002
2016-08-15 09:42:00 -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
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
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
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
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
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
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
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
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
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
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
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
e9d55c57a6 Revert of Store mipmap levels in deferred texture image (patchset #11 id:200001 of https://codereview.chromium.org/2115023002/ )
Reason for revert:
speculative revert: android dm crashes

Original issue's description:
> Store mipmap levels in deferred texture image
>
> This is a follow-up to https://codereview.chromium.org/2034933003/ which
> was reverted due to a memory leak.
>
> When creating the deferred texture image, detect if using medium / high
> quality. If so, generate and store mipmaps in the deferred texture
> image.
>
> When creating a texture from that be sure to read it back out.
>
> BUG=578304
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2115023002
>
> Committed: https://skia.googlesource.com/skia/+/d6113140f7ae8996f679ac6698a60fb8c1386da3

TBR=brianosman@google.com,bsalomon@google.com,ericrk@chromium.org,cblume@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=578304

Review-Url: https://codereview.chromium.org/2227323002
2016-08-09 17:46:25 -07:00
cblume
d6113140f7 Store mipmap levels in deferred texture image
This is a follow-up to https://codereview.chromium.org/2034933003/ which
was reverted due to a memory leak.

When creating the deferred texture image, detect if using medium / high
quality. If so, generate and store mipmaps in the deferred texture
image.

When creating a texture from that be sure to read it back out.

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

Review-Url: https://codereview.chromium.org/2115023002
2016-08-09 13:45:56 -07:00
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
caryclark
d5b9173fe8 add flaky test option
One fuzzer generated pathops test
fails everywhere except for one
builder. Add a flaky state to the
pathops test framework to handle
this until I can investigate
further.

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

Review-Url: https://codereview.chromium.org/2221153005
2016-08-09 05:04:29 -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
mtklein
9dcdc352c1 add missing include
CQ_INCLUDE_TRYBOTS=master.client.skia:Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot

Review-Url: https://codereview.chromium.org/2226783002
2016-08-08 12:54:08 -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
mtklein
af06420cc1 Test sk_linear_to_srgb() less exhaustively in Debug mode.
It's pretty slow when not optimized... it can take ~5 minutes to run.
This makes it take ~2 seconds on my laptop.

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

Review-Url: https://codereview.chromium.org/2221803002
2016-08-08 05:52:55 -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
ae2964452b update Image_MakeFromRasterBitmap to check uniqueIDs
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2218223002

Review-Url: https://codereview.chromium.org/2218223002
2016-08-05 13:19:01 -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
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
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
mtklein
7a1f45f9e5 spin off easy stuff from Herb's windows GN CL
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2209533004

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

Review-Url: https://codereview.chromium.org/2209533004
2016-08-04 06:19:33 -07:00
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
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