Commit Graph

3668 Commits

Author SHA1 Message Date
Brian Osman
5c1f8eb094 Various particle system improvements
Effects now have a duration, and can be played looped
or one-shot. Added a second list of affectors that are
applied at spawn vs. update.

Effects grab and store the SkRandom at construction,
so it no longer needs to be passed to update().

Bug: skia:
Change-Id: Ib54d60466e162e4d4b70fa64c1215fc01680d47a
Reviewed-on: https://skia-review.googlesource.com/c/191722
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-02-14 20:19:08 +00:00
Brian Osman
5de7ea45bc Particles/SkReflected: Generalize array reflection
This supports arrays of any type, and removes all of the special case
code for arrays of SkReflected objects. (This is extracted from my
rewrite of SkCurve, which needed something like this to work).

Bug: skia:
Change-Id: I55ab942f7922335dca0685d28b3b122bc4d53daa
Reviewed-on: https://skia-review.googlesource.com/c/192620
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-02-14 20:04:48 +00:00
Ben Wagner
a57d868f19 Defer loading particle effect to load time.
Moving this out of the constructor means less going on at slide creation
time, making debugging easier.

Change-Id: I37bdd249abef663931bc8ef152a92a3a3436dcf4
Reviewed-on: https://skia-review.googlesource.com/c/192600
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-14 18:58:15 +00:00
Jim Van Verth
2782b2872b Fix drag events in Mac viewer.
Rather than depend on the Cocoa event system we intercept the events
in our main loop and send them to the appropriate sk_app::Window. A
hashmap that maps from Cocoa windowNumbers to an sk_app::Window is
added to make this possible.

We continue to send the event on through the Cocoa system to catch
system level events -- e.g., window close and drag events. We also
continue to catch key events in an NSView to keep the app from beeping
annoyingly because it thinks it's capturing events outside its focus.
Finally we ensure that move events are always enabled for the window
so that imgui knows that the cursor is over it.

Bug: skia:8737
Change-Id: Id49df51f68942fbf51634d6484291df862074864
Reviewed-on: https://skia-review.googlesource.com/c/191574
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-02-13 19:26:39 +00:00
Robert Phillips
b97da530f0 Switch Ops over to using GrRecordingContext
Since, by definition, the ops are created when recording, it makes sense that they should be able to make due with only the GrRecordingContext.

TBR=bsalomon@google.com
Change-Id: If64353aee30b35d0a16401f7de00954f44ed8c59
Reviewed-on: https://skia-review.googlesource.com/c/190670
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-13 15:53:09 +00:00
Brian Osman
7c979f52c3 Experimental Particle System
This adds a new "Particles" slide to viewer, that allows
editing, loading, and saving particle effects. All of the
particle system code is in modules/particles.

There are many rough edges and some not-yet-finished changes
to generalize the model[1]. A rough overview:

- SkReflected.h implements a lightweight reflection system
  for classes derived from SkReflected. Adding a new class
  involves deriving from SkReflected, adding a macro to the
  class declaration, and implementing visitFields(), which
  simply calls a virtual on an SkFieldVisitor for each field.
  Currently, emitters and affectors use this mechanism.

- SkParticleSerialization.h demonstrates two useful field
  visitors - for serializing to and from JSON. The driver
  code that uses those is directly in ParticlesSlide.

- SkParticleData.h and SkCurve.h define a variety of helper
  types for talking about particles, both for parameterizing
  individual values, and communicating about the state of a
  particle among the effect, affectors, and emitters.

- SkParticleEffect.h defines the static data definition of
  an effect (SkParticleEffectParams), as well as a running
  instance of an effect (SkParticleEffect). The effect has
  simple update() and draw() methods.

- ParticlesSlide.cpp adds a third field visitor to generate
  GUIs for interactively editing the running effect.

---

