Commit Graph

17047 Commits

Author SHA1 Message Date
Hal Canary
c02de0b844 SkPDF: Clean up
- Use clearMaskOnGraphicState()
  - SkPDFGraphicState::MakeNoSmaskGraphicState now moved to only caller.
  - Get rid of clunky SkPDFUtils::GetCachedT

Change-Id: If76a1e915fc31e3ce2654fbe620ff44c1820c0e7
Reviewed-on: https://skia-review.googlesource.com/21142
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-28 19:09:09 +00:00
Robert Phillips
a4f792da37 Fix for Android batching bug
On Android it looks like we have:
   stencilClip1
   draw1
   stencilClip2
   draw2

where draw1 is being forward combined with draw2 b.c. they are both stencil clipped but it shouldn't b.c. they are different stencil clips.

Change-Id: Ia704d7ab869022a055eed0726e2b7fab8eaaf817
Reviewed-on: https://skia-review.googlesource.com/20977
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-28 18:26:06 +00:00
Mike Klein
c55a6cb05f build regenerating SkJumper stages into GN
I _think_ this makes it so changes to _stages.cpp or _lowp.cpp get
noticed, regenerated, and baked into Skia all in the same Ninja
invocation.

Now you just need to set up the tools we use in GN:

  skia_jumper_clang = ...
  skia_jumper_objdump = ...
  skia_jumper_ccache = ...

Change-Id: I09fb54d965644ff6e5825056fb0be2c7cab2ea92
Reviewed-on: https://skia-review.googlesource.com/21140
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-28 18:22:16 +00:00
Stan Iliev
dbba55de70 Cache GrTexture in GrAHardwareBufferImageGenerator
Cache last GrTexture needed by onGenerateTexture. Make sure
GrTexture is destroyed by the thread that owns its GrContext.
This CL avoids frequent eglDestroyImageKHR calls, which can take
more than 7ms.

Bug: skia:
Change-Id: Ic8472e7e4c55c0f559d96e16845054dc54ec8efa
Reviewed-on: https://skia-review.googlesource.com/20989
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-06-28 17:56:46 +00:00
Mike Klein
c2d207603e clean up low-hanging swap_rb
There are two remaining swap_rb uses that both look non-trivial to
replace:
   - sampling out of index8 when the color table is bgra
   - table transforms on bgra inputs in SkColorSpaceXform

I don't think it's a big deal to just leave swap_rb around,
just a little sad.

Change-Id: I3d30200cf867cbf37d6f86572b1574d3e22e3490
Reviewed-on: https://skia-review.googlesource.com/21040
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-28 17:41:56 +00:00
Stephen White
e4f195d98d GrTessellator: nuke SK_DISABLE_SCREENSPACE_TESS_AA_PATH_RENDERER ifdef.
No longer used.

Bug: skia:
Change-Id: I24424e540607b5c9a2607fd5f34034bea920f62e
Reviewed-on: https://skia-review.googlesource.com/21063
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2017-06-28 16:51:26 +00:00
Florin Malita
a66ef2d106 2ptconical stage
Initial impl, for the well-behaved case (focal point inside).

MBP numbers -

Before:

   3365.87 !	gradient_conical_clamp_shallow	srgb
   3590.88 !	gradient_conical_clamp_shallow_dither	srgb
   3376.91 !	gradient_conical_clamp_3color	srgb
   3351.64 !	gradient_conical_clamp_hicolor	srgb
   3379.35 !	gradient_conical_clamp	srgb

After:

    648.93 !	gradient_conical_clamp_shallow	srgb
    665.12 !	gradient_conical_clamp_shallow_dither	srgb
    773.98 !	gradient_conical_clamp_3color	srgb
   1175.35 !	gradient_conical_clamp_hicolor	srgb
    619.17 !	gradient_conical_clamp	srgb

