Commit Graph

1787 Commits

Author SHA1 Message Date
Robert Phillips
d470e1b905 Add kRG_88_SkColorType
Bug: skia:9121

Change-Id: Id2a12a5d607b84ce393d2b58233bf8e23f646059
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235797
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-06 17:55:26 +00:00
Michael Ludwig
6d1c0d4196 Avoid use of SkMatrixImageFilter to handle CTM for backdrop filtering
The DrawDeviceWithFilter function used to rely on SkImageFilter's
applyCTMForBackdrop, which would create a new DAG and use an
SkMatrixImageFilter node to account for the transformation. However,
that filter is really meant to perform a transformation prior to the
CTM matrix. Abusing matrix math to instead have it map the backdrop
contents back into the CTM local space grossly inflated the size of the
temporary images needed when under many perspective transforms.

This CL instead takes over control of the CTM decomposition and draws
the backdrop (src) content into a temporary layer directly, and then
feeds that through the image filtering. The code is somewhat cumbersome
to follow because of the combination of coordinate spaces and need to
make everything relative to the top left corner of the images.

When the rest of my image filter refactor is more underway, I believe that
a lot of the coordinate space math and image origin accounting will
be much cleaner, but the overall backdrop filtering strategy would remain
similar to this new implementation.

Bug: skia:9074
Change-Id: Ibd2995e81d2b308c74b2d298da5e38daa74c8677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239108
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-09-05 16:35:18 +00:00
Chris Dalton
d6cda8d1cb Rename GrGLIRect to GrNativeRect
This will allow us to reuse the "setRelativeTo" logic in more places
than GL.

Bug: skia:
Change-Id: Ic67b211d2a1b27535187ddae8e4771f595dc0397
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239414
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-05 15:46:18 +00:00
Jim Van Verth
e784f75beb Reland "Add launch screen to iOS apps"
This is a reland of bf8dad281e

Original change's description:
> Add launch screen to iOS apps
> 
> Bug: skia:
> Change-Id: I7ebe94213c26c31c1b0dbd1b8951f87263cd41a3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/175826
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>

Bug: skia:
Change-Id: I111242899339186fba2b8753ee43bc0fb2ea5295
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239437
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-09-05 14:05:08 +00:00
Jim Van Verth
f643ba7a90 Revert "Add launch screen to iOS apps"
This reverts commit bf8dad281e.

Reason for revert: Need to fix infra Housekeeper bot

Original change's description:
> Add launch screen to iOS apps
> 
> Bug: skia:
> Change-Id: I7ebe94213c26c31c1b0dbd1b8951f87263cd41a3
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/175826
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Hal Canary <halcanary@google.com>

TBR=jvanverth@google.com,halcanary@google.com,benjaminwagner@google.com

Change-Id: Ie540cc4d3209cf5e92d4c66812243721b1ac7fc2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239105
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-09-04 20:21:48 +00:00
Jim Van Verth
bf8dad281e Add launch screen to iOS apps
Bug: skia:
Change-Id: I7ebe94213c26c31c1b0dbd1b8951f87263cd41a3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/175826
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-09-04 18:44:21 +00:00
Hal Canary
3e710b0231 gn: try again to fix fuchsia
Change-Id: Ie5e437fa08fb85c764703d8e292e696a568f5dcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239117
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-09-04 14:33:42 +00:00
Hal Canary
c7b263b603 gn: move all skia_* declare_args to skia.gni
motivation:  put them all in one place.

Change-Id: Id40aff1f6ddc36b99b14567f110b5084da7e2bd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238899
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-09-03 18:29:22 +00:00
Brian Salomon
beb7f525c8 Make GrSurfaceProxy constructors take arg that determines participation in
GrResourceAllocator.

Removes LazyInstantiationType. All callbacks can be invoked one time (if successful).
Lazy callbacks indicate whether their lifetime should be extended, which is used by
promise image proxy callbacks.

