Commit Graph

735 Commits

Author SHA1 Message Date
Derek Sollenberger
5a932166e8 Update the Android.bp to expose a static library
This CL will enable Android to statically link libskia into libhwui
while still exposing the symbols needed by other components of the
system.

Bug: b/31971097
Change-Id: Ib6c87331dbe456e247b46a34c38da4863dfe02f0
Reviewed-on: https://skia-review.googlesource.com/49766
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-09-25 13:29:53 +00:00
Mike Klein
85463e6ec4 Fix Android roll.
The GN->Android.bp script runs with target_cpu="none",
but Android needs SkJumper_generated.S.  Just skip it
explicitly for WASM.

Change-Id: I07b9761c591d48198460ce6300ed3bc9fd02a487
Reviewed-on: https://skia-review.googlesource.com/49903
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-21 20:31:06 +00:00
Kevin Lubick
ebf648e57a [WASM] Add POC compile bot for WebAssembly
Fix core.gni to use not use Assembler for none cpu.

Right now, there are no outputs because we aren't compiling
dm or nanobench.  However, this still compiles the skia
library and creates two executables, so it's a good canary
for a real WASM build.

Additional note: the two executables in question don't draw
anything to the screen via GL, which is still not possible with
Skia+WASM.

Bug: skia:
Change-Id: I0d767467e94e40d01070e34223dd90e96f1c96f2
Reviewed-on: https://skia-review.googlesource.com/49540
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Eric Boren <borenet@google.com>
2017-09-21 18:24:43 +00:00
Robert Phillips
ae7d3f3992 Add native caching of uniquely keyed GrTextureProxies (take 2)
TBR=bsalomon@google.com

Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141
Reviewed-on: https://skia-review.googlesource.com/49543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-21 13:52:10 +00:00
Robert Phillips
76d640d14e Revert "Add native caching of uniquely keyed GrTextureProxies"
This reverts commit d4f100dad9.

Reason for revert: ASAN

Original change's description:
> Add native caching of uniquely keyed GrTextureProxies
> 
> Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
> Reviewed-on: https://skia-review.googlesource.com/48300
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/49442
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-20 20:50:50 +00:00
Robert Phillips
d4f100dad9 Add native caching of uniquely keyed GrTextureProxies
Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
Reviewed-on: https://skia-review.googlesource.com/48300
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-09-20 20:21:50 +00:00
Nico Weber
6492afa797 Disable SkJumper assembly in cross builds for now.
Bug: chromium:762167
Change-Id: Ia23f6dbfc0466aef4ca9d1a5b9ff343d79dc83bb
Reviewed-on: https://skia-review.googlesource.com/47460
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-16 00:28:48 +00:00
Mike Klein
9b2f69b0aa grand unifried lowp stages
I have text_16_AA_FF -> 8888 (forcing RP) faster than head now on my
laptop.  I'm feeling confident that we can make this perform well.

After looking at performance a bit more today, it looks like everything
is within what I'd consider comparable in performance, especially on
ARM.  On x86-64 it looks like big bulk blits get a little slower and
small mask blits get a little faster.

Quality looks good, and maybe improved for 565.

There are fewer platform-specific differences now in _lowp, and I think
they're few enough now that we could even consider completing the
unification by folding the 8-bit and float code together.  Rename
"div255()" to "rebias()", slap on a few coats of paint...

Guarded for Chrome with SK_JUMPER_LEGACY_LOWP.

Change-Id: I36309c07cf736f3cb31952cca66030ad56026318
Reviewed-on: https://skia-review.googlesource.com/45982
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-14 12:16:51 +00:00
Brian Osman
b433c5691b Adjust GPU YUV -> RGB (JPG) conversion
All of the published coefficients assume math is being done on bytes, and
that 128 is the encoding of 0 (in the biased Cb and Cr values). When
sampling an A8 texture, though, GPUs typically decode as byte/255. Thus,
128 ends up slightly larger than 0.5. To fix this, just adjust the bias
terms to be scaled by 128/255, rather than 0.5.