Change-Id: I07b22a758363e1f340a6041bca53bdef74229eb9
Reviewed-on: https://skia-review.googlesource.com/20906
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-28 16:49:31 +00:00
Robert Phillips
2de8cfadc3 Move copy operation from GrRenderTargetContext/GrTextureContext to GrSurfaceContext
Change-Id: I5f48ce9978370f07238a7318ccb6270e10069c92
Reviewed-on: https://skia-review.googlesource.com/21104
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-28 16:44:36 +00:00
Mike Reed
90ca37726b use rasterpipline for hq scaling
Bug: skia:
Change-Id: Ic67f869ba35be17d49d371bb7f3fa60b6b2e20ee
Reviewed-on: https://skia-review.googlesource.com/21105
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-28 16:44:26 +00:00
Mike Klein
cefd059b2a be more explicit about not expecting 32-bit x86 jumper backend on windows
Looks like Clang/Win is defining __i386__, but we're not linking in
stage functions (they don't exist yet for Windows).

Change-Id: I78fdd3e1d89020bc6c64bc1cd5dfb3fbca720b2e
Reviewed-on: https://skia-review.googlesource.com/21103
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-28 14:18:52 +00:00
Eric Boren
746e2632c6 Move all Linux GCE bots to Debian
NOTREECHECKS:true
Bug: skia:
Change-Id: I612989c6ce2f309d2f70f896500f73e4baa971a7
Reviewed-on: https://skia-review.googlesource.com/19811
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2017-06-28 12:38:28 +00:00
Mike Klein
111f8a9eea add bgra as 1st class format
This is a start to eliminating swap_rb as a stage.

I've just hit the main hot spots here.  Going to look into
the ~dozen other spots to see how they should work next.

Change-Id: I26fb46a042facf7bd6fff3b47c9fcee86d7142fd
Reviewed-on: https://skia-review.googlesource.com/20982
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2017-06-27 23:30:23 +00:00
Mike Klein
5ce3972055 Revert "Re-land sksl fragment processor support"
This reverts commit c070939fd1.

Reason for revert: 

This has some knock-on effects in the generation of Android.bp from our GN files.  See gn/gn_to_bp.py?  We're seeing things like "tmp/tmpsBVycx/gen/" end up in the include search path in Android.bp, which obviously don't exist there...

Original change's description:
> Re-land sksl fragment processor support
> 
> This reverts commit ed50200682.
> 
> Bug: skia:
> Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
> Reviewed-on: https://skia-review.googlesource.com/20965
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I502486b5405923b322429219f4cc396a45a14cea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20990
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-06-27 22:52:10 +00:00
Mike Reed
3fe44544c9 use blitMask for left/right edges in blur-nine
Seems about same speed for legacy blitter, but much faster for raster-pipeline

Bug: skia:
Change-Id: I19be307c01a199e2477e045fb8c2cca7784564a5
Reviewed-on: https://skia-review.googlesource.com/20967
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-27 22:00:53 +00:00
Mike Klein
9f2b3d1fbf remove unused "swap" stage
Change-Id: I25619f010f8ac6441529cfe8dff2d8c42d7400cf
Reviewed-on: https://skia-review.googlesource.com/20988
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-27 21:50:53 +00:00
Mike Reed
279091ef85 specialize loaders for dst registers, to avoid move/swap stages
Bug: skia:
Change-Id: I75d82ef2226c5f116b7de2208c4e914739414b6d
Reviewed-on: https://skia-review.googlesource.com/20984
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-06-27 21:20:53 +00:00
Derek Sollenberger
7a86987815 Use the NDK headers for AHardwareBuffer.
Bug: 6672
Change-Id: I5abd86149e912d91234853109ebd2a6b0ac5eaa2
Reviewed-on: https://skia-review.googlesource.com/20980
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-06-27 20:28:13 +00:00
Jim Van Verth
3921ba236f Enable SDF text when using a perspective matrix.
Also fixes some state issues in SampleApp.

Change-Id: I854754e8b547f7e62aa90914520aaaa20095f965
Reviewed-on: https://skia-review.googlesource.com/20975
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-27 20:17:23 +00:00
Mike Klein
d08109f344 try not zeroing registers in start_pipeline
Generally stages take care of state setup themselves, either with
seed_shader, constant_color, a load, etc.  I think these zeros may
be unnecessarily cautious.

This can't make anything draw more correctly, but it could make things
   - draw wrong
   - draw more slowly
   - draw more quickly
so it's an interesting thing to try and keep an eye on.

Change-Id: I7e5ea3cd79e55a65e1dbd214601e147ba3815b87
Reviewed-on: https://skia-review.googlesource.com/20976
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-27 20:11:33 +00:00
Hal Canary
51329c944c SkPDF: clean up PDFDevice.
Motivation:  factor out some code for later re-use; clean up.

  - mask_to_greyscale_image()
  - addSMaskGraphicState()
  - clearMaskOnGraphicState()
  - stop using bare pointer to indicate ownership.
  - add ScopedContentEntry::stream()

Change-Id: I7abe7ff9eab89e1002692017000cda2ca7642631
Reviewed-on: https://skia-review.googlesource.com/20978
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-27 19:56:43 +00:00
Florin Malita
0bb0411f59 2pt conical stage for concentric case
If the circles are concentric, we can use the radial stage and
post-massage t with a 2x3 stage.

Change-Id: I744bc889d509d5f9ff162c179e8ec7ca35410e3c
Reviewed-on: https://skia-review.googlesource.com/20972
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-27 19:20:17 +00:00
Ethan Nicholas
c070939fd1 Re-land sksl fragment processor support
This reverts commit ed50200682.

Bug: skia:
Change-Id: I9caa7454b391450620d6989dc472abb3cf7a2cab
Reviewed-on: https://skia-review.googlesource.com/20965
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 18:27:57 +00:00
Hal Canary
b964238f0b SkDevice::drawBitmap takes x,y, not matrix
Motivation:  a simpler call should make it easier for SkPDF to learn how
to do drawBitmap with A8 bitmap and a maskfilter.
Change-Id: I1a5d190b40b0e9e08fa8876d265a9835a3e9987d
Reviewed-on: https://skia-review.googlesource.com/20961
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-27 15:33:35 +00:00
Mike Klein
ca0b43803b add dumbest possible 32-bit SkJumper backend
Everything uses a ton of stack, nothing tail calls, and for now this is
non-Windows only.  But, it does run faster than the portable serial code.

On my trashcan, running `monobench SkRasterPipeline_compile`:
   - Normal 64-bit AVX build:  43.6ns
   - Before this CL, 32-bit:  707.9ns
   - This CL:                 147.5ns

Change-Id: I4a8929570ace47193ed8925c58b70bb22d6b1447
Reviewed-on: https://skia-review.googlesource.com/20964
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-27 15:20:56 +00:00
Ethan Nicholas
ed50200682 Revert "sksl fragment processor support"
This reverts commit ccf59917d3.

Reason for revert: breaking iOS bots

Original change's description:
> sksl fragment processor support
> 
> Bug: skia:
> Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
> Reviewed-on: https://skia-review.googlesource.com/17843
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,benjaminwagner@google.com,ethannicholas@google.com

Change-Id: I0a33060c7c42c7b44c5c13d443ac42958291c2f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20962
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-27 14:36:44 +00:00
Ethan Nicholas
ccf59917d3 sksl fragment processor support
Bug: skia:
Change-Id: Ia3b0305c2b0c78074303831f628fb01852b90d34
Reviewed-on: https://skia-review.googlesource.com/17843
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-27 14:20:05 +00:00
Ben Wagner
c3aef18419 Load FreeType glyph bitmap before emboldening.
If a bitmap glyph was loaded with FT_LOAD_BITMAP_METRICS_ONLY then the
glyph must be re-loaded without this flag before accessing the bitmap.

BUG=chromium:725975

Change-Id: If5e5a6844e9c32238560135e141fea7f77ad7fac
Reviewed-on: https://skia-review.googlesource.com/20830
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-06-27 14:01:35 +00:00
Mike Klein
8c3d5156c7 add _hsw lowp backend
CQ_INCLUDE_TRYBOTS=skia.primary:Build-Ubuntu-Clang-x86_64-Debug-MSAN

Change-Id: Id53279c17589b3434629bb644358ee238af8649f
Reviewed-on: https://skia-review.googlesource.com/20269
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2017-06-27 13:31:05 +00:00
Jim Van Verth
7f7b902d51 Add shading language version to GL dump
Bug: skia:6759
Change-Id: I021a8487ccb1d127b2005285e439be34d644f333
Reviewed-on: https://skia-review.googlesource.com/20905
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-27 13:04:05 +00:00
Robert Phillips
70e3e9adc5 Remove SkImageFilter::MakeBlur entry point
AFAICT none of our clients use this entry point and it is tangling up efforts to add a new parameter to the BlurImageFilter.

Change-Id: I494634db98a1d246854a5e3735380fbe55f425c2
Reviewed-on: https://skia-review.googlesource.com/20837
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-27 12:49:25 +00:00
Mike Klein
c4fcbed6b2 somewhat less silly tail loads and stores
No reason to keep going one at a time when we know there are generally
better ways to handle loading a power-of-two number of low lanes.

This strategy scales up too, with quick answers for 8 (one 8 byte load),
12 (one 8 byte, one 4 byte), etc.

$ ninja -C out monobench; and out/monobench SkRasterPipeline_compile 300

    Before: 46.946ns
    After:  43.341ns

(This happens to be _lowp.  Expect similar small speedups elsewhere.)

Change-Id: I08f87769ea3c9f06ad13d2b1d5326e542b9b63a8
Reviewed-on: https://skia-review.googlesource.com/20903
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-26 20:51:52 +00:00
Greg Daniel
660cc9910f Restrict acceptable bounds for uploading data to mip levels on GPU
The help simplify the code (and currect a current bug) inside the uploadPixel
functions in GL and Vulkan, we not restrict the bounds upload/write bounds
on a higher level. For non mipped uploads, we requiring the bounds to be within
the bounds on the texture, and for mipped uploads we require the bounds to be
the full texture.

Bug: skia:6780
Change-Id: Ia1cff3ee48edd3676afce6265d60e81ccea6ca6a
Reviewed-on: https://skia-review.googlesource.com/20825
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-26 19:49:50 +00:00
Brian Osman
a98e399ba5 Exclude AALinearizingConvexPathRenderer from zero size paths
Per SVG, stroking a zero length line with square or round caps should draw
a square or circle. This path renderer has lots of baked in assumptions
that prevent that behavior, so the easy solution is to let some other path
renderer handle it.

Bug: skia:6781
Change-Id: I9d2da94f75d96554e3cd218848aa552f63add679
Reviewed-on: https://skia-review.googlesource.com/20900
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-26 19:41:40 +00:00
Mike Klein
4b8d491b22 lean more on the compiler in lowp stages
This refactors {from,to}_{byte,8888} to lean a bit more on the compiler,
and to share code between the two.  The algorithm is not exactly the
same, but it's comparable, and the results of course are identical.

This new algorithm is a lot easier to generalize to AVX2, and parallels
the full-precision {from,to}_{byte,8888} functions in _stages.cpp.

Change-Id: I31ea90d65967bf4ede2497d1e2197cb0e7648bf8
Reviewed-on: https://skia-review.googlesource.com/20828
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-26 16:53:31 +00:00
Robert Phillips
d261e1075a Re-enable opList dependency tracking
Change-Id: I0fa1bbaed565a0d7de8d4475ed1d2baf200b285f
Reviewed-on: https://skia-review.googlesource.com/20700
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-26 16:52:31 +00:00
Robert Phillips
8744405448 Remove SkImage_Base::peekTexture call
Change-Id: Ie5b6bec8df083e0a128aa234d80f5a214cd98f0d
Reviewed-on: https://skia-review.googlesource.com/20741
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-26 15:29:18 +00:00
Mike Reed
fb49909aca Revert "Remove deadcode for sRGB image shading."
This reverts commit 51f6a0f89e.

Reason for revert: try to fix chrome roll

Original change's description:
> Remove deadcode for sRGB image shading.
> 
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I90409a08409177d9dc3b094d736af0fdaf7d6cdd
Reviewed-on: https://skia-review.googlesource.com/20824
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-26 13:59:51 +00:00
Mike Reed
5e78c61075 Revert "remove a bit more dead code"
This reverts commit d9b1fe02a6.

Reason for revert: try to fix chrome roll

Original change's description:
> remove a bit more dead code
> 
> Change-Id: I61484672e88d6bb4f75833ee89e7178c4f34d610
> Reviewed-on: https://skia-review.googlesource.com/20780
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I03dcd344dfb138261d9421b0692d12e4ed431100
Reviewed-on: https://skia-review.googlesource.com/20822
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-26 13:53:22 +00:00
Mike Reed
91d7d1d4ac Revert "Revert "Remove deadcode for sRGB image shading.""
This reverts commit e08e639063.

Reason for revert: revert was not clean

Original change's description:
> Revert "Remove deadcode for sRGB image shading."
> 
> This reverts commit 51f6a0f89e.
> 
> Reason for revert: crazy attempt to fix chrome roll
> 
> Original change's description:
> > Remove deadcode for sRGB image shading.
> > 
> > Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> > Reviewed-on: https://skia-review.googlesource.com/20695
> > Reviewed-by: Mike Klein <mtklein@chromium.org>
> > Commit-Queue: Herb Derby <herb@google.com>
> 
> TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: Icab02936d6c18e50b8de353aa1cd4c225e15e0bf
> Reviewed-on: https://skia-review.googlesource.com/20800
> Reviewed-by: Mike Reed <reed@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com

Change-Id: Ibc579a5a95e78cb257e8d443dbb905db3761e84a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/20802
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-25 20:01:28 +00:00
Mike Reed
e08e639063 Revert "Remove deadcode for sRGB image shading."
This reverts commit 51f6a0f89e.

Reason for revert: crazy attempt to fix chrome roll

Original change's description:
> Remove deadcode for sRGB image shading.
> 
> Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
> Reviewed-on: https://skia-review.googlesource.com/20695
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Herb Derby <herb@google.com>

TBR=mtklein@chromium.org,mtklein@google.com,herb@google.com,reed@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Icab02936d6c18e50b8de353aa1cd4c225e15e0bf
Reviewed-on: https://skia-review.googlesource.com/20800
Reviewed-by: Mike Reed <reed@google.com>
2017-06-25 19:55:03 +00:00
Mike Reed
428266de30 use rasterpipeline for colorfilters
Bug: skia:
Change-Id: Ia0e88f3ae29d026843ac7beb2aee3c891123ce18
Reviewed-on: https://skia-review.googlesource.com/20773
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-25 14:21:30 +00:00
Mike Reed
1aa77f0ed7 remove unused blitrow
Bug: skia:
Change-Id: Id905a4b9246a986a3c5de05042e32930d881c1ed
Reviewed-on: https://skia-review.googlesource.com/20772
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-24 21:50:32 +00:00
Mike Reed
cbbb58af7a Revert "speculative fix for chrome roll"
This reverts commit 4220a929f8.

Reason for revert: did not seem to help chrome

Original change's description:
> speculative fix for chrome roll
> 
> Bug: skia:
> Change-Id: Ib1d7d0839093a4ced89f591bc329bbd3adc635f8
> Reviewed-on: https://skia-review.googlesource.com/20768
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I1906664ebf4aae8bc61bd410a74231bce3f4b562
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20782
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-24 20:32:33 +00:00
Mike Reed
4220a929f8 speculative fix for chrome roll
Bug: skia:
Change-Id: Ib1d7d0839093a4ced89f591bc329bbd3adc635f8
Reviewed-on: https://skia-review.googlesource.com/20768
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-24 19:33:11 +00:00
Mike Klein
d9b1fe02a6 remove a bit more dead code
Change-Id: I61484672e88d6bb4f75833ee89e7178c4f34d610
Reviewed-on: https://skia-review.googlesource.com/20780
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-06-24 16:08:23 +00:00
Mike Reed
2e3c955254 disable optimization (for now) for android
Bug: skia:
Change-Id: I5e66d6f0a1aede5239b5a51a8b51283cede2be93
Reviewed-on: https://skia-review.googlesource.com/20781
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-24 01:38:38 +00:00
Herb Derby
51f6a0f89e Remove deadcode for sRGB image shading.
Change-Id: I9d98da67d97b64ab55cf44b9ae447882dccda1ca
Reviewed-on: https://skia-review.googlesource.com/20695
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-06-23 21:21:59 +00:00
Mike Reed
587d082f50 optimize imageshaders to use clamp for dimension==1
Bug: skia:
Change-Id: I12021acb5349bd139dceee8ce46de3cfd1ff4d28
Reviewed-on: https://skia-review.googlesource.com/20698
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-23 21:16:39 +00:00
Mike Reed
bc4c26b7a2 reduce exposure of SK_SUPPORT_LEGACY_TILED_BITMAPS to not replace repeats yet
A large swath of skps slowed down ~5-6x, likely because of repeat_repeat tiling
slowdowns. This CL reduces our exposure to keep those in legacy mode for now.

Bug: skia:
Change-Id: I16d03c01fe8c14a8b9b6a1a9a0c5f31f8d616b4a
Reviewed-on: https://skia-review.googlesource.com/20694
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-23 19:57:17 +00:00
Florin Malita
25ad117ee8 Remove SK_SUPPORT_LEGACY_DITHERING dead code
No longer defined in Chrome.

Change-Id: I5677ef39f7815e77fa52ec9aa667ae2a51e0f20b
Reviewed-on: https://skia-review.googlesource.com/20692
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-23 19:27:37 +00:00
Mike Reed
51e46d5e1c use mul_inv instead of div for tiling
Bug: skia:
Change-Id: I5f88e7923fe204faba8dc5d87454805a4d470d52
Reviewed-on: https://skia-review.googlesource.com/20688
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-23 18:55:34 +00:00
Robert Phillips
81dd3e0c66 Finish a few MDB TODOs
Change-Id: I5579bea381ce30dc59502dbeb5841fea927002c2
Reviewed-on: https://skia-review.googlesource.com/20640
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-23 18:53:56 +00:00
Mike Klein
80ce804f3e remove SkDebugfs
These are just annoying me every time I run DM.

Change-Id: I8beffb0f7a479676741fe75a2066dcfd7fb06567
Reviewed-on: https://skia-review.googlesource.com/20686
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-23 17:14:25 +00:00
Hal Canary
5eda734194 SkPDF: remove duplicate dict entry
Change-Id: I550b4e50694b0cb3ba89c816dc54f3da9e8a9c53
Reviewed-on: https://skia-review.googlesource.com/20682
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-23 16:41:05 +00:00
Robert Phillips
602b79c5c4 Complete another MDB todo
Change-Id: Ic1287d79edc610d44ea24f40bf9facde9573d926
Reviewed-on: https://skia-review.googlesource.com/20660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-23 15:53:45 +00:00
Brian Salomon
91a3e52552 Move mock gpu and caps, add Gr prefix, and create via GrContext::Create
Change-Id: I02427839f78372e337ed717b071c6baaa8ba4450
Reviewed-on: https://skia-review.googlesource.com/20622
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-06-23 15:42:15 +00:00
Hal Canary
a46969229d SkPDF: implement SkPDFArray::reserve.
SkTArray::reserve() was implemented here:
    https://skia.googlesource.com/skia/+/06ca8ec%5E%21/#F28

Change-Id: Ibe78cd686506ccb424a827b37bca9c2904565f85
Reviewed-on: https://skia-review.googlesource.com/20518
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-23 15:19:25 +00:00
Ben Wagner
6cdb5f2ad7 Clip FreeType glyph bitmap to mask.
Skia has for some time assumed that when using FT_Render_Glyph with one
of the LCD render modes that one extra pixel would be applied to each
side of the resulting bitmap. FreieType has changed to make this more
conservative when possible, so the pre-allocated SkMask and the generated
FT_Bitmap may no longer agree on the size and origin.

This change ensures the SkMask and FT_Bitmap are the same size and their
origins align. This is not an ideal long term fix, but is both simple and
localized for easy and quick back-porting, should that become necessary.

BUG=skia:6663

Change-Id: I49ec8f45376be8d867e8aef54eab79537731c310
Reviewed-on: https://skia-review.googlesource.com/20327
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-06-23 13:42:58 +00:00
Hal Canary
f3b9d4b033 SkPDF: add some TRACE_EVENTs
Change-Id: I5f7e7ad57c1e585254378e3fdee4d33c3582d7c2
Reviewed-on: https://skia-review.googlesource.com/20517
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-22 20:38:31 +00:00
Mike Klein
0cc60b8bbd fix repeat/mirror sampling bleed
I think this has been broken since we tried to simplify this in
  https://skia-review.googlesource.com/16547

The HSW backend does still look a little wrong, but improved,
and the others seem fixed.  Can you see how this affects your
test cases, layout tests, etc?

BUG=skia:6783

Change-Id: I17957ac8100331bea5b64d674bf43105048b72f6
Reviewed-on: https://skia-review.googlesource.com/20548
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
2017-06-22 19:46:51 +00:00
Ethan Nicholas
91a1053f2d Revert "Revert "clean up sksl dead variable handling""
This reverts commit e0a33e28e2.

Bug: skia:
Change-Id: Iab31ec1ee091aacc3ba854ad91e71840c911f52e
Reviewed-on: https://skia-review.googlesource.com/20506
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-22 16:53:00 +00:00
Herb Derby
eb64b9b201 Replace variant system with arena
Bug: skia:6764
Change-Id: I9327b953efeedd73e7985904d17b971939468e40
Reviewed-on: https://skia-review.googlesource.com/20500
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-22 15:27:10 +00:00
Jim Van Verth
2e5eaf022e Revert "Revert "Clean up onTransferPixels""
Bug: skia:5126
Change-Id: Ia1eaef56cca266ad4c413e711e63646e913222be
Reviewed-on: https://skia-review.googlesource.com/20445
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-22 13:14:01 +00:00
Hal Canary
f975b3eb65 Revert "Revert "SkRegion: more robust validation""
This reverts commit 7f4124058e.

Original change's description:
> Revert "SkRegion: more robust validation"
> 
> This reverts commit 711450e948.
> 
> Reason for revert: speculative revert to fix chrome roll.
> 
> Original change's description:
> > SkRegion: more robust validation
> > 
> > BUG=oss-fuzz:1864
> > Change-Id: I4c3d3c4c7b0717399fe16f227e032682b13ebc74
> > Reviewed-on: https://skia-review.googlesource.com/20322
> > Reviewed-by: Cary Clark <caryclark@google.com>
> > Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,caryclark@google.com,reed@google.com

Change-Id: I1e5500cb83adeeda544282577ce55812e1b5d682
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: oss-fuzz:1864
Reviewed-on: https://skia-review.googlesource.com/20501
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-22 11:22:11 +00:00
Mike Reed
980e2790dd Revert[2] "use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy code)""
Now with guard for Chrome and fix for bench
https://codereview.chromium.org/2947233002/

This reverts commit 19d0b99922.

Bug: skia:
Change-Id: I5991955d0d927d34a184cf4d9844b0d565e03b88
Reviewed-on: https://skia-review.googlesource.com/20461
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-22 01:56:30 +00:00
Chris Dalton
832bd2b697 Add a concat method to SkTInternalLList
Bug: skia:
Change-Id: I3d62aff691f6cc08b7995bd72dbfd6289c803c6a
Reviewed-on: https://skia-review.googlesource.com/20380
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-21 22:19:16 +00:00
Greg Daniel
e0a33e28e2 Revert "clean up sksl dead variable handling"
This reverts commit b29dd819c9.

Reason for revert: asan errors

Original change's description:
> clean up sksl dead variable handling
> 
> Change-Id: I301e82bf87d976e59a02b0f383da67eaf5a8795a
> Reviewed-on: https://skia-review.googlesource.com/18494
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=csmartdalton@google.com,ethannicholas@google.com

Change-Id: I32b3c6a04a014b31360d92b3f85491b01e8a381c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/20480
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-21 21:25:43 +00:00
Brian Osman
93a2346dfa Add GL_APPLE_sync support
While debugging Flutter iOS issues, I realized that they weren't getting
cross context images (we were just passing around codec backed images).

Bug: skia:
Change-Id: I6190b24eb281e839659d28767f9a0b31c05f13e0
Reviewed-on: https://skia-review.googlesource.com/20450
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-21 20:42:53 +00:00
Greg Daniel
a2cebd8330 When flushing a surface with semaphores, have last semaphore op call glFlush
Bug: skia:6770
Change-Id: Ia321b3826da87bd0d25ca2b13b7360baa8caf597
Reviewed-on: https://skia-review.googlesource.com/20453
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-21 20:37:23 +00:00
Hal Canary
7f4124058e Revert "SkRegion: more robust validation"
This reverts commit 711450e948.

Reason for revert: speculative revert to fix chrome roll.

Original change's description:
> SkRegion: more robust validation
> 
> BUG=oss-fuzz:1864
> Change-Id: I4c3d3c4c7b0717399fe16f227e032682b13ebc74
> Reviewed-on: https://skia-review.googlesource.com/20322
> Reviewed-by: Cary Clark <caryclark@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,caryclark@google.com,reed@google.com

Change-Id: I95cbbf064db6ea7ef74a757bca058ba8de20d87b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: oss-fuzz:1864
Reviewed-on: https://skia-review.googlesource.com/20452
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-21 19:57:21 +00:00
Ethan Nicholas
b29dd819c9 clean up sksl dead variable handling
Change-Id: I301e82bf87d976e59a02b0f383da67eaf5a8795a
Reviewed-on: https://skia-review.googlesource.com/18494
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-21 19:55:30 +00:00
Mike Reed
0215312f5f remove unused SkFilterProcs
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: I7f9abb3ecb1c7b4fd18a703198c54c6d8f5e1ef7
Reviewed-on: https://skia-review.googlesource.com/20429
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-21 19:17:02 +00:00
Mike Reed
19d0b99922 Revert "use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy code)"
This reverts commit 00b8ab61dd.

Reason for revert: breaks nanobench

Original change's description:
> use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy code)
> 
> Definitely changes some GMs, but I think they're all more correct.
> 
> Bug: skia:
> Change-Id: Ic30622f2c17325bce4c82b4d7997036d3cc026c2
> Reviewed-on: https://skia-review.googlesource.com/20363
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=mtklein@google.com,herb@google.com,fmalita@chromium.org,reed@google.com

