Commit Graph

539 Commits

Author SHA1 Message Date
Leon Scroggins III
c41a5f58b2 Generate Android Framework host-side Skia (linux)
Bug: b/118742766

Update gn_to_bp to write an Android.bp file that will build a host-side
Skia library.

Switch some methods from SK_BUILD_FOR_ANDROID to
SK_BUILD_FOR_ANDROID_FRAMEWORK.

Prior reviews were done at ag/5482397.

gn_to_bp.py:
- Run GN twice - once for android and once for linux
- Disable GPU (depends on a to-be-written host side GL target) and HEIF
  (which relies on Android hardware) on linux
  - TODO: Turn on GPU on linux
- Split sources into everywhere, android-only, and linux-only.
  It seems that Android.bp does not allow using the same cpp
  file in multiple targets.
  - note that we currently *only* divide out the sources. The cflags are
    the same (except for a couple manual ones) and include
    directories are mostly the same (again, except for manual ones).
    Android has a "gpu" include directory, which I don't expect to
    make a difference to the linux build, which isn't using GPU (yet).
- Use the same "custom empty" font manager on the host as on Android
- Write separate SkUserConfig files; one for android and one for linux.
  This allows libskia to force libraries that use it to use the right
  defines by setting export_include_dirs.
- Add extra checks to SkUserConfig.h to ensure we have only the
  appropriate SK_BUILD_FOR macro defined
- Add host_supported: true for libskia

gn_to_bp_utils.py:
- Switch SkUserConfig.h from include guards to pragma once so it is
  easier to append to the end. This matches how Android generally
  includes headers.

BUILD.gn:
- Add skia_use_fixed_gamma_text so host build can use the same SK_GAMMA
  defines as the device.

SkPreConfig.h:
- Stop making SK_BUILD_FOR_ANDROID_FRAMEWORK imply SK_BUILD_FOR_ANDROID.
  The host build needs the former defined but not the latter.

SkRegion.cpp/.h:
- Make toString() SK_BUILD_FOR_ANDROID_FRAMEWORK so it can be called on
  the host.

SkCamera.h/.cpp:
- Switch methods to SK_BUILD_FOR_ANDROID_FRAMEWORK so they can be called
  on the host.
- Make getCameraLocation*() const. They are logically const, and this
  allows removing a const_cast + TODO in hwui.

Change-Id: I771f825d06380e01c0488fd1c00df1d8a2454dc0
Reviewed-on: https://skia-review.googlesource.com/c/171231
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2018-11-19 17:51:32 +00:00
Mike Reed
3a42ec0ee7 hide the SkPaint::Align enum entirely
Bug: skia:2664
Change-Id: I080b015dbcb3a3cd73bb6847f3243a996d5f7b7d
Reviewed-on: https://skia-review.googlesource.com/c/166282
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-10-30 17:26:47 +00:00
Mike Reed
331ccfd8e4 add textutils
These are meant to enable several things (eventually)

- fission Align off of paint
- fission TextEncoding off of paint
- fission SkFont of of paint

The first one is explicitly enabled here. The others will (I plan) follow later.

The final state of the world (the goal)
- paint has no font-ish parameters (no typeface or size)
- font has no paint-ish parameters (no aa or lcd)
- neither has alignment or encoding

Bug: skia:8493, skia:8501
Change-Id: I5fcb945b6bcab30ef5e7019dfccb682661f56230
Reviewed-on: https://skia-review.googlesource.com/c/165061
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-25 17:50:20 +00:00
Brian Salomon
d7065e72da Revert "Revert "Add experimental API to draw a set of SkImages in one SkCanvas call.""
This reverts commit 8d5b41b553.

Bug: skia:8444
Change-Id: I29b52c6fe9475c6113ec954b7918cf591111846c
Reviewed-on: https://skia-review.googlesource.com/c/161627
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-12 16:09:21 +00:00
Brian Salomon
8d5b41b553 Revert "Add experimental API to draw a set of SkImages in one SkCanvas call."
This reverts commit 0a0304c426.

Reason for revert: Breaking metal

Original change's description:
> Add experimental API to draw a set of SkImages in one SkCanvas call.
> 
> The client provides a src and dst rect for each image as well as
> a bitfield that indicates whether each edge of the image should be
> antialiased. This per-edge AA is useful for tiled compositors.
> 
> Rather than take a full SkPaint this API only takes an alpha, a filter
> quality (which is pinned to kLow), and a blend mode. This is a likely
> point of future evolution.
> 
> Currently the API is only fully implemented for kSrcOver on the GPU
> backend. With other blend modes or on other backends AA will be ignored
> for images that do not have all four edge AA flags set.
> 
> BUG: skia:8444
> 
> Change-Id: I143998dda8ad6a25f64e18cd600392ba553030ac
> Reviewed-on: https://skia-review.googlesource.com/c/159062
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

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