I also changed some of the other coefficients to be higher precision,
based on the values in ITU-T T.871.

This originally surfaced as a Chromium bug where an all-black JPG decoded
to (1/255, 0, 1/255) on GPU. I've added a GM that encodes a color cube to
JPG, then draws from the encoded data. GPU and CPU (libjpeg) still
disagree in many cases, but the newer version performs much better
(diffing gl and 8888 configs):

Previously: 95.2% of pixels differ, max diff of 2, avg diff of 1
Now       : 65.4% of pixels differ, max diff of 1, avg diff of 0

Bug: skia:7038 chromium:763605
Change-Id: I4801db9f6e2fc4d4109eb5e27c9499f214084d38
Reviewed-on: https://skia-review.googlesource.com/45842
Reviewed-by: Leon Scroggins <scroggo@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-09-13 14:10:50 +00:00
Ethan Nicholas
5b5f096a03 Revert "Revert "Switch to the new SkSL lexer.""
This reverts commit 358515491a.

Bug: skia:
Change-Id: I013fac0ed83774d8ae7c6ee6819045cab37f5e97
Reviewed-on: https://skia-review.googlesource.com/45180
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-11 21:45:20 +00:00
Brian Osman
5d034744ab Do software clip mask generation with worker threads
Also refactor the prepare callback stuff to share logic
between software path rendering and clip mask generation.

Bug: skia:
Change-Id: I0c56c6df8703eb59d2d49a4c3985bd4f5ef20f01
Reviewed-on: https://skia-review.googlesource.com/44421
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-09-11 17:58:00 +00:00
Ethan Nicholas
358515491a Revert "Switch to the new SkSL lexer."
This reverts commit c576e93d17.

Reason for revert: ASAN failures

Original change's description:
> Switch to the new SkSL lexer.
> 
> This completely replaces flex with a new in-house lexical analyzer generator,
> which we have done for performance and memory usage reasons. Flex requires us
> to copy strings every time we need the text of a token, whereas this new lexer
> allows us to handle strings as a (non-null-terminated) pointer and length
> everywhere, eliminating most string copies.
> 
> Bug: skia:
> Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca
> Reviewed-on: https://skia-review.googlesource.com/39780
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>

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

Change-Id: If27b750a5f696d06a6bcffed12fe9f0598e084a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/44881
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-11 16:34:02 +00:00
Ethan Nicholas
c576e93d17 Switch to the new SkSL lexer.
This completely replaces flex with a new in-house lexical analyzer generator,
which we have done for performance and memory usage reasons. Flex requires us
to copy strings every time we need the text of a token, whereas this new lexer
allows us to handle strings as a (non-null-terminated) pointer and length
everywhere, eliminating most string copies.

Bug: skia:
Change-Id: I2add26efc9e20cb699520e82abcf713af3968aca
Reviewed-on: https://skia-review.googlesource.com/39780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2017-09-11 16:17:00 +00:00
Mike Klein
bc7b1eab6c update clang_linux package to Clang 5
Disable some new warning flags to get us building.

Change-Id: I10299d667b06fb61d03e52329883c634bd42f45c
Reviewed-on: https://skia-review.googlesource.com/44341
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-09-10 13:20:49 +00:00
Brian Salomon
2bbdcc44c6 Rework GrSamplerParams to be more compact and use its own wrap mode enum.
The main change is to make GrSamplerParams smaller by making its enums have byte-sized underlying types. The rest is cosmetic.

Change-Id: Ib71ea50612d24619a85e463826c6b8dfb9b445e3
Reviewed-on: https://skia-review.googlesource.com/43200
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-09-07 16:58:31 +00:00
Chris Dalton
c1e59638b4 CCPR: Rewrite path parsing
Creates a GrCCPRGeometry class that chops contours up into simple
segments that ccpr can render, and rewrites the GPU buffer creation to
be able to handle arbitrary lengths of ccpr geometry.