Change-Id: I6b7e8d68deb8b62bd9688c95a5937a0bba8b4cf5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20431
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-21 18:55:01 +00:00
Mike Reed
00b8ab61dd use rasterpipeline for non-8888-clamp shaders (so we can delete more legacy code)
Definitely changes some GMs, but I think they're all more correct.

Bug: skia:
Change-Id: Ic30622f2c17325bce4c82b4d7997036d3cc026c2
Reviewed-on: https://skia-review.googlesource.com/20363
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-21 18:45:50 +00:00
Hal Canary
711450e948 SkRegion: more robust validation
BUG=oss-fuzz:1864
Change-Id: I4c3d3c4c7b0717399fe16f227e032682b13ebc74
Reviewed-on: https://skia-review.googlesource.com/20322
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-21 16:59:03 +00:00
Ethan Nicholas
7da6dfabc4 implemented mustImplementGSInvocationsWithLoop workaround in sksl
Third time's the charm

This reverts commit 84cda40bd7.

Bug: skia:
Change-Id: I2c0f4425122a94beb7b4053ee6e891faa8a5f290
Reviewed-on: https://skia-review.googlesource.com/20441
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-21 15:55:06 +00:00
Jim Van Verth
ce57552e11 Revert "Clean up onTransferPixels"
This reverts commit f7037d003c.

