Commit Graph

682 Commits

Author SHA1 Message Date
Brian Osman
69fd008199 Added SkJSONWriter
This is a stand-alone helper class for writing properly
structured JSON to an SkWStream. It currently solves two
problems (although this CL only uses it in one context):

1) Performance. Writing out JSON this way is about 10x
faster than using JSONCPP. For the large amounts of data
generated by the tracing system, that's a big win.

2) Makes it easy to emit structured JSON from code that's
not fully centralized. We'd like to spit out JSON that
describes a GrContext, GrGpu, GrCaps, etc... Doing that
with simple string manipulation is complex, and spreads
this logic over all those functions. Using JSONCPP adds
yet another (large) third party library dependency (that
we only build into our own tools right now).

This went through several revisions. I originally planned
it as a stateful SkString wrapper, so the user could just
build their JSON as a string. That's O(N^2), though,
because SkString grows by a (small) constant amount. Even
using a better growth strategy still means needing RAM
for all the resulting text, which is usually pointless.
This version has a constant memory cost, so writing huge
amounts of JSON to disk (tracing a long DM run can emit
100's of MBs) doesn't stress resources.

Bug: skia:
Change-Id: Ia716524b246db0f97d332da60d2ce9903069e748
Reviewed-on: https://skia-review.googlesource.com/31204
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-08-09 13:46:24 +00:00
Robert Phillips
65a88fadab Add GrDebugMarkerOp
Change-Id: I948838dea13d2f36194ca1043ab37e72759794e0
Reviewed-on: https://skia-review.googlesource.com/31740
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-08 13:23:20 +00:00
Mike Reed
bdc3afa577 simplify gm matrices
rm gm that appears to have been there solely for pdf, but we don't use
it for that now.

Bug: skia:
Change-Id: I3cf88db923c2445b7c95dda14da679a594117643
Reviewed-on: https://skia-review.googlesource.com/31760
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-08 12:43:19 +00:00
Robert Phillips
6dd8cf144e Remove SkLightingShader and associated classes
Change-Id: I8050414c30dfdb5df23ca79955adc5ba3a29d3f5
Reviewed-on: https://skia-review.googlesource.com/31140
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-07 13:33:49 +00:00
Greg Daniel
4a081e2475 Add GrMtlTexture classes
Adds support for basic Texture creation.

Bug: skia:
Change-Id: I9a3f15bef1c88054c19e952e231cad94ad69f296
Reviewed-on: https://skia-review.googlesource.com/30781
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-08-04 19:53:55 +00:00
Brian Osman
b6705c2536 Add support for object creation/snapshot/deletion events
- Bring back some previously deleted macros and helper types.
- Automatically inject base_type information into snapshot events,
  to allow simpler tracking of polymorphic object types.
- Fix JSON formatting of pointer values (they were serializing as bool).

Bug: skia:
Change-Id: Iac7803f72ce5396ffd2fbcb5a36d76745c5e3f3e
Reviewed-on: https://skia-review.googlesource.com/28220
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-03 17:10:08 +00:00
Mike Klein
a91ec58b4e Tell clang/win to emulate MSVC 2015
By default it emulates your installed cl.exe, but the bots don't have
one.  I think the fallback is 2013, which causes all sorts of pre-C++11
problems.

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Win-Clang-x86_64-Release

Change-Id: I2556abe68825e58762b4172d067ba6826de5c133
Reviewed-on: https://skia-review.googlesource.com/29021
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-31 20:58:55 +00:00
Greg Daniel
0576a45c75 Add GrMtlUtil class
Currently just adding support functions to go back and forth between
GrPixelConfigs and MTLPixelFormats.

Bug: skia:
Change-Id: I01a7d6877ebed87b87090ac2b920fee45dc0e856
Reviewed-on: https://skia-review.googlesource.com/29080
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-31 20:53:18 +00:00
Mike Klein
98adfa8726 use -imsvc (~= -isystem) with win/clang
This should shut up any warnings in the win toolchain headers?

Change-Id: I7d17bf6d63d56e66afffa557d0ed06bc3994200d
Reviewed-on: https://skia-review.googlesource.com/28981
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-07-31 19:53:24 +00:00
Mike Klein
c722f79b6c clang on windows support
1) Run python bin/fetch-clang-win
2) Set clang_win = "../bin/clang_win"
3) ???
4) Profit