Promise image proxies are no longer deinstantiated at the end of flush and
GrDeinstantiateProxyTracker is removed. They will be instantiated the first time
they are encountered in GrResourceAllocator::addInterval (without actually adding
an interval) and then remain instantiated.

Also removes some "helper" versions of proxy factory functions that took fewer
params. They weren't much used outside of test code and as the total number of params
has grown their relative utility has diminished. We could consider a params struct
or radically simpler helpers that take only a few params if desired.

Change-Id: Ic6b09e7b807b66cb9fcbb7a67ae0f9faf345485f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238216
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-09-03 14:58:41 +00:00
Ben Wagner
edcce3145a [gn] Add pool for dsymutil
dsymutil seems to kill the machine when too many processes are run in
parallel, so we need to use a pool to limit the concurrency when
passing large -j to Ninja (e.g. Goma build).

Change-Id: I84404291db4781f86268256ab888cef8d07c770e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234477
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-09-03 14:08:09 +00:00
Ben Wagner
d51ea41ce4 [gn] Move dsymutil from link command to a separate action
Change-Id: I18a3bd5e845305e3b2521d076fd641bd5175b618
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234327
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-09-03 14:02:49 +00:00
Hal Canary
452ce044f0 iOS toolchain: no -soname for is_component_build=true
Change-Id: I81835ffdd1fbdaa12d662527e38b42532f2ea8e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238756
Commit-Queue: Hal Canary <halcanary@skia.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-09-03 13:52:49 +00:00
Michael Ludwig
0a1e9efa39 Don't use AA convex path renderer if direction can't be determined
Without the changes to GrShape and GrAAConvexPathRenderer, this new GM
would not draw the red circle at the center when using Ganesh. Raster
drew the red circle. The difference came about because they checked
convexity after transforming by the view matrix, and Ganesh checked
before.

With this particular path construction and the very large scale factor
on the CTM, the convexity calculator in local space computed small
enough edge vectors that it thought the contour backtracked on itself
instead of winding in a consistent direction.

The GrAAConvexPathRenderer would claim it could draw the convex path,
but later when actually preparing to draw, it would do nothing if it
turned out the convex path didn't have a direction. This CL updates it
so that the convex path renderer's canDraw() function matches what it
is actually able to draw.

There is the separate issue of the convexity/direction checking
precision.

Bug: chromium:996140
Change-Id: I6f2af2d9ba6752663d97c8573deb2d767a3f1245
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/238121
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2019-09-02 01:57:03 +00:00
Ethan Nicholas
d4efe685dd SkSL sample() now permits specification of coordinates
Bug: skia:
Change-Id: I16073008ac852f1864bd1d2bd38087a5b661d05a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232581
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2019-08-30 15:29:13 +00:00
Jim Van Verth
68cb8b0239 Switch to new IOS windowing system.
This replaces the SDL-based system and should allow Metal to work on iOS.
OpenGL and raster will render but there's no touch input yet.

Bug: skia:8737
Change-Id: I863accc47f0e1781192d567dbe54d1e321c3cd2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231561
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-08-29 20:13:03 +00:00
Jim Van Verth
066ceb15b6 Implement fences and semaphores for Metal.
GrFence is implemented by a single MTLSharedEvent where we increase the
value with each new invocation. GrSemaphore uses a MTLEvent (the
assumption here is that we are signaling and waiting on the same device)
with an associated value that defaults to 1. For generating a large
number of GrSemaphores at once it should be possible to use the same
MTLEvent but with different assigned values.

Bug: skia:8243
Change-Id: Ic7de2d9d295fbe51e67bc7c3c4354257cb0774d4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233416
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-08-28 19:38:56 +00:00
Stephen White
ef2dc90172 Dawn: update for GrGpuCommandBuffer -> GrOpsRenderPass change.
Change-Id: Ifbe4bcd40bcf316868d23c2edf73b2371c6cb312
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237119
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-08-26 20:05:55 +00:00
Mike Klein
a2931beb4b remove MSRTC bots and GN support
We've failed to get these bots to report where issues happen
any more finely than the name of the executable, which makes
them a real pain to fix when they go red.