Reason for revert: Issues on test bots.

Original change's description:
> Clean up onTransferPixels
> 
> Bug: skia:5126
> Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc
> Reviewed-on: https://skia-review.googlesource.com/19055
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,brianosman@google.com

Change-Id: I923fda4d5cd8c2896fb347f9b2695b7f83d9137b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:5126
Reviewed-on: https://skia-review.googlesource.com/20444
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-21 15:50:51 +00:00
Jim Van Verth
f7037d003c Clean up onTransferPixels
Bug: skia:5126
Change-Id: I323c50e7854744302007b4ae7bd25e5742c14cbc
Reviewed-on: https://skia-review.googlesource.com/19055
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-06-21 15:28:50 +00:00
Hal Canary
44eb6d9c5a remove SkImageEncoder_none.cpp
msarett@ realized that if all of the encoders were disabled, then it
is equivalent to SkImageEncoder.cpp.

Change-Id: Ib3d5d7d061e1a60d7081689430107fb250903d5c
Reviewed-on: https://skia-review.googlesource.com/20440
Reviewed-by: Matt Sarett <msarett@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2017-06-21 14:52:30 +00:00
Brian Osman
3902d40cd6 Simplify PathGeoBuilder
Remove more state, handle multiple paths just like multiple contours in
a single path. This fixes the problem with the subpath index start going
out of range as well.