Most changes here are to pass the right -mfoo flags to Clang
to enable advanced instruction sets, or fixed warning-as-errors.

BUG=skia:2679

Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921
Reviewed-on: https://skia-review.googlesource.com/28740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-31 18:39:23 +00:00
Greg Daniel
cebcb84739 Add caps files for metal
Bug: skia:
Change-Id: I8e7488320d4237cf67d6ebeaad319d3de75b67e6
Reviewed-on: https://skia-review.googlesource.com/27741
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-07-31 15:03:22 +00:00
Jim Van Verth
1af03d4396 Compute correct bounds for DrawShadowRec.
Bug: skia:6880
Change-Id: Ia8b94e52eec3feb5104d2351bf7a7e6f99101deb
Reviewed-on: https://skia-review.googlesource.com/26370
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-07-31 13:55:32 +00:00
Greg Daniel
eee5183a32 Add placeholder GrMtlTypes in include/gpu/mtl
This is needed since there are currently no files in the include dir, and
some of our tests that check all the public headers complain if it doesn't
exists.

Bug: skia:6896
Change-Id: I3f70293b64b5096a55d6ba0ea5f4e6ebbfd7f62b
Reviewed-on: https://skia-review.googlesource.com/28003
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-07-28 17:11:51 +00:00
Brian Salomon
71603cca8e Remove the now unused GR_PROXY_MOVE macro
Change-Id: I9655a3032aea9c40e87742c76ad9a9ab42a159dc
Reviewed-on: https://skia-review.googlesource.com/27841
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-28 11:31:27 +00:00
Ethan Nicholas
b9f6afb783 switched to infra version of clang-format for skslc
Change-Id: I3e993e271cb5e26816d37c70d9ad62acce3ed84c
Reviewed-on: https://skia-review.googlesource.com/27800
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-27 20:28:50 +00:00
Brian Osman
b4d18735ff Remove GrTraceMarker and friends
This has been disabled for almost two years.

Bug: skia:
Change-Id: Idc1dbf2220514947d2ccd91968e6e173d44d1b86
Reviewed-on: https://skia-review.googlesource.com/27740
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-27 19:41:40 +00:00
Brian Salomon
b133ffe769 Remove Gr1DKernelEffect "helper" class.
Change-Id: I748e49eeacb782fb738c08d5475c442dbce3ad5a
Reviewed-on: https://skia-review.googlesource.com/27500
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-07-27 16:18:33 +00:00
Brian Salomon
6cd51b51d6 Remove GrSingleTextureEffect
Change-Id: I510cc0657f9433b206dc2ab643fa557667263294
Reviewed-on: https://skia-review.googlesource.com/27180
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2017-07-26 23:31:30 +00:00
Brian Osman
a9340ba980 Tracing macro cleanup continued
- Remove one especially chatty event, and one pointless test
- Use TRACE_FUNC everywhere, rather than manual strings

Bug: skia:
Change-Id: Icb795294009150ca9a260436738d79546a733337
Reviewed-on: https://skia-review.googlesource.com/26701
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-26 12:58:59 +00:00
Mike Klein
7a0ba1c132 guard SkTableColorFilter against out-of-range inputs
I was going to be clever here and only clamp when we
know the inputs are out of range, but this filter is
rare and slow enough that I think I'd rather it just
be super paranoid safe.

The test crashes without this fix and passes with it.

Change-Id: I4e17aad2b5c1e96180ce8d73b97bee746cf985c2
Reviewed-on: https://skia-review.googlesource.com/26702
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2017-07-26 12:55:09 +00:00
Yuqian Li
df60e369a8 New analytic AA scan converter using delta (I call it DAA for now)
DAA is:

1. Much simpler than AAA.
   SkScan_AAAPath.cpp is about 1700 lines.
   SkScan_DAAPath.cpp is about 300 lines.
   The whole DAA CL is only about 800 lines.

2. Much faster than AAA for complicated paths.
   The speedup applies to GL backend (including ccpr)!
   Here's the frame time of 'SampleApp --slide Chart' on macbook pro:
     AAA-raster: 33ms
     DAA-raster: 21ms
     AAA-gl:     30ms
     DAA-gl:     20ms
     AAA-ccpr:   18ms
     DAA-ccpr:   12ms
   My linux desktop doesn't have SSE3 so the speedup is smaller
   (~25% for Chart). I believe that DAA is so fast that I can enable
   it for any paths (AAA is not enabled by default for complicated
   paths because it is slow; hence our older supersampling scan
   converter is used for stroking on Chart for AAA-xxx config.)

3. The SkCoverageDelta is suitable for threaded backend with
   out-of-order concurrent scan conversion as commented in the source
   code. Maybe we can also just send deltas to GPU.

4. Similar to most analytic path renderers, the quality is on the best
   ground-truth level, unless there are intersections within a pixel.
   The intersections look good to my eyes although theoretically that
   could be arbitrary far from the ground truth (see my AAA slides).

5. For simple paths, such as circle, triangle, rrect, etc., DAA is
   slower than AAA. But DAA is faster than our older supersampling
   scan converter in most cases. As those simple paths usually don't
   constitute the bottleneck of a picture (skp or svg), I strongly
   recommend use DAA.

6. DAA also heavily favors blitMask so it may work quite well with
   SkRasterPipeline and SkRasterPipelineBlitter.

Finally, please check https://skia-review.googlesource.com/c/22420/
which accelerate DAA by specializing blitCoverageDeltas for
SkARGB32_Blitter and SkARGB32_Black_Blitter. It brings a little(<5%)
speedup. But I couldn't figure out how to reduce the duplicate code
so I don't intend to land it.

Bug: skia:
Change-Id: I3b7ed6a727447922e645b1acb737a506e7c09a4c
Reviewed-on: https://skia-review.googlesource.com/19666
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
2017-07-25 21:55:19 +00:00
Mike Klein
c47f223d14 rename new GM
Our new srgb_color_filter (in gm/srgb_color_filter.cpp) is awfully
similar to the existing srgb_colorfilter (in gm/srgb.cpp).

Let's rename the new one.

Change-Id: I8c7816c377cc4342388be51632353882a1bc5241
Reviewed-on: https://skia-review.googlesource.com/26525
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-25 18:09:30 +00:00
Mike Reed
fa78ece52e Revert "Revert "Add GM to test SkToSRGBColorFilter""
This reverts commit a1fc47169a.

Reason for revert: serialization fixed

Original change's description:
> Revert "Add GM to test SkToSRGBColorFilter"
> 
> This reverts commit fa3ed03720.
> 
> Reason for revert: GM is failing on a lot of bots
> 
> Original change's description:
> > Add GM to test SkToSRGBColorFilter
> > 
> > Bug: skia:
> > Change-Id: If342ad5503d1b427f2d04ce15b75f0f7fa2706c1
> > Reviewed-on: https://skia-review.googlesource.com/26426
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
> 
> TBR=djsollen@google.com,mtklein@google.com,brianosman@google.com
> 
> Change-Id: I92fe179ead6d115b32b3a9533b8ee0e10bb3ee43
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/26522
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Kevin Lubick <kjlubick@google.com>

TBR=djsollen@google.com,mtklein@google.com,kjlubick@google.com,brianosman@google.com

Change-Id: Id4db253a149ff978456ecfe55c8e551e325c98ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/26511
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-25 17:11:20 +00:00
Kevin Lubick
a1fc47169a Revert "Add GM to test SkToSRGBColorFilter"
This reverts commit fa3ed03720.

Reason for revert: GM is failing on a lot of bots