Bug: skia:
Change-Id: Iaa173a02729e177b0ed7ef7fbb9195d349be689d
Reviewed-on: https://skia-review.googlesource.com/41963
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2017-09-05 22:41:12 +00:00
Robert Phillips
a6d2d708d7 Add gn plumbing for mdbviz tool
Change-Id: I06e6b63c2742da069f48ff5d7defafc63a485af7
Reviewed-on: https://skia-review.googlesource.com/41842
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-09-05 13:57:44 +00:00
Jim Van Verth
dbb24efcc5 Get viewer running on iOS
Bug: skia:
Change-Id: Ic8b25ca2ecf51cfc190ac01bc9282396905a33b3
Reviewed-on: https://skia-review.googlesource.com/40862
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-09-01 17:30:57 +00:00
Robert Phillips
cb2e235e6f Reduce stencil buffer clearing
TBR=bsalomon@google.com
Bug: skia:6953
Change-Id: I079f90711297ee290f2d4011cfcb18b764554deb
Reviewed-on: https://skia-review.googlesource.com/40691
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2017-08-30 21:17:36 +00:00
Robert Phillips
ad8a43f769 DeferredDisplayList API proposal
Chrome would like to perform cpu-side preprocessing for gpu draws in parallel. 
They do not want to go through a picture (since they have their own display list format).


The general idea is that we add a new SkDeferredDisplayListRecorder class to
perform all of Ganesh's cpu-side preprocessing ahead of time and in parallel.

The SkDDLRecorder operates like SkPictureRecorder. The user can get an SkCanvas
from the SkDDLRecorder and feed it draw operations. Once finished, the user
calls 'detach' to get an SkDeferredDisplayList. All the work up to and 
including the 'detach' call can be done in parallel and will not touch
the GPU. To actually get pixels the client must call SkSurface::draw(SkDDL)
on an SkSurface that is "compatible" with the surface characterization
initially given to the SkDDLMaker.

The surface characterization contains the minimum amount of information Ganesh needs 
to know about the ultimate destination in order to perform its cpu-side work
(i.e., caps, width, height, config).



Change-Id: I75faa483ab5a6b779c8de56ea56b9d90b990f43a
Reviewed-on: https://skia-review.googlesource.com/30140
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-30 19:25:47 +00:00
Jim Van Verth
ecfed2beaf Add iOS support for SkiaSDLExample.
Change-Id: Ib8f4d6c41356cf0fe2e14b7bff7713d107eaa01f
Reviewed-on: https://skia-review.googlesource.com/40687
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-08-30 18:56:46 +00:00
Mike Klein
1b4602bd9b ok, backtrace support on Android
This adds a fallback backtracer for use on Android where <execinfo.h>
ins't present, instead using <unwind.h> to unwind and <dlfcn.h> to
lookup function names and addresses.

lockf() wasn't available until NDK API 24, so I've just no-op'd file
locking on older targets.  I tried switching from lockf() to flock(),
but flock() didn't see to _do_ anything, neither on Android nor on my
Mac laptop.  I think I should be able to use the lower-level fcntl()
APIs to restore file locking uniformly in a follow-up.  The upshot is
until then, we'll have interlaced logs and stack traces on Android
devices unless you set ndk_api=24 in GN.

We need to add a couple build flags to make backtraces useful:

   * -funwind-tables makes the call to _Unwind_Backtrace() actually
     traverse the call stack.  This is a small extra binary size cost.
   * -rdynamic makes symbols linked into the main executable visible
     to dladdr().  We do this on Linux already for the same reason.