Bug: skia:
Change-Id: I08023057a06d55df7398a60e081b4da6eed467ce
Reviewed-on: https://skia-review.googlesource.com/20326
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-06-21 14:13:56 +00:00
Mike Reed
84cda40bd7 Revert "Revert "Revert "implemented mustImplementGSInvocationsWithLoop workaround in sksl"""
This reverts commit f66d28dfb2.

Reason for revert: breaks chrome-roll?
https://chromium-review.googlesource.com/c/542000

Original change's description:
> Revert "Revert "implemented mustImplementGSInvocationsWithLoop workaround in sksl""
> 
> This reverts commit 8ea60736aa.
> 
> Bug: skia:
> Change-Id: If77035e03430b469c2682788610b33ae0aefbe1f
> Reviewed-on: https://skia-review.googlesource.com/20053
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

TBR=csmartdalton@google.com,ethannicholas@google.com

Change-Id: Iedada4e4b9facb37b792a655947d76eb0f7b22e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20361
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-21 03:34:49 +00:00
Ethan Nicholas
f66d28dfb2 Revert "Revert "implemented mustImplementGSInvocationsWithLoop workaround in sksl""
This reverts commit 8ea60736aa.

Bug: skia:
Change-Id: If77035e03430b469c2682788610b33ae0aefbe1f
Reviewed-on: https://skia-review.googlesource.com/20053
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-20 20:51:15 +00:00
Brian Osman
49b7b6f38f Handle too many (or too large) paths in GrDefaultPathRenderer
PathGeoBuilder constructs the geometry with the same basic
technique as before, but allows interrupting the process
to emit multiple draws.