We don't expect we'll be able to run cleanly in this mode for
long without bots enforcing it, so remove support from GN too.

Change-Id: Ie86f0cbf2f5f859ac2ddb869da7e5b8d31b33fa0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237195
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-26 17:49:28 +00:00
Florin Malita
922e2254b1 Add a colortype conversion bench
curr/maxrss	loops	min	median	mean	max	stddev	samples   	config	bench
  46/46  MB	4	65.4µs	65.5µs	67.1µs	75.5µs	5%	█▅▁▁▁▁▁▁▁▁	nonrendering	ctconvert_4_4_readpixels
  46/46  MB	3	80.4µs	80.7µs	82.2µs	93.8µs	5%	█▁▁▁▂▁▁▁▁▁	nonrendering	ctconvert_4_4_drawbitmap
  46/46  MB	3	76.5µs	76.6µs	80.5µs	93.4µs	8%	▇▁▁▁▁▁█▄▁▂	nonrendering	ctconvert_4_6_readpixels
  46/46  MB	2	155µs	155µs	157µs	174µs	4%	█▁▁▁▁▁▁▁▁▁	nonrendering	ctconvert_4_6_drawbitmap

Change-Id: Ib53f76a289ee101a85054d773cadcea475baf280
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/237141
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-08-26 15:41:54 +00:00
Greg Daniel
2d41d0d363 Remove GrGpuTextureCommandBuffer class and rename to GrOpsRenderPass.
Change-Id: Ia6e666a7bb986bb3dc769d25919580bca17b4748
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236556
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-26 15:34:14 +00:00
Stephen White
b7eaedcfcc Dawn: implement a ring buffer for uniform uploads.
GrDawnGpu vends ring buffer slices out of a persistent (larger) buffer.

GrDawnProgramDataManager::setData() now returns a BindGroup containing
the (possibly new) UBO bindings, as well as the texture and sampler
bindings.
Change-Id: Id6694d6f44a815cfbffe4293779bf9bf558a2365
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235866
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-08-23 17:42:47 +00:00
Greg Daniel
f41b2bd449 Reland "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit f21bf9e50b.

Reason for revert: relanding with infra fix

Original change's description:
> Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
>
> This reverts commit 2a5954140b.
>
> Reason for revert: breaking everything
>
> Original change's description:
> > Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> >
> > Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

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

Change-Id: Ibd3a06e4a91dbb1f225dcc8d17d0db3967b6f85f
No-Presubmit: true
No-Tree-Checks: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236350
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-22 20:52:09 +00:00
Greg Daniel
f21bf9e50b Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."
This reverts commit 2a5954140b.

Reason for revert: breaking everything

Original change's description:
> Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> 
> Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

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

Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-22 20:12:38 +00:00
Greg Daniel
2a5954140b Merge GrOpList and GrRTOpList and rename to GrOpsTask.
Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-22 19:33:01 +00:00
Greg Daniel
5abfff229c Delete unused GrTextureOpList.
In a follow up CL I will be merging GrRenderTargetOpList and GrOpList
since we no longer have need for that separation.

Change-Id: I267ead3beeceaece504968ca69165c425d38f761
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236337
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-22 18:06:22 +00:00
Greg Daniel
e227fe4e53 Move CopyOps to CopyRenderTask.
This also means copies are no longer part of OpList or GpuCommandBuffer.

Change-Id: I234de2c93ca13e069d7e4423a3c8b292be2eb500
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235831
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-21 18:22:23 +00:00
Robert Phillips
e1efd38cf0 Remove GrPendingIOResource
AFAICT these three remaining uses of GrPendingIOResource were just real-ref placeholders (i.e., they just added 1 pending read and then held on to the GrPendingIOResource until object destruction).