1: The critical change I'd like to make is to remove all
special case behavior over time and at spawn (setting sprite
frames, size over time, color over time, etc...). Integration
is the only fixed function behavior. Everything else is driven
by two lists of affectors. One is applied at spawn time, using
the effect's lifetime to evaluate curves. This allows spawning
particles with different colors as the effect ages out, for
example. The second list is applied every frame to update
existing particles, and is driven by the particle's lifetime.
This allows particles to change color after being spawned, for
example.

With a small set of affectors using a single expressive curve
primitive (keyframed list of cubic curve segments), we can
have affectors that update color, size, velocity, position,
sprite frame, etc., and implement many complex behaviors.

Bug: skia:
Change-Id: Id9402bef22825d55d021c5a2f9e5e41791aabaf4
Reviewed-on: https://skia-review.googlesource.com/c/181404
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-12 18:53:41 +00:00
Ben Wagner
7ad9b96d7c Upgrade to Mesa 18.3.3
This seems to resolve the leak in libxcb, but introduces a new leak in
VkTestUtils.

Bug: skia:8710
Change-Id: I71482d8f1c5eebfffd211a4124bd2db01283741b
Reviewed-on: https://skia-review.googlesource.com/c/186862
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
2019-02-12 16:42:30 +00:00
Florin Malita
eb46bd892d [sksg] Hit-testing API
Introduce RenderNode::nodeAt(const SkPoint&) as the entry point for the hit-testing API.

This is backed by a onNodeAt() virtual, which gets dispatched throughout the render DAG,
and normally stops at the first leaf Draw node in encounters.

To support the implementation, introduce a GeometryNode::contains(const SkPoint&) API.

This is backed by a onContains() virtual, overridden in each concrete geometry class.

Expose nodeAt() on sksg::Scene, and add some basic unit tests.

Change-Id: I0c8abd9d1e51ecf2d8b4dd699f325cd636e21084
Reviewed-on: https://skia-review.googlesource.com/c/191296
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-12 15:01:05 +00:00
Ben Wagner
454e5fb745 Fix cluster reporting from shaper.
Bug: skia:8420
Change-Id: I7eea8c6b3af2153a1ac1189782fc6cbaaf9ee5c6
Reviewed-on: https://skia-review.googlesource.com/c/190821
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-11 21:59:33 +00:00
Mike Klein
640654d145 run all available OpenCL devices
Change-Id: I6d18be3f6178003eb5153d32d4b618101ddcb3d9
Reviewed-on: https://skia-review.googlesource.com/c/191297
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-02-11 21:29:33 +00:00
Robert Phillips
b6e9d3c788 Outline GrDrawAtlasOp and GrDrawVerticesOp
This makes it easier to switch all the ops over to using a GrRecordingContext (and better matches what we do with all the other ops)

Change-Id: Ie690975c31b8c9f4c7acebdc0185a145a0a263a5
Reviewed-on: https://skia-review.googlesource.com/c/191280
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-11 20:38:35 +00:00
Robert Phillips
a9162dfb9c Plumb abandonment throughout GrContext hierarchy
When the GrImageContext & GrRecordingContext are actually GrDirectContexts it is useful for them to report the abandonment state of the GrDirectContext.

When the GrImageContext & GrRecordingContext are actually GrImageCreationContext or GrDDLContexts then they will just never be abandoned.

This CL also strips the GrProxyProvider and GrDrawingManager of their tracking on abandonment and centralizes it in the GrImageContext.

ImageContext
  can't abandon
  can only check abandonment privately

RecordingContext
  can't abandon
  can only check abandonment privately

DirectContext (aka GrContext)
  can abandon publicly
  can check abandonment publicly

Note that abandoning the DirectContext won't alter the abandonment status of any of
the other contexts in its group (e.g., DDL contexts that may be being used to record).

Change-Id: Ib790f74d90ab18da58a127fed2aad20e2477bd21
Reviewed-on: https://skia-review.googlesource.com/c/190669
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-11 20:26:22 +00:00
Mike Klein
8a1f15df81 update hello-opencl
- break dependency on code from src/compute
  - port away from C APIs to friendlier C++ wrapper APIs
  - add DEPS for OpenCL C++ wrapper headers so we can build on Mac
  - factor out a //third_party/opencl GN target