Change-Id: I815baaeee5de9c6722cf2b9d071a8e2f7c1b6a96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/161622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-10-12 14:25:06 +00:00
Brian Salomon
0a0304c426 Add experimental API to draw a set of SkImages in one SkCanvas call.
The client provides a src and dst rect for each image as well as
a bitfield that indicates whether each edge of the image should be
antialiased. This per-edge AA is useful for tiled compositors.

Rather than take a full SkPaint this API only takes an alpha, a filter
quality (which is pinned to kLow), and a blend mode. This is a likely
point of future evolution.

Currently the API is only fully implemented for kSrcOver on the GPU
backend. With other blend modes or on other backends AA will be ignored
for images that do not have all four edge AA flags set.

BUG: skia:8444

Change-Id: I143998dda8ad6a25f64e18cd600392ba553030ac
Reviewed-on: https://skia-review.googlesource.com/c/159062
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-12 13:14:24 +00:00
Mike Reed
964aedb5e3 play with animated gif
Bug: skia:
Change-Id: If86314cda6aa84f4824958cca30cde88a78d4b59
Reviewed-on: https://skia-review.googlesource.com/c/158562
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-10-03 14:43:18 +00:00
Mike Reed
1eb9af9029 delete textonpath code -- not used anywhere
Bug: skia:
Change-Id: Ib645f7c140f87123429170a0bf6f7ed86ce53b3f
Reviewed-on: https://skia-review.googlesource.com/158224
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-10-01 16:52:32 +00:00
Mike Klein
d30937a499 remove SkRandom::next64()
It appears to be unused, and exploits undefined behavior.

Change-Id: I935de36cd2f07e811958b1696afa62d410e1cb5f
Reviewed-on: https://skia-review.googlesource.com/152123
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
2018-09-06 12:46:46 +00:00
Mike Klein
5595f6ef0e clean up S16CPU
S16CPU is used only inside Skia, and only sparsely.

    - SkRandom::nextS16() and nextU16() were used rarely enough
      that it makes things simpler to get rid of them.
    - SkAlphaBlend255() was unused outside tests.
    - SkIntToFDot6() looks like it really wants to take an int.

Change-Id: I3ca773beb6c04c691947d4602f27c819b660554d
Reviewed-on: https://skia-review.googlesource.com/151700
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-05 15:48:04 +00:00
Mike Reed
a62d036586 textonpath no longer in canvas
Prev behavior available via utils SkDrawTextOnPath

Bug: skia:7554
Change-Id: I3d71963c632cc947e418757bb83cdc18ec3b184e
Reviewed-on: https://skia-review.googlesource.com/150123
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-08-29 14:04:45 +00:00
Mike Reed
7c8d2e940e don't support virtual onDrawTextOnPath
Bug: skia:7554
Change-Id: Ia8c663918fea7bc91f3474d1c94e7a1c5536a1d4
Reviewed-on: https://skia-review.googlesource.com/149805
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-08-28 16:54:18 +00:00
Mike Reed
0fdc53f9ff textonpath util
Bug: skia:7554
Change-Id: Ifff3030f9d7be24146b5230bbf0e47f73000adfd
Reviewed-on: https://skia-review.googlesource.com/141460
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-08-27 18:01:21 +00:00
Ruiqi Mao
c97a339cd6 added optimizations to speed up skinning
Docs-Preview: https://skia.org/?cl=145148
Bug: skia:
Change-Id: If27722105a1e8999f6440b6fd4044cc1f327827e
Reviewed-on: https://skia-review.googlesource.com/145148
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-08-15 15:52:29 +00:00
Ben Wagner
d5148e3314 Move SkNoncopyable to include/private.
Change-Id: I62f60ea52faeebddecacf03d9429ac3f7c516b8e
Reviewed-on: https://skia-review.googlesource.com/141823
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-07-17 21:39:51 +00:00
Ben Wagner
2c312c4f58 Remove SkDrawFilter.
Change-Id: I0204a9522e828c87bb7c6c20ae34ce51161442af
Reviewed-on: https://skia-review.googlesource.com/137895
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-12 02:36:44 +00:00
Ruiqi Mao
f510149da8 skeletal animation support added to API and software backend
SkCanvas::drawVertices now supports overloads that take an array of bone deformation matrices.
SkVertices::MakeCopy and SkVertices::Builder now support two additional optional attributes, boneIndices and boneWeights.