Change-Id: Iba6bb199477d846d079999f09794422e240c675a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235458
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-21 17:29:43 +00:00
Greg Daniel
bbfec9db84 Move transferFrom commands from GrOp and into GrRenderTask.
These Ops don't need to go through the GrGpuCommandBuffer.

Change-Id: Ifa9c7d801c97c225989d2542709c89f36ddfdc5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235799
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-20 15:23:03 +00:00
Hal Canary
82e3afa99d SkQP: split make_apk script into create_apk and make_apk
gn_to_bp:  wrap defines in ifndef

create_apk.py assumes you are either run from the aosp tree, or you are
being run from make_universal_apk.py, which now defers to create_apk.py
for all functionality, even argument parsing.

tools/skqp/generate_gn_args moved some functionity into skqp_gn_args.py,
which is now used by create_apk.py

create_apk now accepts android sdk license for you.

create_apk and make_universal_apk.py now are better about cleaning up
after exceptions happen.

Old script make_apk.sh now just points at make_universal_apk.py

CQ_INCLUDE_TRYBOTS=skia.primary:Build-Debian9-Clang-x86-devrel-Android_SKQP,Test-Debian9-Clang-NUC7i5BNK-CPU-Emulator-x86-devrel-All-Android_SKQP

Change-Id: I2dba20ef7017987cabb2bd49f070e2b1594785d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235678
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-08-20 15:08:03 +00:00
Herb Derby
82963a3c97 Remove SkRemoteGlyphCacheImpl.h
Move everything to SkRemoteGlyphCache.cpp. Add a call
to SkStrikeServer (AddGlyphForTest), to make tests work.
* Misc cleanups

Change-Id: I22bea686838f60cf96d097e1ea025cb5399903e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235096
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-08-15 21:20:09 +00:00
Michael Ludwig
d18c98cd86 Move Context into separate header/namespace
The new namespace 'skif' will contain many more types down the road
to help with image filter implementations. Too many to make inner
classes like Context was, but once the namespace exists, it doesn't
make sense for Context to be the only inner class.

Bug: skia:9282
Change-Id: I4ed76bd5f6c8f0b8ca2f2e1c5d76006c7cccf91e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234581
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-15 20:08:29 +00:00
Brian Salomon
9c73e3df83 Turn off -Wreturn-std-move-in-c++11
Change-Id: I127c979670c3dc7dac2e35908a795afbdefca8f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234902
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-15 17:45:58 +00:00
Brian Salomon
096b091874 Make GrBlend.h private
Change-Id: I77f3dbc80d85d3a19e8986dae42450ee5b8c07a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234668
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-15 13:34:57 +00:00
Brian Salomon
201cdbb646 Make GrSamplerState.h and GrRenderTarget.h private
Change-Id: Id7a270f5a528e1a4a6d94474fa092545252753b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234667
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-15 12:22:11 +00:00
Stephen White
9d4219229b First implementation of GrTextureRenderTarget.
Change-Id: I0e6bc516eb43e7f7062f9d19e7ef8093324b551d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233997
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-14 20:11:03 +00:00
Stephen White
0850dcdb2e First implementation of GrDawnTexture.
Change-Id: I9c636c939dffbb0b395f3e9ed3d9a55784a6d390
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233981
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-08-14 19:03:37 +00:00
Ben Wagner
6cb6a07116 Use COM_DECLSPEC_NOTHROW STDMETHODIMP
Use STDMETHODIMP because it's the right thing to do, use
COM_DECLSPEC_NOTHROW because STDMETHOD uses it but STDMETHODIMP does
not, leading to warnings from clang and maybe also from msvc, see
https://developercommunity.visualstudio.com/content/problem/325764/msvc-1582-generates-warning-c4986-in-atl-header-fi.html