Original change's description:
> Add GM to test SkToSRGBColorFilter
> 
> Bug: skia:
> Change-Id: If342ad5503d1b427f2d04ce15b75f0f7fa2706c1
> Reviewed-on: https://skia-review.googlesource.com/26426
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=djsollen@google.com,mtklein@google.com,brianosman@google.com

Change-Id: I92fe179ead6d115b32b3a9533b8ee0e10bb3ee43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/26522
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2017-07-25 16:17:49 +00:00
Brian Osman
fa3ed03720 Add GM to test SkToSRGBColorFilter
Bug: skia:
Change-Id: If342ad5503d1b427f2d04ce15b75f0f7fa2706c1
Reviewed-on: https://skia-review.googlesource.com/26426
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-25 15:28:03 +00:00
Brian Osman
10b6ad13f9 sRGB color filter
Bug: skia:
Change-Id: I9f04b8ce778349218ccd55673bdd1d16a192383c
Reviewed-on: https://skia-review.googlesource.com/26422
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-25 14:27:33 +00:00
Mike Reed
56e2d94516 remove orphaned file
Bug: skia:
Change-Id: Ib830c951c1590aa7f5eaa01d6fada580a72713a5
Reviewed-on: https://skia-review.googlesource.com/26182
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-25 02:48:26 +00:00
Brian Salomon
b7506c3ecf Remove unused function GrDrawOp::DumpPipelineInfo
This was used by subclasses of GrLegacyMeshDrawOp.

Change-Id: I421589dfdc253bdf43aeac9fa9af0647c70811dd
Reviewed-on: https://skia-review.googlesource.com/25804
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-24 13:47:49 +00:00
Mike Reed
40e7e65534 remove (unused?) arcto patheffect
Bug: skia:
Change-Id: I80943cc495eb1edce839387f4b9512a66a4e5c11
Reviewed-on: https://skia-review.googlesource.com/25981
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-24 12:53:19 +00:00
Mike Klein
0fddb2d7c1 Retry cleaning up SkLinearBitmapPipeline.
This is mostly dead code.

In order to make it truly dead, we need to opt drawing unpremul images
into SkRasterPipelineBlitter.  They had been handled by
SkLinearBitmapPipeline, but can't be draw by SkBitmapProcLegacyShader.

Drawing unpremul images is tested by the GM all_variants_8888, which
gave us trouble last time around (serialize-8888 drew right, 8888 wrong)
but now draws fine.  I think this was probably also the root of the
revert, drawing some unpremul image in Chrome's tests somewhere.

Change-Id: I453f9df44ade807316935921cbae82961e2f08aa
Reviewed-on: https://skia-review.googlesource.com/24862
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-07-20 16:45:52 +00:00
Mike Reed
e32500f064 Assume HQ is handled by pipeline, delete legacy code-path
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: If6f0d0a57463bf99a66d674e65a62ce3931d0116
Reviewed-on: https://skia-review.googlesource.com/24644
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-07-20 00:43:37 +00:00
Hal Canary
f828c1df2f Add Alpha Image GM
Change-Id: I835a59d9f8593e30db817dc8bd1d276af8c80cd7
Reviewed-on: https://skia-review.googlesource.com/24685
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-07-19 21:58:09 +00:00
Ethan Nicholas
b7e8c3b52a run skslc output through clang-format
Bug: skia:
Change-Id: I97af420d1c3270e24e5d0959237b8163faa9e069
Reviewed-on: https://skia-review.googlesource.com/24646
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-19 18:19:55 +00:00
Brian Salomon
e5b399ee69 Remove GrLegacyMeshDrawOp and GrPipelineBuilder
Change-Id: Ib301a0e7d4b4c4f05417d28862017307949748c9
Reviewed-on: https://skia-review.googlesource.com/23584
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-19 18:16:05 +00:00
Brian Salomon
c5886036cb Move GrTypesPriv.h to include/private
Bug: skia:
Change-Id: I68610fed67a70454a815229c47b78ea6d9463a43
Reviewed-on: https://skia-review.googlesource.com/24624
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-19 17:16:14 +00:00
Brian Salomon
fc26f3ca5f Remove GrAnalyticRectOp, the last legacy GrMeshDrawOp
Change-Id: I2b8d1f4c1585af4a157d269a526874bccc74ac81
Reviewed-on: https://skia-review.googlesource.com/23484
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-19 15:21:05 +00:00
Robert Phillips
5af44defbd Add GrResourceAllocator class + unit test
Change-Id: I2700e8cb4213479b680519ba67f078cc3fb71376
Reviewed-on: https://skia-review.googlesource.com/23661
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-07-19 11:43:54 +00:00
Mike Klein
263cef7b5f quote $windk to make copy-and-paste easy
Change-Id: Iaecae142dcf268517f8918d9f4fa6a64db194fab
Reviewed-on: https://skia-review.googlesource.com/23942
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-07-17 15:01:27 +00:00
Chris Dalton
1a325d25b9 Coverage counting path renderer
Initial implementation of a GPU path renderer that draws antialiased
paths by counting coverage in an offscreen buffer.