Here's an example where I made aaxfermodes call SK_ABORT():

    650 ok, 1 crashed
    caught signal SIGABRT while running 'aaxfermodes'
        0x76ed936288 [unknown]+308
        0x76eec014e0 [unknown]+510811706592
        0x76ed367b2c tgkill+8
        0x76ed364f50 pthread_kill+68
        0x76ed31ff5c raise+28
        0x76ed318814 abort+56
        0x76edebd070 sk_out_of_memory()+12
        0x76ed99f664 AAXfermodesGM::draw_pass(SkCanvas*, AAXfermodesGM::DrawingPass)+96
        0x76ed99f4e4 AAXfermodesGM::onDraw(SkCanvas*)+36
        0x76ed9e8550 skiagm::GM::drawContent(SkCanvas*)+224
        0x76ed9e82ac skiagm::GM::draw(SkCanvas*)+288
        0x76ed93b10c GMStream::GMSrc::draw(SkCanvas*)+96
        0x76ed937b08 SWDst::draw(Src*)+284
        0x76ed936ca0 [unknown]+112
        0x76ed939b4c ForkEngine::spawn(std::function<Status ()>)+88
        0x76ed934d00 main+2200
        0x76ed316598 __libc_init+92
        0x76ed93434c [unknown]+510791992140

Change-Id: Ica4849d99a3b97f48d778f4c15a7fa36275b8133
Reviewed-on: https://skia-review.googlesource.com/40802
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-30 17:50:07 +00:00
Mike Klein
9d7e57d509 Revert "Revert "8-bit jumper on armv8""
This reverts commit 6d13575108.

Now with guards for "errors" like this:
    external/skia/src/jumper/SkJumper_stages_8bit.cpp:240:50: error:
    'memcpy' called with size bigger than buffer
                case 12: memcpy(&v, src, 12*sizeof(T)); break;

This code is unreachable and generally removed by Clang's optimizer
anyway... as far as I can tell the code generation diff is arbitrary.

Change-Id: I6216567caaa6166f71258bd25343a09e93892a10
Reviewed-on: https://skia-review.googlesource.com/39961
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-29 17:04:47 +00:00
Derek Sollenberger
6d13575108 Revert "8-bit jumper on armv8"
This reverts commit 08133583d5.

Reason for revert: Blocking Android Autoroller on compile error.

Original change's description:
> 8-bit jumper on armv8
> 
> The GM diffs are all minor and what you'd expect.
> 
> I did a quick performance sanity check, which also looks fine.
> 
>   $ out/ok bench rp filter:search=Modulate
>     [blendmode_rect_Modulate] 30.2ms  @0  32ms    @95 32ms    @100
>     [blendmode_mask_Modulate] 12.6ms  @0  12.6ms  @95 14.5ms  @100
>   ~~~>
>     [blendmode_rect_Modulate] 11.2ms  @0  11.7ms  @95 12.4ms  @100
>     [blendmode_mask_Modulate] 10.5ms  @0  23.6ms  @95 23.9ms  @100
> 
> This isn't even really the fastest we can make 8-bit go on ARMv8;
> it's actually much more natural to work de-interlaced there.  Lots
> of room to follow up.
> 
> Change-Id: I86b1099f6742bcb0b8b4fa153e85eaba9567cbf7
> Reviewed-on: https://skia-review.googlesource.com/39740
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

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

Change-Id: I71425d8b7fbb66be5cb50025871dd81358111da4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/39980
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-08-29 12:38:02 +00:00
Robert Phillips
6b47c7d19f Store discard request on the opList and remove GrDiscardOp (take 3)
Change-Id: Ided58e0110b0b4e611ab65f46c18a6ae2b85f1bc
Reviewed-on: https://skia-review.googlesource.com/39340
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-29 11:43:01 +00:00
Mike Klein
08133583d5 8-bit jumper on armv8
The GM diffs are all minor and what you'd expect.