Bug: skia:
Change-Id: I30a3b11691e7cdb13924907cc1401ff86d127aea
Reviewed-on: https://skia-review.googlesource.com/137221
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Ruiqi Mao <ruiqimao@google.com>
2018-06-29 19:34:28 +00:00
Cary Clark
a6c75fda12 make includes available for flutter
temporarily copy SkBase64.h until flutter can
move to using the one in include/util

Copy TRACE_EVENT_PHASE_* into its own file
in include/util; the only part of SkTraceEventCommon.h
that flutter needs.

R=reed@google.com,chinmaygarde@google.com

Bug: skia:7741
Change-Id: I8671edbf1d6b6b868bde98aa9ad04abcb85a43a0
Reviewed-on: https://skia-review.googlesource.com/135870
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Cary Clark <caryclark@skia.org>
2018-06-21 18:12:47 +00:00
ziadb
bceddbcb72 SkAR: drawing text, shapes, rotation modes enabled, translating objects
To run this app, you need to create an out directory as such:
bin/gn gen out/arm64 --args='ndk="NDK_PATH" target_cpu="ABI"'

For now, the only supported ABI is arm64

Change-Id: I012f0c6a0550d80a0028f42177d5ca72974d848d
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/130980
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ziad Ben Hadj-Alouane <ziadb@google.com>
2018-06-19 19:10:54 +00:00
Hal Canary
c640d0dc96 Revert "Revert "SkTypes: extract SkTo""
This reverts commit fdcfb8b7c2.

> Original change's description:
> > SkTypes: extract SkTo
> >
> > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> > Reviewed-on: https://skia-review.googlesource.com/133620
> > Reviewed-by: Mike Klein <mtklein@google.com>

Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa
Reviewed-on: https://skia-review.googlesource.com/134506
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-14 14:55:17 +00:00
Hal Canary
fdcfb8b7c2 Revert "SkTypes: extract SkTo"
This reverts commit 2a2f675926.

Reason for revert: this appears to be what is holding up the Chrome roll.

Original change's description:
> SkTypes: extract SkTo
>
> Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
> Reviewed-on: https://skia-review.googlesource.com/133620
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,halcanary@google.com

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae
Reviewed-on: https://skia-review.googlesource.com/134504
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-06-13 13:45:47 +00:00
Hal Canary
2a2f675926 SkTypes: extract SkTo
Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
Reviewed-on: https://skia-review.googlesource.com/133620
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-12 15:03:21 +00:00
Mike Klein
692e29ebcd remove unused parts of SkTypes.h
Lots of completely unused bits and bobs removed.

I've decided SK_SUPPORT_UNITTEST and its single use are not
very compelling.

tests/CPlusPlusEleven was the only user of Sk32ToBool(),
and no longer generally needed.

Change-Id: I3ee75560f1e1e1cf5ad89ee7df8d7694b5dffdb3
Reviewed-on: https://skia-review.googlesource.com/133622
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-08 23:53:57 +00:00
Herb Derby
1724db1658 Remove SkTextBox
Change-Id: I697135475fa9c1b7e803500b743f10c3877c1e10
Reviewed-on: https://skia-review.googlesource.com/129560
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-05-22 17:50:35 +00:00
Herb Derby
efe39bcfb8 Take sk_sp<SkDevice> instead of SkDevice*
Change-Id: I0b296bf5b80adc19758a3dc99160be9d2ed05680
Reviewed-on: https://skia-review.googlesource.com/125160
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Herb Derby <herb@google.com>
2018-05-02 14:46:17 +00:00
Herb Derby
76d69b44bb Apply filterTextFlags so the fonts are the same.
In order to apply filterTextFlags correctly, teach
TrackLayerDevice how to process save and restore layers.

At this point, I don't see any other traffic than the
cache warming traffic.

This code has a performance between 82% and 105% of just
drawing the picture.

BUG=skia:7515