Initially disabled until it has had time to soak.

Bug: skia:
Change-Id: I003d8cfdf8dc62641581b5ea2dc4f0aa00108df6
Reviewed-on: https://skia-review.googlesource.com/21541
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-07-14 21:45:35 +00:00
Ethan Nicholas
0274b30fee converted GrBlurredEdgeFragmentProcessor to sksl
Bug: skia:
Change-Id: I028c85f692b2e54e64be301940708387014ee0c7
Reviewed-on: https://skia-review.googlesource.com/23540
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-14 20:46:34 +00:00
Ethan Nicholas
420f1565e9 converted EllipseEffect to sksl
Bug: skia:
Change-Id: Id089b9ead7a21e903b001006dffff2381efd4ba3
Reviewed-on: https://skia-review.googlesource.com/23582
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-14 19:45:14 +00:00
Brian Osman
f2c901474c Add GN arg to allow Flutter-specific API guards
Bug: skia:
Change-Id: I5a97da664626eebf30bba3f391fff0d8b9e62ea5
Reviewed-on: https://skia-review.googlesource.com/23042
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2017-07-14 18:54:24 +00:00
Brian Salomon
8abb9f4537 Remove GrTestMeshDrawOp
Change-Id: If7465391b5e704b16b3ded2a73fafe088e2ea8e0
Reviewed-on: https://skia-review.googlesource.com/23384
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-07-14 17:23:34 +00:00
Ethan Nicholas
83d118550f converted CircleEffect to SkSL
Bug: skia:
Change-Id: I93d117c22ae2b374294f6a5e961c497ac2c92b09
Reviewed-on: https://skia-review.googlesource.com/23301
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-14 01:16:03 +00:00
Mike Reed
771ae9682f Revert "Revert "Experimental blur code with 32 bit fix.""
This reverts commit 27b3d272a8.

Reason for revert: guard has landed in android

Original change's description:
> Revert "Experimental blur code with 32 bit fix."
> 
> This reverts commit d4b2c537d0.
> 
> Reason for revert: speculative fix for android-roll
> 
> java.lang.AssertionError: expected:<0> but was:<255>
> at org.junit.Assert.fail(Assert.java:88)
> at org.junit.Assert.failNotEquals(Assert.java:834)
> at org.junit.Assert.assertEquals(Assert.java:645)
> at org.junit.Assert.assertEquals(Assert.java:631)
> at android.graphics.cts.BlurMaskFilterTest.verifyColor(BlurMaskFilterTest.java:79)
> at android.graphics.cts.BlurMaskFilterTest.verifyQuadrants(BlurMaskFilterTest.java:72)
> at android.graphics.cts.BlurMaskFilterTest.testBlurMaskFilter(BlurMaskFilterTest.java:56)
> 
> Original change's description:
> > Experimental blur code with 32 bit fix.
> > 
> > This uses a new method of blurring that runs the three
> > passes of the box filter in a single pass. This implementation
> > currently only does 1x1 pixel at a time, but it should be simple
> > to expand to 4x4 pixels at a time.
> > 
> > On the  blur_10_normal_high_quality benchmark, the new is 7% faster
> > than the old code. For the blur_100.50_normal_high_quality
> > benchmark, the new code is 11% slower.
> > 
> > Bug: skia:
> > Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f
> > Reviewed-on: https://skia-review.googlesource.com/22700
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Herb Derby <herb@google.com>
> 
> TBR=herb@google.com,reed@google.com
> 
> Change-Id: Ie84f6bf8872cae08c06d679f0c2f2e6c3d8a02a2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/22880
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=herb@google.com,reed@google.com