I did a quick performance sanity check, which also looks fine.

  $ out/ok bench rp filter:search=Modulate
    [blendmode_rect_Modulate] 30.2ms  @0  32ms    @95 32ms    @100
    [blendmode_mask_Modulate] 12.6ms  @0  12.6ms  @95 14.5ms  @100
  ~~~>
    [blendmode_rect_Modulate] 11.2ms  @0  11.7ms  @95 12.4ms  @100
    [blendmode_mask_Modulate] 10.5ms  @0  23.6ms  @95 23.9ms  @100

This isn't even really the fastest we can make 8-bit go on ARMv8;
it's actually much more natural to work de-interlaced there.  Lots
of room to follow up.

Change-Id: I86b1099f6742bcb0b8b4fa153e85eaba9567cbf7
Reviewed-on: https://skia-review.googlesource.com/39740
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-28 21:04:07 +00:00
Brian Salomon
3416969605 Revert "Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""""
This reverts commit a184ac7e0c.

Change-Id: I2a4a1b713fd998ba33a5f85a34be1645438a7ac9
Reviewed-on: https://skia-review.googlesource.com/39400
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-28 20:02:16 +00:00
Chris Dalton
419a94da02 Add a GrCCPRGeometry file
Enough ccpr-specific geometry code is in flight that it feels like it
should have its own file.

Bug: skia:
Change-Id: I99ef620a7dc35178cf774b3a4ec6159d46f401c7
Reviewed-on: https://skia-review.googlesource.com/39162
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2017-08-28 16:53:27 +00:00
Robert Phillips
445b557361 Revert "Store discard request on the opList and remove GrDiscardOp (take 2)"
This reverts commit 9b0b32fda4.

Reason for revert: Android_Vulkan Gold images are broken

Original change's description:
> Store discard request on the opList and remove GrDiscardOp (take 2)
> 
> Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e
> Reviewed-on: https://skia-review.googlesource.com/33460
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,robertphillips@google.com

Change-Id: I1470d88c2407864da8b6ebdc119c8c2466a2a6c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/39000
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 20:36:39 +00:00
Robert Phillips
9b0b32fda4 Store discard request on the opList and remove GrDiscardOp (take 2)
Change-Id: I2f1bd6f8547895cc8d66cfde42d7d890441d198e
Reviewed-on: https://skia-review.googlesource.com/33460
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-25 18:52:18 +00:00
Brian Salomon
a184ac7e0c Revert "Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible"""
This reverts commit 20af6d12ee.

Performance regressions on Android and Flutter
Change-Id: If70edbe85aa251f298eddf18a89ba2cf56ed94fb
Reviewed-on: https://skia-review.googlesource.com/37340
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-22 21:36:40 +00:00
Sadrul Habib Chowdhury
4189d1b8b7 Add SK_API to SkOverdrawCanvas and SkOverdrawColorFilter.
The SkiaRenderer in chromium is going to use the overdraw canvas and
filter for measuring overdraw. Move these headers out of src/ into
include/.

Bug: chromium:704285
Change-Id: I2abb1671b73e3d26552462cf700340a7e3b874f0
Reviewed-on: https://skia-review.googlesource.com/36160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-18 16:53:49 +00:00
Leon Scroggins III
04be2b54ba Reland "skia: add heif decoding support"
This reverts commit db68a426b6.

Fixes errors in Android and Google3

Bug: b/64077740
Change-Id: I3d2bb1223e4d8ba912ea2b88144aeecc487fce1a
Reviewed-on: https://skia-review.googlesource.com/35701
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2017-08-18 14:40:29 +00:00
Brian Salomon
20af6d12ee Revert "Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible""
This reverts commit ceef4fb5c4.

Bug: skia:
Change-Id: I50b738169b4cf9e06cbe0b5fad0234b506717b66
Reviewed-on: https://skia-review.googlesource.com/36201
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-18 14:37:09 +00:00
Greg Daniel
51fd6d85aa Add GrMtlRenderTarget class
Adds basic support for creating non-msaa pure render targets.