Original test case was 2000 non-AA stroked circles, which
created ~66000 vertices. That now renders, as do various
tests with a single large path (as well as filled paths).

Added a new set of 'AtLeast' allocators for vertex and index
data. These take a minimum size and a fallback size. If the
minimum size can be satisfied by an existing block, then
the caller gets *all* memory in that block, otherwise they
get a new block sized for the fallback amount. The previous
allocation scheme wasn't a good fit for the new use-case,
and because we don't usually need many verts, the flexible
approach seems appropriate.

TODO: I think that this could be extracted and re-used for
MSAA path renderer without too much work? I need to read
that code more carefully to make sure it lines up.

Re-land of: https://skia-review.googlesource.com/18360
Re-land of: https://skia-review.googlesource.com/18983

Bug: skia:6695
Change-Id: I09ac1273e5af67ed0e3e886de90e2970c3d0b239
Reviewed-on: https://skia-review.googlesource.com/19480
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-06-20 19:15:58 +00:00
Chris Dalton
6081ebb689 Add makeBuffer and caps to GrOnFlushResourceProvider
Bug: skia:
Change-Id: Ie3101ca20743a953621815bdae886c995d39c9e6
Reviewed-on: https://skia-review.googlesource.com/20315
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-06-20 19:08:19 +00:00
Brian Osman
e53120754b Add SkCopyPixelsMode argument to SkMakeImageInColorSpace
Deferred rendering in Android will need the ability to use this in
kIfMutable mode.