Change-Id: I9e37c6677cfb779021e66f2bd10f97570c450746
Reviewed-on: https://skia-review.googlesource.com/c/191281
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-02-11 18:47:32 +00:00
Greg Kaiser
4dbaafa75b bookmaker: Remove fflush() on closed file
fflush() requires an open file handle, so it shouldn't be called
right after fclose().  And fclose() performs an fflush(), by
definition (see http://man7.org/linux/man-pages/man3/fclose.3.html ),
so we can remove this fflush() call altogether.

Change-Id: I8fbdd5a85b3cdb5edfdabbd5dca449ea1d4fce2d
Reviewed-on: https://skia-review.googlesource.com/c/191321
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-02-11 18:00:22 +00:00
Brian Osman
535c5e34ee Add ImGui::DragCanvas, to simplify several custom widgets
Bug: skia:
Change-Id: Ic44ab00af1117a6bbc17df7f5005f4db707cb5c1
Reviewed-on: https://skia-review.googlesource.com/c/191002
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-02-11 16:31:59 +00:00
Hal Canary
77a1a7e618 find_commit_with_best_gold_results takes arguments
No-Try: true
Change-Id: Iafb9453f40fd16c139996bf8f37b8c5255982486
Reviewed-on: https://skia-review.googlesource.com/c/191160
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-02-11 15:00:27 +00:00
Jim Van Verth
be39f713e5 Add Metal context to Viewer.
Bug: skia:8737
Change-Id: I5c4c839bcf39f2cd3a9a32d005bf4bdb7c42e6a5
Reviewed-on: https://skia-review.googlesource.com/c/187925
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-02-08 21:26:52 +00:00
Brian Salomon
1f05d459e2 Add GrContext::resetGLTextureBindings().
This function binds texture ID 0 to any texture unit/target combo that
Skia has modified.

Bug: chromium:926017
Change-Id: I3ac8f8050c863232886102886e60d3b91a5380c9
Reviewed-on: https://skia-review.googlesource.com/c/190663
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-02-08 21:26:51 +00:00
Jim Van Verth
3e8392e42c Manage Mac paint events more directly.
Trying to shuttle our paint events through the Mac event system seems
to be causing a number of problems, one being that we're refreshing
too often. This works around that by tracking the invalidation flag
per window.

Bug: skia:8737
Change-Id: Ib1b8041f1d9299ff366747831a466439bfd0db29
Reviewed-on: https://skia-review.googlesource.com/c/190673
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-02-08 20:35:00 +00:00
Hal Canary
70441faaef SkQP: make text context outlast gm
Change-Id: Ia8e3b42d1b88d111a3885a7b2ae90c29985a8c10
Reviewed-on: https://skia-review.googlesource.com/c/190672
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-02-08 19:19:52 +00:00
Robert Phillips
d6841487eb Move auditTrail and opMemoryPool from GrContext to GrRecordingContext
Any context that records ops (i.e., direct and/or DDL) will need these two objects.

Change-Id: Ifd3527c23a4015f7d469ad2222563508cccbd339
Reviewed-on: https://skia-review.googlesource.com/c/190307
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-08 16:07:56 +00:00
Brian Osman
a5ab35cc0e Fix vertex indexing error when using ImGui skiaWidgets
skiaWidget adds fake "images" to the ImGui draw list. Those have
vertices allocated for them (even though we don't consume them). We
still need to skip over those if any ImGui widget rendering happens
after the callback, though.

Bug: skia:
Change-Id: Ia0243e600bd32d90ba97ac9fbe58b715f70aa83a
Reviewed-on: https://skia-review.googlesource.com/c/190664
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-02-08 15:43:26 +00:00
Robert Phillips
a41c6858da Move proxyProvider and singleOwner to GrImageContext
This starts to beef up the capabilities of the GrImageContext in preparation for its future responsibilities (i.e., creating promise images w/o a recordingContext).

Note that the proxyProvider still has different behavior if it has a full context vs. a reduced context. I intend to just let this behavior remain as is.

Change-Id: Idb9d99a548ef928fc1b9dc1e5a34f74343bb0b4b
Reviewed-on: https://skia-review.googlesource.com/c/189490
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-08 15:20:06 +00:00
Mike Klein
764f25a3c5 remove a couple more jsoncpp deps
Presumably if we don't need these in Skia,
we don't need them in Android?

Change-Id: Iff18066c1c2a52c999beabbd9239d4bc96d0ba6d
Reviewed-on: https://skia-review.googlesource.com/c/190438
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-02-08 15:17:26 +00:00
Hal Canary
480d29bfc9 SkQP: new tool: tools/skqp/find_commit_with_best_gold_results
I already used this to choose where to branch SkQP for Q-release.

No-Try: true
Change-Id: Id809adefe038d4a96a47c19f7844812ea8854d1e
Reviewed-on: https://skia-review.googlesource.com/c/184920
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
2019-02-07 21:20:29 +00:00
Hal Canary
6512fa389c SkQP: update tools/skqp/gn_to_bp.py, add release script
No-Try: true
Change-Id: Id8cfba15d70700d4d38c7db81599f6d56fb93cdd
Reviewed-on: https://skia-review.googlesource.com/c/190306
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
2019-02-07 20:41:56 +00:00
Brian Osman
5b9126bc19 Give ImGui the correct DeltaTime
Fixes key repeat rate when vsync is disabled

Bug: skia:
Change-Id: I315932d0e0bcfd491a3c81deba56b137db1c3a0f
Reviewed-on: https://skia-review.googlesource.com/c/190304
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2019-02-07 20:19:26 +00:00
Robert Phillips
dbaf317cd4 Move GrContextPriv methods to their own .cpp file
Centralize these for my sanity. Most will also be parceled out to other contexts.

Change-Id: If0e7e98bcf66c4d8a3391f9b04e643ccc91af4ad
Reviewed-on: https://skia-review.googlesource.com/c/189488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-02-06 21:15:58 +00:00
Ravi Mistry
2b1d179860 Have the RecreateSKPs bot upload to partner bucket
It will upload to a directory that specifies the day the SKPs were created on:
gs://chrome-partner-telemetry/skps/2019-02-05

Bug: skia:8738
Change-Id: Ic6b719770e16408d580e552af41c1a41c682935a
Reviewed-on: https://skia-review.googlesource.com/c/188300
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-02-06 18:35:12 +00:00
Jim Van Verth
98385ba6c5 Switch back to non-Retina display resolution.
Gives 1:1 pixel correspondence with GM resolutions, and fixes
viewport issues.

Bug: skia:8737
Change-Id: Ieb87ed32cbb3211bdb4cdfbcc486c7b57b1c1eda
Reviewed-on: https://skia-review.googlesource.com/c/188627
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-02-06 16:53:02 +00:00
Ben Wagner
6c30e74dd0 Add DDL jobs for Intel
To work around skia:8709, I'm moving the DDL tests to IntelIris640. The
ASAN jobs still show memory leaks in the driver, but at least I can
identify which calls are leaking and suppress the LSAN warnings.

Adds an SK_ENABLE_SCOPED_LSAN_SUPPRESSIONS define that indicates that
the LSAN header files are available, which is set in recipes for the
Linux ASAN builds. Adds __lsan::ScopedDisabler in four locations for
two Vulkan API calls:
 - CreateGraphicsPipelines in GrVkPipeline::Create and
   GrVkCopyPipeline::Create
 - CreateDescriptorSetLayout in
   GrVkDescriptorSetManager::DescriptorPoolManager::DescriptorPoolManager
   constructor (2 calls)

Also adds a regular suppression for libxcb.so.

See bugs listed below for more details on the leaks.

Bug: skia:8710, skia:8712, skia:8713
Change-Id: I55c6e5d483b4aeed5cd44c64219539ca7214187f
Reviewed-on: https://skia-review.googlesource.com/c/184071
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Ben Wagner <benjaminwagner@google.com>
2019-02-06 15:53:32 +00:00
Brian Osman
88cfc50bb6 Remove all references to jsoncpp (build scripts, DEPS, etc)
Bug: skia:
Change-Id: I3cec245e537eee3e6ceb0a4a52bad733c2c8746e
Reviewed-on: https://skia-review.googlesource.com/c/189842
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-06 15:15:52 +00:00
Brian Osman
5c11d5c084 Convert bookmaker to SkJSON
Verified that running bookmaker produces an identical fiddle.json
before and after this change.

Bug: skia:
Change-Id: I1aa7477348a5f8c362201199b130508c2818116f
Reviewed-on: https://skia-review.googlesource.com/c/188303
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-02-06 15:08:32 +00:00
Ben Wagner
119196ab66 s/geTestSVGTypeface/getTestSVGTypeface
In addition to fixing the typo, this cleans up a few unnecessary calls
into SkTypeface internals.

Change-Id: I101f67053c2db6850d1576de1001998ccf84d2cd
Reviewed-on: https://skia-review.googlesource.com/c/189496
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-02-05 21:38:35 +00:00
Mike Klein
830ab79b26 disable DAA by default
This turns DAA off by default in Skia and in our tools,
while leaving it able to be turned back on if we want.

(There's at least one bot that does already.)

This setup keeps our default builds matching the behavior
of Chromium, Flutter, Android, Google3, and should prevent
anyone from accidentally falling into it.

Change-Id: Ia85f3dbe69c46cec0dac6b07fb5feb6e8b65d237
Reviewed-on: https://skia-review.googlesource.com/c/189580
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-02-05 17:15:14 +00:00
Greg Daniel
8ce7991242 Add release proc apis to SkSurface::MakeFromBackend* calls.
Bug: skia:
Change-Id: I0e6cd8895c328a89cd0fa50260fe4e8adbff5990
Reviewed-on: https://skia-review.googlesource.com/c/188634
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-05 15:36:14 +00:00
Robert Phillips
9da87e0e98 Rename GrContext::contextPriv to priv
Mechanical. This makes the priv() accessor the same for all the context types.

Change-Id: I40850eb05a33b8d7cc3eabdd42226d24b2ba58aa
Reviewed-on: https://skia-review.googlesource.com/c/189164
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-04 22:13:14 +00:00
Greg Daniel
24d861d8bf Add hardware buffer unit test from old skqp to skia.
This copies the hardware buffer unit test from, which was cherry picked
straight into skqp last year, into Skia proper.

There are not functional changes, but a few of the APIs have been updated
to work with newer Skia.

Bug: skia:
Change-Id: I2d7b2ed8b0b9314ca3e03e703a6a5ac53805275e
Reviewed-on: https://skia-review.googlesource.com/c/188034
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-01-31 17:44:52 +00:00
Brian Salomon
f55e8d5232 Add option to skip intermediate release/fulfill calls for promise images.
SkiaRenderer does not delete promise image textures when they are released
but not done. Refulfilling promise image textures takes a significant amount
of CPU time. This allows us to fulfill each promise image once.

Bug: skia:8736
Change-Id: I7ad7fa9678ed0ec4bb714b71fbf920ab4a845409
Reviewed-on: https://skia-review.googlesource.com/c/188039
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-31 16:24:52 +00:00
Jim Van Verth
d426dd0dd9 Fix screen invalidation on MacOS
Bug: skia:
Change-Id: Ib5c88e78ebdfb4c420335d31807ab069422bf6f3
Reviewed-on: https://skia-review.googlesource.com/c/188033
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2019-01-30 19:36:11 +00:00
Jim Van Verth
d24cb80702 Fix up some event handling in MacOS
Bug: skia:
Change-Id: I46a1526cb6622c0ff04dbee9f64febca388f3571
Reviewed-on: https://skia-review.googlesource.com/c/187927
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-01-30 16:03:21 +00:00
Mike Reed
8d0f82408b Some clangtidy fixes
Bug: skia:
Change-Id: I751f93394812bdfab40cd322a23255e18fa2440a
Reviewed-on: https://skia-review.googlesource.com/c/187387
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
2019-01-28 20:45:16 +00:00
Jim Van Verth
1f086ca625 Switch sk_app to use native window creation on MacOS.
Bug: skia:
Change-Id: I1763aab0b4bdb650128c1fcc3aa3a05d194496ca
Reviewed-on: https://skia-review.googlesource.com/c/186360
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-01-28 20:12:46 +00:00
Brian Osman
d8a90f9be1 Converting more debug code to SkJSONWriter
All of SkDrawCommand / SkDebugCanvas now uses SkJSONWriter.
Also removed the bespoke json generator and pretty-printer
in GrAuditTrail. This was the largest volume of code still
using JsonCPP. (There are other stragglers).

Bug: skia:
Change-Id: I3aee554764689ce50c8e707caf26c76093b9bb8f
Reviewed-on: https://skia-review.googlesource.com/c/187040
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-28 19:06:06 +00:00
Greg Daniel
41f0e28fd5 Add MaxAPIVersion to GrVkBackendContext.
This moves us to the correct way of handling the correct version of
Vulkan that the client wants us to use.

Bug: skia:
Change-Id: I6c7962b5d2d48ae142c6a701c30f5af3801ac99b
Reviewed-on: https://skia-review.googlesource.com/c/187382
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2019-01-28 19:01:46 +00:00
Brian Salomon
9bc76d96f9 Change the meaning of GrBudgetedType::kUnbudgetedUncacheable.
kUnbudgetedCacheable now means that the resource is never purged
until its unique key is removed.

This fixes an issue where a cached texture for a promise image
might get purged by cache pressure. This in turn could cause
Skia to call the promise image's Fulfill proc multiple times with
no intervening Release calls. The balancing Release calls would
occur, but the policy is that each Fulfill should be balanced by
Release *before* another Fulfill.

Update/add unit tests.

Bug: chromium:922851
Change-Id: I6411e413b3104721ca4bb6e7f07b3b73d14cbcf9
Reviewed-on: https://skia-review.googlesource.com/c/186361
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-25 14:13:00 +00:00
Brian Salomon
aa6ca0a8bf Require explicit GrWrapCacheable specification in more places.
Make all wrapped resources be kUnbudgetedUncacheable except those
created by AHardwareBuffer image generators and as backings for promise
images.

Make all non-wrapped unbudgeted resources be kUnbudgetedUncacheable.

Update unit tests to mostly use GrWrapCacheable::kNo except where they
are testing the distinction.

Update unit tests for new expectations.
Bug: chromium:922851
Change-Id: I4d3bdaa161ffc76390f26334bcb7e2b47dd9319d
Reviewed-on: https://skia-review.googlesource.com/c/185004
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-25 00:29:27 +00:00
Ravi Mistry
722b21ec72 Fix spreadsheets page set for RecreateSKPs bot
Changed the URL and recaptured it's archive.
Also added a wait just in case.

NoTry: true
Bug: skia:8699
Change-Id: I7a829dc5e5156a68f683247b2eac66e90f8f3dad
Reviewed-on: https://skia-review.googlesource.com/c/185882
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
2019-01-23 22:43:36 +00:00
Herb Derby
087fad7900 Add getTypefaceOrDefault and refTypefaceOrDefault
* Remove GetTypefaceOrDefault from SkPaint and SkFont
* Remove RefTypefaceOrDefault from SkPaint and SkFont

Change-Id: I04ae777142c2bdec849508b611b844418bbaedff
Reviewed-on: https://skia-review.googlesource.com/c/185781
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-01-23 18:52:09 +00:00
Michael Ludwig
7545190e32 Add new experimental API for rectangles with per-edge AA control
Also updates GM_draw_quad_set to use this API instead of the
bulk API on GrRenderTargetContext.

Bug: skia:8506
Change-Id: Ia342d83c509f9db69f06f01599c7041c98aabdb6
Reviewed-on: https://skia-review.googlesource.com/c/184488
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-01-23 16:45:01 +00:00