Change-Id: I44736be46884f18b6d120d4b5ca582f34dbdff0f
Reviewed-on: https://skia-review.googlesource.com/114641
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2018-03-16 20:28:36 +00:00
Brian Osman
46fe9c7f6c Remove SkDumpCanvas
Bug: skia:
Change-Id: I045e84f154d0294121a4c1966dcf47c0d7e52934
Reviewed-on: https://skia-review.googlesource.com/113464
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2018-03-10 03:29:54 +00:00
Brian Osman
37886ce8cd Shim to enforce that canvas virtuals are overridden
Change-Id: Iad70d449bbc43195baefd70d20c41996a8435e6e
Reviewed-on: https://skia-review.googlesource.com/113320
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-03-09 19:43:41 +00:00
Brian Osman
3adc12213b Fill in some missing virtuals from canvas subclasses
Bug: skia:
Change-Id: If7306fa6c5a1619952e1159e6ebca8f04b4d9c8e
Reviewed-on: https://skia-review.googlesource.com/113262
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2018-03-08 20:13:41 +00:00
Jim Van Verth
a556684b10 Remove deprecated drawShadow interfaces
Bug: skia:7263
Change-Id: I90fcc35e8d070b324287139ebecc3d15dbec0137
Reviewed-on: https://skia-review.googlesource.com/109164
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-02-28 19:07:29 +00:00
Chris Dalton
46563d1d91 Forward internal_private_accessTopLayerRenderTargetContext from SkPaintFilterCanvas
Fixes viewer slides that need direct access to Ganesh.

Bug: skia:
Change-Id: Icfdd814e53ce333f4a20353e8bc4dddde3cc72df
Reviewed-on: https://skia-review.googlesource.com/108020
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2018-02-16 20:10:47 +00:00
Jim Van Verth
b1b80f7de4 Remove tonal color from DrawShadow internals
Bug: b/71719631
Change-Id: I676c34dfe5ea9b5e184ea53dd49a8b835d4e8cb6
Reviewed-on: https://skia-review.googlesource.com/95741
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2018-01-19 16:32:13 +00:00
Jim Van Verth
744cbb3888 Fix alpha contribution to tonal color.
Also adds a tonal color GM, a grayscale mode to shadowutils GM,
and animated alpha to SampleAndroidShadows.

Bug: skia:
Change-Id: I1dcb5cab7e53ffa7a3bf1a07b6ebfed38df1a9ed
Reviewed-on: https://skia-review.googlesource.com/85002
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-12-19 19:27:06 +00:00
Leon Scroggins III
0cbc10f94e Make SkImageGeneratorCG apply encoded origin
SkImageGeneratorCG:
- Detect the origin and apply it to the output
- Deprecate NewFromEncodedCG and add MakeFromEncodedCG

SkCodecImageGenerator:
- Move code elsewhere for sharing
- Apply origin for incomplete decodes

SkPixmap.cpp/SkPixmapPriv.h:
- Now has the shared code for generators to apply origin

DMSrcSink.cpp:
- Call MakeFromEncodedCG

SkCGUtils.h:
- Add a version of SkCopyPixelsFromCGImage that takes an SkPixmap

Bug: skia:7138
Bug: skia:3834
Change-Id: Ic6dbc76360c6a84913b67373582f328d3946d637
Reviewed-on: https://skia-review.googlesource.com/63740
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
2017-11-03 15:29:34 +00:00
Florin Malita
1ba5b6baa8 Plumb more SkPaintFilterCanvas virtuals
SkNWayCanvas cannot support virtuals which imply one-to-one proxying,
but SkPaintFilterCanvas can (and should).

Change-Id: If966aa4ec3fcc79e6355a82cc299fd1877e4cf53
Reviewed-on: https://skia-review.googlesource.com/58842
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-10-12 15:32:11 +00:00
Stan Iliev
cd975d5aa5 Implement getGrContext in SkPaintFilterCanvas
Implement getGrContext to return the context from the original
canvas.

Bug: b/66988832
Test: Ran Android HWUI on a non overlapping View with alpha,
Change-Id: I44ad48e3257004cc5c45c86529b167139f30621a
which is using SkPaintFilterCanvas to draw.
Reviewed-on: https://skia-review.googlesource.com/58841
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Stan Iliev <stani@google.com>
2017-10-12 14:42:41 +00:00
Ben Wagner
63fd760a37 Remove trailing whitespace.
Also adds a presubmit to prevent adding trailing whitespace to source
code in the future.