Bug: skia:
Change-Id: I5194f2c50f9d17351fdab49373ca9bc1e80cf586
Reviewed-on: https://skia-review.googlesource.com/20157
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
2017-06-20 14:03:01 +00:00
Mike Klein
57c9d20102 rephrase lowp constant_color
This doesn't change the generated code (no .S files change),
but it does rephrase what we're trying to do to make it
generalize to AVX2 better:

   - load 4 floats
   - add 256.0f to each
   - splat out the low 2 bytes of each 4 byte lane as r,g,b,a

Change-Id: Iadc5bc1f2a268679d1ccadd31cd24949a71e0aa4
Reviewed-on: https://skia-review.googlesource.com/20270
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-19 23:21:49 +00:00
Mike Klein
5883a11862 remove defined(JUMPER) guards in _lowp.cpp
JUMPER is always defined in that file;
we never use it as a portable fallback.

Change-Id: Ic7caf726191599d4058adbf80084ede9f80676ee
Reviewed-on: https://skia-review.googlesource.com/20271
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-06-19 23:12:29 +00:00
Greg Daniel
78325c1d01 Restrict max levels for D3D Angle on GLPrograms test as well
BUG=skia:4717

Change-Id: I6111af2526042296c510318520c96c0ce5efc214
Reviewed-on: https://skia-review.googlesource.com/20284
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-19 21:03:34 +00:00
Florin Malita
74c3680eba Remove unused GradientShaderBase4fContext::fDither
Change-Id: I8f44cdaa8033e0a1fc45e1be446bf2d9a5bab507
Reviewed-on: https://skia-review.googlesource.com/20283
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-06-19 20:36:34 +00:00
Florin Malita
15200bd8b3 Remove SK_SUPPORT_LEGACY_GRADIENT_ALPHATRUNC dead code
The guard is no longer used in Chrome.