Bug: skia:
Change-Id: I63d2d474b86fc0ff5d8ee7757c08abbfd5e6c6ef
Reviewed-on: https://skia-review.googlesource.com/31980
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-18 14:01:39 +00:00
Brian Salomon
ceef4fb5c4 Revert "Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible"
This reverts commit 3fd295550f.

Reason for revert: breaking things

Original change's description:
> Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible
> 
> This op draws a texture rectangle in src over blending with no edge antialiasing. It less powerful than NonAAFillRectOp/GrPaint but has less CPU overhead.
> 
> Change-Id: Ia6107bb67c1c2a83de14c665aff64b0de2750fba
> Reviewed-on: https://skia-review.googlesource.com/33802
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=djsollen@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I9cdbeeac15b17d2d6b3385560ed826397c0373c6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/36220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2017-08-18 13:06:00 +00:00
Brian Salomon
3fd295550f Add GrTextureOp and use to implement SkGpuDevice::drawImage[Rect]() when possible
This op draws a texture rectangle in src over blending with no edge antialiasing. It less powerful than NonAAFillRectOp/GrPaint but has less CPU overhead.

Change-Id: Ia6107bb67c1c2a83de14c665aff64b0de2750fba
Reviewed-on: https://skia-review.googlesource.com/33802
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2017-08-18 12:47:28 +00:00
Mike Klein
db68a426b6 Revert "skia: add heif decoding support"
This reverts commit c2a954290d.

Reason for revert: both Android and Google3 rolls cannot compile.  Android cannot cast std::unique_ptr<T> to T*, Google3 cannot find HeifDecoderAPI.h.

Original change's description:
> skia: add heif decoding support
> 
> Bug: b/64077740
> Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
> Reviewed-on: https://skia-review.googlesource.com/35123
> Reviewed-by: Chong Zhang <chz@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>
> Commit-Queue: Chong Zhang <chz@google.com>
> Commit-Queue: Leon Scroggins <scroggo@google.com>

TBR=scroggo@google.com,chz@google.com

Change-Id: Id98f025e63daec50408186000453d1695170f7a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/64077740
Reviewed-on: https://skia-review.googlesource.com/35741
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-17 13:34:07 +00:00
Mike Klein
a26d219a92 Revert "turn exceptions on in test tools on Android"
This reverts commit c902ff8fc8.

Reason for revert: not gonna do this afterall.

Original change's description:
> turn exceptions on in test tools on Android
> 
> This is a follow-up to https://skia-review.googlesource.com/c/34982
> which did the same for locally built test tools.
> 
> Change-Id: Id97841a64521fda99cb952a1a751ffc10f636f53
> Reviewed-on: https://skia-review.googlesource.com/35162
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Leon Scroggins <scroggo@google.com>

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

Change-Id: Iae6c817d625989e3a427dbc18328477382d892bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35524
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-16 21:39:27 +00:00
Chong Zhang
c2a954290d skia: add heif decoding support
Bug: b/64077740
Change-Id: I11e0243bcc4c21c0aa5aa29a719dd0fcba7ae6f7
Reviewed-on: https://skia-review.googlesource.com/35123
Reviewed-by: Chong Zhang <chz@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Chong Zhang <chz@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-16 20:22:55 +00:00
Mike Klein
c902ff8fc8 turn exceptions on in test tools on Android
This is a follow-up to https://skia-review.googlesource.com/c/34982
which did the same for locally built test tools.

Change-Id: Id97841a64521fda99cb952a1a751ffc10f636f53
Reviewed-on: https://skia-review.googlesource.com/35162
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
2017-08-16 13:55:38 +00:00
Robert Phillips
4c72b266da Add Chinese fling sample
Change-Id: Id27877c4d816ec83460f50a3a0d9cc0299ea6849
Reviewed-on: https://skia-review.googlesource.com/34780
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-16 13:45:57 +00:00
Mike Klein
228276dabf Revert "Turn on exceptions in test tools."
This reverts commit c667dff58d.