Change-Id: I41a4df81487f6f00aa19b188f0cac6a3377efde6
Reviewed-on: https://skia-review.googlesource.com/57380
Reviewed-by: Ravi Mistry <rmistry@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-10-09 21:20:34 +00:00
Florin Malita
adaeaedc28 Add missing onDrawDrawable() overrides to utility canvases
Change-Id: Ia5a7c523263e2c4744e0f3a743c6a4433760a4be
Reviewed-on: https://skia-review.googlesource.com/49770
Reviewed-by: Stan Iliev <stani@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2017-09-22 14:01:27 +00:00
Derek Sollenberger
2fbf1bc8c9 Add SK_API to APIs used by the android framework.
This CL enables us to set the default visibility of the symbols
on Android to hidden.  It is the intent that all of he SK_APIs
that have been added to /src directies should be removed as soon
as we can remove their callers within Android.

Bug: b/31971097
Change-Id: Ic787f94df0fb0c2b8d941aa7095a12b317c4b5de
Reviewed-on: https://skia-review.googlesource.com/49501
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2017-09-21 18:14:36 +00:00
Mike Reed
0ca21466da remove dead code for STREAM_API
Bug: skia:
Change-Id: I5c5a65710af443c60a3d13fb309ce31309be7f74
Reviewed-on: https://skia-review.googlesource.com/49460
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-20 20:43:50 +00:00
Mike Reed
98c5d92ee6 Revert "Revert "use unique_ptr for stream api""
This reverts commit 7031b247c9.

Bug: skia:
Change-Id: I24c34bbee703f02994be8e206bcb9c10b5427d84
Reviewed-on: https://skia-review.googlesource.com/47541
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-16 02:04:23 +00:00
Mike Reed
7031b247c9 Revert "use unique_ptr for stream api"
This reverts commit 49f1f34438.

Reason for revert: broke win-chrome

../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): error C2228: left of '.release' must have class/struct/union
../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: type is 'SkStreamAsset *'
../../third_party/skia/src/ports/SkFontMgr_win_dw.cpp(89): note: did you intend to use '->' instead?


Original change's description:
> use unique_ptr for stream api
> 
> Bug: skia:6888
> Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8
> Reviewed-on: https://skia-review.googlesource.com/26740
> Reviewed-by: Mike Klein <mtklein@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

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

Change-Id: Ic1e4af557317abd06b7f6b7f5056645df7e469f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6888
Reviewed-on: https://skia-review.googlesource.com/47440
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-15 21:04:07 +00:00
Mike Reed
49f1f34438 use unique_ptr for stream api
Bug: skia:6888
Change-Id: I3459b4913982a7cae1c0061697c82cc65ad9a2d8
Reviewed-on: https://skia-review.googlesource.com/26740
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2017-09-15 18:46:45 +00:00
Ben Wagner
a93a14a998 Convert NULL and 0 to nullptr.
This was created by looking at warnings produced by clang's
-Wzero-as-null-pointer-constant. This updates most issues in
Skia code. However, there are places where GL and Vulkan want
pointer values which are explicitly 0, external headers which
use NULL directly, and possibly more uses in un-compiled
sources (for other platforms).

Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345
Reviewed-on: https://skia-review.googlesource.com/39521
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2017-08-28 17:48:57 +00:00
Mike Reed
35ee0e09b4 clean up useage of SkFloatBits
Bug: skia:
Change-Id: I6d3a0019f2fcf11feca69123e4ce6eb35de43613
Reviewed-on: https://skia-review.googlesource.com/31222
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2017-08-07 02:49:29 +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
Mike Reed
54518ac1c2 remove unused SkPoint3 from SkColor.h
Bug: skia:
Change-Id: Iba327a5604dc11525c4d8d0a535a7c417a1b8185
Reviewed-on: https://skia-review.googlesource.com/25961
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-07-22 19:30:37 +00:00
Brian Osman
65e4c614f0 Add category support to JSON and SkDebugf tracing
Bug: skia:
Change-Id: I4d0bdb9d954e49b79ace0552d7b74b36a512c00d
Reviewed-on: https://skia-review.googlesource.com/25642
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2017-07-21 16:38:23 +00:00
Jim Van Verth
34d6e4b09f Add tonal color support for shadows.
Bug: skia:
Change-Id: Ib9bd9083da1d8a9fa90ae7c710386e6903541fd5
Reviewed-on: https://skia-review.googlesource.com/18148
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-06-09 17:18:58 +00:00
Jim Van Verth
3af1af9e97 Remove ambient and spot mask filters.
Also remove a deprecated interface in SkShadowUtils.

Change-Id: I32e67271be953f11071c512cb39a47ea1e7dcaaf
Reviewed-on: https://skia-review.googlesource.com/17266
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2017-05-18 19:45:45 +00:00