Change-Id: I393d1c05f83ccf98137201bc7b4e7d8e8b0e8742
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/23121
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-13 17:16:43 +00:00
Brian Salomon
b4d6106345 Give GrSimpleMeshDrawOpHelper a cpp file
Change-Id: I1ac3f7d41d3d546801a7fc14008b801a11429472
Reviewed-on: https://skia-review.googlesource.com/22368
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-07-13 16:24:22 +00:00
Ethan Nicholas
68990be759 Re-land of "converted GrSimpleTextureEffect to sksl"
This reverts commit baf981f716.

Bug: skia:
Change-Id: I36f6bfb616f1ec2b89043e3a6f7cbdf473bc9588
Reviewed-on: https://skia-review.googlesource.com/22369
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-07-13 14:07:02 +00:00
Mike Reed
27b3d272a8 Revert "Experimental blur code with 32 bit fix."
This reverts commit d4b2c537d0.

Reason for revert: speculative fix for android-roll

java.lang.AssertionError: expected:<0> but was:<255>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.junit.Assert.assertEquals(Assert.java:631)
at android.graphics.cts.BlurMaskFilterTest.verifyColor(BlurMaskFilterTest.java:79)
at android.graphics.cts.BlurMaskFilterTest.verifyQuadrants(BlurMaskFilterTest.java:72)
at android.graphics.cts.BlurMaskFilterTest.testBlurMaskFilter(BlurMaskFilterTest.java:56)

Original change's description:
> Experimental blur code with 32 bit fix.
> 
> This uses a new method of blurring that runs the three
> passes of the box filter in a single pass. This implementation
> currently only does 1x1 pixel at a time, but it should be simple
> to expand to 4x4 pixels at a time.
> 
> On the  blur_10_normal_high_quality benchmark, the new is 7% faster
> than the old code. For the blur_100.50_normal_high_quality
> benchmark, the new code is 11% slower.
> 
> Bug: skia:
> Change-Id: I847270906b0ceac1dfbf43ab5446756689ef660f
> Reviewed-on: https://skia-review.googlesource.com/22700
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=herb@google.com,reed@google.com

Change-Id: Ie84f6bf8872cae08c06d679f0c2f2e6c3d8a02a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/22880
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-13 01:19:23 +00:00
Greg Daniel
6b7e0e2c74 Add arc support to gpu Obj c++ code
This is mainly for getting ready to start adding lots of metal backend code.
I've also update the "gpu tools" target to require ARC with involved updating
one IOS file in there.

Bug: skia:
Change-Id: Ied22e8fe7532445cc274efb529e3450654a6614b
Reviewed-on: https://skia-review.googlesource.com/22484
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-07-12 20:49:32 +00:00
Hal Canary
7cbf5e3e03 SkPDF: simplify drawImage/Bitmap/Sprite code.
- SkImageSubset becomes SkKeyedImage
  - SkPDFCanvas::onDraw{Bitmap, Image} go away
  - Remove SkPDFCanvas: base classes now do the right thing.
  - SkPDFDevice::draw{Bitmap,Image}{Rect,}() simplified
  - 244 fewer SLOC.

All but a few PDFs are identical, those rasterize almost the same.

Change-Id: I3ceb3b8935c689719cedf1ad544b0407b5c1733e
Reviewed-on: https://skia-review.googlesource.com/22218
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-07-12 20:41:41 +00:00