This also removes SkBlockComRef, since even WRL has abandoned the
similar RemoveIUnknown. These classes were helpful in the transition to
using smart pointers, but are incompatible with final implementations.

Change-Id: I53a618ee629af638d9d8625ccd5acb0db6529950
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233988
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-08-14 17:14:03 +00:00
Chris Dalton
3d77027d26 Reland "Initiate regeneration of mipmaps from proxy DAG land"
This is a reland of fe19203eb7

Original change's description:
> Initiate regeneration of mipmaps from proxy DAG land
> 
> This allows us to resolve all the textures before executing a command
> buffer, rather than interrupting execution as is currently done in the
> GL backend.
> 
> Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

Change-Id: Ic904d0b1bcb451bcb74cfae2204fb7297eaff108
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234016
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-14 16:01:31 +00:00
Brian Salomon
2c59659821 Make GrRectBlurEffect be analytical rather than use a texture LUT.
The math isn't that complex and the existing code has intergralization of
the profile size that makes getting the texture coords correct tricky
(and currently wrong).


Bug: skia:9319
Change-Id: Ic928737ce4c40d28ee0696c3628e914f35ffe371
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233985
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-14 13:35:37 +00:00
Ben Wagner
fd91d20a46 [gn] Don't use cc_wrapper for link steps
I'm aware of two uses for cc_wrapper:
 - Goma support for linking is experimental, and normally just falls
   back to the local compiler.
 - ccache site says it always falls back to the real compiler for
   linking. https://ccache.dev/

The msvc toolchain already does not use cc_wrapper for linking; this
change removes it for gcc_like_toolchain. This matches Chromium, e.g.
2cde7f21ab/build/toolchain/gcc_toolchain.gni (221)

Change-Id: I7199c23343233a2435e4d28e7269f67efac36d72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234316
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-08-13 16:15:48 +00:00
Mike Klein
f815301b1a add GM for skbug.com/9331
Release and debug builds draw differently on my machine,
and if I tack #pragma clang optimize off onto cull_rect()
in SkDashPath.cpp, they both draw like a debug build.

I'm not very familiar with this code, so it may help my
diagnosis to see what other bots draw.

Bug: skia:9331
Change-Id: I1798503c0e5956ec767d8e0021ccca7a1d2a8ac3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233999
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-12 19:32:40 +00:00
Sergey Ulanov
2739fd2f09 Reland: Enable YCbCr sampler support on platforms other than Android
Previously YCbCr Vulkan samplers were supported only on Android for
external images, while Vulkan requires YCbCr sampler for I420 YUV image
formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
This CL:
 - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
   VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
 - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
   fExternalFormat=0.
 - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
   have ycbcr info.

Bug: chromium:981022
Change-Id: Id4d81b20d9fda4d9ad0831f77e6025eed3db2bfd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233776
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
2019-08-12 14:21:01 +00:00
Robert Phillips
3e7fa79f2c Revert "Initiate regeneration of mipmaps from proxy DAG land"
This reverts commit fe19203eb7.

Reason for revert: Turned a lot of bots red

Original change's description:
> Initiate regeneration of mipmaps from proxy DAG land
> 
> This allows us to resolve all the textures before executing a command
> buffer, rather than interrupting execution as is currently done in the
> GL backend.
> 
> Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

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

Change-Id: Iaa8391b8fbd5a4f851ca41834c1dfeee4be6fedd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233836
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-08-10 13:00:33 +00:00
Chris Dalton
fe19203eb7 Initiate regeneration of mipmaps from proxy DAG land
This allows us to resolve all the textures before executing a command
buffer, rather than interrupting execution as is currently done in the
GL backend.

Change-Id: I998546b312d24cf47fc2c837e7c94fbf95571af0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230636
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-08-10 00:39:50 +00:00
Stephen White
f813ef7d1b Dawn backend: implement stencil, primitive topology, separate blends.
Remove beginDraw()/endDraw() in favour of applyState().
This allows for varying primitive topology between meshes in a single