Reason for revert: temporary while I fix Android, Google3.

Original change's description:
> Turn on exceptions in test tools.
> 
> This allows us to test things that, e.g., throw std::bad_alloc.
> 
> Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
> Reviewed-on: https://skia-review.googlesource.com/34982
> Reviewed-by: Herb Derby <herb@google.com>
> Commit-Queue: Mike Klein <mtklein@chromium.org>

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

Change-Id: Iafdc34c5f70f99f7df3cd0bbad65eed0828453a1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/35081
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2017-08-16 13:20:29 +00:00
Mike Klein
c667dff58d Turn on exceptions in test tools.
This allows us to test things that, e.g., throw std::bad_alloc.

Change-Id: I6409159b89f1d93d403b1a1f40539cf2531a8b68
Reviewed-on: https://skia-review.googlesource.com/34982
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
2017-08-16 01:49:07 +00:00
Herb Derby
df33fefe14 Test blur small radii and text.
BUG=chromium:745290

Change-Id: I78cabf988115598e14a7ce39faf96e3a697a1a8f
Reviewed-on: https://skia-review.googlesource.com/34382
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-08-14 19:16:55 +00:00
Herb Derby
35ae65d5d0 SkSafeMath for tracking size_t overflow
Do multiply (mul) and add while tracking that the
calculation does not overflow, which can be checked with
ok().

The new unit test shows a couple examples.

Author:  Herb Derby <herb@google.com>
Change-Id: I7e67671d2488d67f21d47d9618736a6bae8f23c3
Reviewed-on: https://skia-review.googlesource.com/33721
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
2017-08-11 19:23:06 +00:00
Leon Scroggins III
f7332d3238 Build support for 32-bit armv8-a
Since both armv7-a-neon and 32-bit armv8-a have NEON, we can treat them
the same in Android.bp.

Bug: b/62895439

Corresponds to https://android-review.googlesource.com/c/423660/3
This change will generate the change to Android.bp described there.

Change-Id: Icae9b5b79093d6f2886da39771d4fbe901be237a
Reviewed-on: https://skia-review.googlesource.com/33000
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-08-10 17:31:25 +00:00
Brian Osman
71a1889a14 Revert "Revert "GrContext::dump that produces JSON formatted output""
This reverts commit 0f450acd76.

Bug: skia:
Change-Id: I97428fbbc6d82bf8b186ec5fdbf1a939c00e4126
Reviewed-on: https://skia-review.googlesource.com/32726
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-10 15:42:25 +00:00
Brian Osman
0f450acd76 Revert "GrContext::dump that produces JSON formatted output"
This reverts commit 175af0d011.

Reason for revert: Chrome doesn't know about portable format specifiers. Sigh.

Original change's description:
> GrContext::dump that produces JSON formatted output
> 
> Includes caps, GL strings, and extensions
> 
> Bug: skia:
> Change-Id: I1e8b3dd50fb68357f9de8ca6149cf65443d027ef
> Reviewed-on: https://skia-review.googlesource.com/32340
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: Ie280b25275725f0661da7541f54ed62897abb82f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/32861
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-08-09 20:47:49 +00:00
Robert Phillips
54190c42dd Revert "Store discard request on the opList and remove GrDiscardOp"
This reverts commit b681a0f1b0.

Reason for revert: Seems to be messing up some MacMini & Nexus7 bots
Original change's description:
> Store discard request on the opList and remove GrDiscardOp
> 
> Change-Id: Ic1f76bb91c16b23df1fe71c07a4d5ad5abf1dc26
> Reviewed-on: https://skia-review.googlesource.com/32640
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I8a89fae7bb11791bd023d7444a074bb34d006fd0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/32704
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2017-08-09 20:10:06 +00:00