(https://chromium-review.googlesource.com/c/539715)

Change-Id: Ib78527a11002a2992af71adce4ed4b8261ed8ead
Reviewed-on: https://skia-review.googlesource.com/20281
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-19 20:06:03 +00:00
Florin Malita
ae7bb04f4c Remove non-F32 specializations of Sk4fGradient
We're only using Sk4fGradients for raster pipeline burst mode => dest is
always F32.

Change-Id: If8f0ce257fc9ef36da33602ffd61617628733cfc
Reviewed-on: https://skia-review.googlesource.com/20280
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2017-06-19 19:52:02 +00:00
Robert Phillips
159e3c6c92 Fix MDB regression
This CL: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) introduced a perf regression.

Cached textures can appear in different GrSurfaceProxies but have the same underlying GrTexture. 

Bug: 729233

Change-Id: Ifd7a9260a8a4535e8440c0d837bfdc445a921aa4
Reviewed-on: https://skia-review.googlesource.com/20223
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-06-19 16:40:43 +00:00
Ethan Nicholas
c352f3b89a fixed improved perlin noise effect on ANGLE
Bug: skia:6772
Change-Id: Id674d7f20ccd32fb79005d66351b5c49c51b3c90
Reviewed-on: https://skia-review.googlesource.com/20224
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-06-19 16:09:13 +00:00
Hal Canary
d6e6e6699a factor out hexadecimal constants.
Now we don't have to rely on the linker to de-duplicate
so many gHex[] constants.

Change-Id: Ia86d3a92648415afdb8d29499b4faded5ed05c7d
Reviewed-on: https://skia-review.googlesource.com/20180
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2017-06-19 15:56:33 +00:00
Greg Daniel
c64ee46a98 Add return to surface semaphore calls to indicate when we don't support them
Bug: skia:
Change-Id: I00118637bf6555278ca61707275ed60372de581d
Reviewed-on: https://skia-review.googlesource.com/20061
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2017-06-19 15:01:28 +00:00
Florin Malita
d4a70ee367 Disable dithering of const paints
... except for 565.

Change-Id: I8ab633661c54583478234a46942ef804eb74a619
Reviewed-on: https://skia-review.googlesource.com/19880
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2017-06-19 14:59:38 +00:00
Mike Reed
0bdaf05fc1 remove unused mode parameter from SkMergeImageFilter
Bug: skia:
Change-Id: Iaa46aaef130a337987c3528685f59c56387d4a7d
Reviewed-on: https://skia-review.googlesource.com/20210
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 14:01:56 +00:00
Mike Reed
ce6b4b004b imagefilters should take const array
Bug: skia:
Change-Id: I6f069c843ab27b41c4d1e87f76130e2ba2daf048
Reviewed-on: https://skia-review.googlesource.com/20211
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 03:12:07 +00:00
Mike Reed
ab51d1b297 Revert "remove unused TableMaskFilter"
This reverts commit d72b55b32c.

Reason for revert: used by android

Original change's description:
> remove unused TableMaskFilter
> 
> will revert if its needed in android
> 
> Bug: skia:
> Change-Id: I2ef777d31de4bbed6556d013054083ff6ff2cb8c
> Reviewed-on: https://skia-review.googlesource.com/20206
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=djsollen@google.com,reed@google.com,stani@google.com

Change-Id: I8ea36a912496e12c9fbfb73587d11e002252e8b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/20212
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 02:50:18 +00:00
Mike Reed
d72b55b32c remove unused TableMaskFilter
will revert if its needed in android

Bug: skia:
Change-Id: I2ef777d31de4bbed6556d013054083ff6ff2cb8c
Reviewed-on: https://skia-review.googlesource.com/20206
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-06-19 01:45:21 +00:00