draw: call applyState() prior to drawing each mesh in case the
primitive type changed.
Initial support for onClear() and onClearStencil() in GrNXTGpuRTCommandBuffer.
Modify beginRenderPass() to take the LoadOps for color and stencil, so we
can encode render passes for stencil operations.
Add support for reverse-subtract blend equation.
Also apply options overrides in caps initialization.
Change-Id: I8547961c414187dbc763a67d6c7ec4383d6ce6f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232136
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-08-09 21:20:10 +00:00
Greg Daniel
9fc5e8da98 Revert "Enable YCbCr sampler support on platforms other than Android"
This reverts commit cc4573dfed.

Reason for revert: Seems to be crashing in Win Intel vulkan bots

Original change's description:
> Enable YCbCr sampler support on platforms other than Android
> 
> Previously YCbCr Vulkan samplers were supported only on Android for
> external images, while Vulkan requires YCbCr sampler for I420 YUV image
> formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
> VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
> This CL:
>  - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
>    VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
>  - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
>    fExternalFormat=0.
>  - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
>    have ycbcr info.
> 
> Bug: chromium:981022
> Change-Id: I3989f72e918a257a081b81ae20429a6771229ad6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230918
> Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
> Reviewed-by: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,sergeyu@chromium.org

Change-Id: Ia9c229fbec4cd397fb04304753fa49f34336ed3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:981022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233563
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-08-09 19:09:05 +00:00
Sergey Ulanov
cc4573dfed Enable YCbCr sampler support on platforms other than Android
Previously YCbCr Vulkan samplers were supported only on Android for
external images, while Vulkan requires YCbCr sampler for I420 YUV image
formats such as VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM,
VK_FORMAT_G8_B8R8_2PLANE_420_UNORM.
This CL:
 - Adds VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM and
   VK_FORMAT_G8_B8R8_2PLANE_420_UNORM as supported Vulkan formats
 - Updates GrVkYcbcrConversionInfo to add fFormat field and allow
   fExternalFormat=0.
 - Removes assertions format=VK_FORMAT_UNDEFINED for all images that
   have ycbcr info.

Bug: chromium:981022
Change-Id: I3989f72e918a257a081b81ae20429a6771229ad6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230918
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-08-09 18:01:13 +00:00
Mike Klein
639fce9060 Revert "add a stub for running fiddles as GMs"
This reverts commit adfc22df86.

Reason for revert: breaks building DM in Android, probably Google3 too.  Shame.

Original change's description:
> add a stub for running fiddles as GMs
> 
> This is about the 15th time I've hacked this up.
> 
> Change-Id: I0c75c0d04133d867e942c39eba693fd7227ba0f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233240
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

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

Change-Id: I56207630eeba4fb411111fd40e6bc532cef39407
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233241
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-08-09 15:40:52 +00:00
Robert Phillips
702b37b965 Add unit test to prevent future memory regressions
Bug: b/138674523
Change-Id: Ie4e37763ca68c7fcfa2f78cfa3c85a21bb863f77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233558
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-08-09 15:39:01 +00:00
Stephen White
d67c71fc7b Dawn backend: first triangle.
Nothing is cached in this initial version; all the magic happens in
GrDawnGpuRTCommandBuffer::beginDraw(). It builds the program,
sets the uniform data, converts the vertex attributes, initializes
rasterization state and blend state, creates a pipeline and bind group
and sets them.
send[Indexed]InstancedMeshToGpu() encodes the Dawn draw commands.
GrDawnGpuProgramBuilder::beginRenderPass() then finishes
the command encoder and submits the resulting command buffer.

Change-Id: Ie9c160cd18a2c4ef1bde66f86a52227e3bf1b570
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230457
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2019-08-09 15:30:51 +00:00