Commit Graph

4593 Commits

Author SHA1 Message Date
Elliot Evans
d511d9a086 Add Puppeteer perf for release and experimental_simd builds of CanvasKit against SKPs
Adds the command:
  make skps_release_and_SIMD
for perfing builds against a set of SKPs in ~/skps for release and
simd builds of CanvasKit. Also outputs a summary of the perf results
in a table format.

See the document "SIMD CanvasKit Build Performance Testing"
for more details:
https://docs.google.com/document/d/114kdSGPMnOSQCZ7pFgd3MGMn5mIW562RMoXVmD13e0M/edit#

Bug: skia:10453
Change-Id: I311629a1420301dda41f7ec57ce1403b05fd949b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301982
Reviewed-by: Elliot Evans <elliotevans@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-16 17:47:08 +00:00
Mike Reed
13711ebe68 rename SkMipMap to SkMipmap
Change-Id: I1fa8a0482a717847236a30b4851061f4074b7755
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302644
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-15 13:26:13 +00:00
John Stiles
886a904595 Update SkTQSort to use half-open ranges.
C++ algorithms have largely standardized on a [begin, end) half-open
range, as seen in standard library containers. SkTQSort now adheres to
this model, and takes vec.begin() and vec.end() as its inputs.

To avoid confusion between inclusive and half-open ranges inside the
implementation, internal helper functions now take "left" and "count"
arguments instead of "left"/"right" or "begin"/"end". This avoids any
ambiguity.

(Although performance was not the main goal, this CL appears to
slightly improve our sorting benchmark on my machine.)

Change-Id: I5e96b6730be96cf23d001ee0915c69764b2c024a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302579
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2020-07-14 22:13:59 +00:00
Brian Osman
a7685b2343 Runtime effects: Allow null children
Two related things:
1) SkRuntimeEffect will allow null child shaders when calling
   makeshader. This will produce a GrSkSLFP with null FP children.
   Fix some code that assumed that children were non-null.
2) Change the input color passed to any children to be the SkSLFP's
   input color, rather than the default (white). This lets nullptr
   children in runtime effect have the desired behavior (they are the
   paint color or similar, depending on context).

Change-Id: Iabffc50b0a893a56403c5240f32a5da6a88d81f6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301980
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-14 21:33:57 +00:00
John Stiles
df07800f95 Include the SkTSort header only where it is used.
Change-Id: If51be35205b40c4a22979a4b49b031126af1dde7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302500
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-14 14:19:06 +00:00
Robert Phillips
f4f8011aef Add Context factories to GrDirectContext
In order to stage the transition from GrContext to GrDirectContext, both
of them will have to have the factories for a while.

This CL also removes all internal uses of the old (GrContext) factories.

Change-Id: Ibe1edd0818ea23a0d54257c55f35f12526047ef3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302263
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-14 12:40:46 +00:00
John Stiles
6e9ead9166 Revert "Remove custom SkSort algorithms."
This reverts commit 70474c1cb0.

Reason for revert: bot build failure

Original change's description:
> Remove custom SkSort algorithms.
> 
> SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
> The difference is small on randomized inputs, but quite significant for
> semi-ordered inputs (forward/backward/repeated). There doesn't seem to
> to be any compelling advantage to SkTQSort.
> 
> Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u
> 
> (These performance numbers are from an optimized build my local machine;
> it's possible that we might see different results on the test bots.)
> 
> Change-Id: Iaf19563041547eae7de2953be249129108f093b1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com,johnstiles@google.com

Change-Id: I1126dd4cda95716dac225ad32d5b0e5cf3f09421
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302447
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-07-14 00:25:05 +00:00
John Stiles
70474c1cb0 Remove custom SkSort algorithms.
SortBench shows that SkTQSort and SkTHeapSort are inferior to std::sort.
The difference is small on randomized inputs, but quite significant for
semi-ordered inputs (forward/backward/repeated). There doesn't seem to
to be any compelling advantage to SkTQSort.

Nanobench results: https://screenshot.googleplex.com/9JOLV1d6Z0u

(These performance numbers are from an optimized build my local machine;
it's possible that we might see different results on the test bots.)

Change-Id: Iaf19563041547eae7de2953be249129108f093b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302295
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-13 23:35:20 +00:00
Robert Phillips
1a57857fb6 Retract GrContext.h from headers
GrContext is going away. These #includes have been letting it slip in
where it shouldn't.

Change-Id: Idbf24aeba4454d272ad3ebc8ea0d75ae4d9e6e10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301978
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-13 20:03:58 +00:00
Brian Osman
3b5a4fac1e Use stable sort for Viewer's help screen
Fixes flickering help text

Change-Id: I61159e6946125e9e2ce7be3f8f8f6103473855be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302266
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-07-13 17:25:56 +00:00
Robert Phillips
b27b38b089 Miscellaneous removal of GrContext usages
Change-Id: I558471002db93a09b8fd5dfa2f0929a0139295bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301976
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-13 14:10:54 +00:00
Brian Osman
31890e2c37 Viewer: Don't steal focus when the shader error window appears
Makes editing shaders (in the SkSL or Particles slides) tolerable.
Previously, every intermediate state (that didn't compile) would force
you to stop and click back in the code window.

Change-Id: Ibc12b8d697a6b5073e24020daa143a4047a5da31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301984
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
2020-07-13 13:56:52 +00:00
Mike Reed
609ea210e2 more cleanup after removing volatile from bitmap
Change-Id: I3d7b2f59a5657640c3d60f5a2f6e1277d7593096
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/302038
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-07-12 19:37:29 +00:00
Herb Derby
411e7aa8b1 move GrAtlasTextOp creation to GrRenderTargetContext
The op creation is no self contained, which means that it handles
taking the clip. For random op testing, this means that some times
no op is created for blobs that are entirely off screen. This
results in a nullptr op. The random op test has been adjust accordingly.

Change-Id: I619ffb315b7ad7c834b3e85d7120fe2cdb90c56a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301583
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-10 20:01:29 +00:00
Robert Phillips
ed65339084 Update the sk_app WindowContext to hold a GrDirectContext
This CL is working towards replacing GrContext with the GrDirectContext/
GrRecordingContext pair.

Change-Id: Id4488e1280d76a16c37d58bd8d29fb7f8dde6b1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301940
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-10 18:27:03 +00:00
Mike Klein
77482cb335 add Sk- prefix to SkOSLibrary functions
Just refactored names.  Looking at adding SkCloseDynamicLibrary too.

Change-Id: Ibc3ad556386dad3e80bf91bd9ee46e9b9fe68c4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301900
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-07-10 16:55:03 +00:00
Chris Dalton
b490eb2c51 Add ANGLE's glMultiDraw*BaseInstance functions to the GL interface
This is how we will implement indirect draws in ANGLE and WebGL.
Emscripten will expose WEBGL_multi_draw through this extension.

Bug: skia:10419
Change-Id: I3fc56b130b06cdcc05a25be69878b398b8820f50
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301736
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-07-10 16:39:53 +00:00
Ben Wagner
525e87682c Fix Op tests when default typeface is empty.
While testing on Linux with a configuration like

skia_enable_fontmgr_custom_directory=false
skia_enable_fontmgr_custom_embedded=false
skia_enable_fontmgr_custom_empty=true
skia_enable_gpu=true
skia_use_fontconfig=false
skia_use_freetype=true
skia_use_system_freetype2=false

the default typeface will be an empty typeface with no glyphs. This of
course leads to many test failures, which is fine.

However, this also leads to crashes when testing GPU Ops since the Op
factories may return nullptr to indicate no-op but the callers of those
factories currently do not expect nullptr or handle it as a no-op.

Change the callers of Op factories to treat nullptr as no-op.

Change-Id: I9eb1dfca4a8a9066a9cfb4c902d1f52d07763667
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301586
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-07-10 14:04:53 +00:00
Chris Dalton
e29f9e2187 Reland "Make glPatchParameteri required when tessellation is supported"
This is a reland of 7d7cd2b178

Original change's description:
> Make glPatchParameteri required when tessellation is supported
> 
> Chrome started wrangling this entrypoint in the following CL:
> 
> https://chromium-review.googlesource.com/c/chromium/src/+/2253344
> 
> Change-Id: Ief4dfb1ddca8d86e0c09dfdc443e01830cb4de20
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298405
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Change-Id: I4d37973892c589d7fcffc1baf3285aa3ad97a21d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300922
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2020-07-09 21:16:35 +00:00
Greg Daniel
bc486b8d59 Fix vulkan extensions in test setup.
At least locally after an Nvidia driver update I am seeing both of the
buffer address extensions reported by the driver. It is illegal in
vulkan to enable both of them on the device, so we remove the EXT
version if we have both.

Change-Id: I7b3046c5fd27ba071ce9e1c58c478eaf4d2a82b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301553
Commit-Queue: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-07-09 19:37:00 +00:00
Brian Osman
68870aa5d1 Add heap usage of SkSL::Compiler to nanobench output
This will let us track a new metric that measures the heap usage of
constructing a default compiler object. I anticipate adding similar
stats about the heap usage from compiling simple vs. complex SkSL.

Change-Id: Idb814c0b5d210d00a06ce5dc7147437aabcba1bb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301359
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-07-09 00:05:28 +00:00
Robert Phillips
2a4acf328c Remove all internal uses of (and deprecate) SkSurface::getContext
We are replacing GrContext with the GrDirectContext/GrRecordingContext
pair. This starts making that change visible to clients (and weaning
Skia off of GrContext).

Change-Id: I00cc9bf208499984de855a1646229bd7557fc925
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300706
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-08 16:09:27 +00:00
Nathaniel Nifong
d463a9d4fb [canvaskit] Fix first frame measurement
Change-Id: I4bb7f8550ee1dc73bfdc3e2e8f7138ac0c86e7a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/301296
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Nathaniel Nifong <nifong@google.com>
2020-07-08 14:38:38 +00:00
Robert Phillips
d5f3c98166 Update DDL test harness to use GrDirectContexts
Before I start updating this to support relocatable DDLs I felt I
should clean it up a bit.

Change-Id: I640d15a40164b33c4c2d7378e37d39fe7d3ff313
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300926
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-08 12:33:27 +00:00
Nathaniel Nifong
1436d7278c Move frame measurement code into shared location
Change-Id: Ib083773a9f9efbe337daa05146ef85259c0fdc35
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300174
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-07-07 21:53:25 +00:00
Jim Van Verth
275f419a60 Add D3D support for MSAA
Change-Id: I7f9122bb99fea952a67fa47aaada789037438152
Bug: skia:10476
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300906
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-07 20:34:15 +00:00
Adlai Holler
e3ad527e3f Add a convenience to downcast contexts into GrDirectContext
This pattern of needing a safe downcast will continue to grow as we
add more explicit use of GrDirectContext and it's causing long ternary
operations that span multiple lines.

Change-Id: I9e2ebe5156e4245524a52d7c92ed3a8509e53151
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300901
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-07-07 18:13:50 +00:00
Florin Malita
cf5e35f721 Use ContextInfo::directContext() in skottie2movie.cpp
TBR=
Change-Id: I3ed43328f84d4172407b40c32f5d331fa3b221d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300821
Reviewed-by: Florin Malita <fmalita@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
2020-07-07 12:39:22 +00:00
John Stiles
6fc05d8b37 Allow system key equivalents to work again.
The changes in http://review.skia.org/300182 caused cmd-Q to stop
working normally in Viewer, because the Mac window would report that it
had processed all key equivalents. This prevented the NSApp from
handling key equivalents in the menu bar. This CL now forwards on all
key equivalents to the system for processing (even as it passes them to
ImGui), allowing cmd-Q to work again.

This CL also simplifies the pattern for updating modifier keys slightly.

Change-Id: I2285839b41dd361e34694eccbc6d581662b24648
Bug: skia:10338
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300651
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
2020-07-06 19:02:24 +00:00
Brian Osman
609f1597e4 Remove most GrCoordTransform code
All coord transforms were identity, so this enshrines that
knowledge, then transitively removes a large amount of code.

Bug: skia:10416
Change-Id: Iae4af9ca21590bced1ce9fce3ab807f6cceaebd4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300234
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2020-07-06 18:50:33 +00:00
Robert Phillips
6d344c3069 Update unit tests to accept GrDirectContext
This CL makes it explicit that the unit tests always get a direct context.

It is mainly a mechanical CL.

Change-Id: I49e0628851d9c81eb47386ef978edf905c6469d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299866
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-06 15:45:12 +00:00
Robert Phillips
7b4e43c522 Update final set of tools to take GrDirectContext
This updates skiaserve, fm, and the fuzzer

Change-Id: Ia1b447b79723eeab73da11755d28f7ab443d5fbb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300263
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-06 12:48:03 +00:00
Robert Phillips
00f78de600 Update additional tools to take a GrDirectContext
GM was updated in:
https://skia-review.googlesource.com/c/skia/+/300172 (Make GM::onGpuSetup take a GrDirectContext)

This CL updates: skpbench, nanobench, and some testing infrastructure.

Only minor changes were made to the unit tests as they will be updated
en masse in a follow up cl.

Change-Id: Ieffc98865d4c9fc73e292d3c807ed4ae2081745a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300220
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-01 20:42:25 +00:00
Robert Phillips
b87b39b7a2 Make GM::onGpuSetup take a GrDirectContext
This should, hopefully, clarify the role of onGpuSetup vis a vis onDraw.

The remaining tools are updated in:
https://skia-review.googlesource.com/c/skia/+/300220/ (Update remaining tools to GrDirectContext)

Change-Id: I19d6eec4d16cb9ebad8924763a18225cc871f0f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300172
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-01 19:25:55 +00:00
Robert Phillips
b7bfbc299a Move GrRecordingContext.h and GrDirectContext.h into include/gpu
External clients will need access to these classes once GrContext
goes away.

This is a purely mechanical CL.

Bug: skia:10441
Change-Id: I7ffeb29d88bcc0f012412fba911e8362d046e24a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300206
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-01 17:32:14 +00:00
Brian Salomon
832936beeb Remove workaround for not calling SkImage release proc
Also rename release proc

Change-Id: Id1900f6428466e71e14f612256e89e4c1248e6cd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300202
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-07-01 17:06:24 +00:00
Robert Phillips
f8f45d91b2 Make asDirectContext public
External clients will eventually have to call this to get access
to a direct context from an SkCanvas or SkSurface (which will
only have 'recordingContext' accessors).

Bug: skia:10441
Change-Id: I10e34081277b685fa59d03e1fce1887f3524e0fa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300178
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2020-07-01 16:30:03 +00:00
John Stiles
d2f870c911 Fix modifier key handling in OS X to allow command-keys to work.
A variety of modifier key handling issues are addressed in this CL:
- Added a skui::Key for the Super key (this is ImGui's name for command)
- Added OS X event handling for `flagsChanged` (sent when modifier keys
  are pressed)
- OS X manually tracks modifier key state and sends key-up and key-down
  events to the ImGuiLayer as necessary
- OS X does not send key-up events when hotkeys are pressed, so these
  are manually synthesized and sent to ImGui (otherwise hotkeys are
  repeated forever)
- Replaced hardcoded Virtual Key valus in OS X code with named constants
- Our custom bitmask type was lacking the ability to XOR

This CL does NOT enable the OS X clipboard; this uses the ImGui internal
clipboard.

Change-Id: I76b55215858bfb6441dbef18ad638426fa8bc073
Bug: skia:10338
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300182
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-07-01 16:07:03 +00:00
Jim Van Verth
e381036051 Fix D3D debug clang build.
Adds in the GR_D3D_CALL_ERRCHECK utility macro to avoid this in the
future.

Change-Id: I68112bcccbd8cb9d55ae02e99de954269d0ac4bd
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300176
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2020-07-01 14:39:53 +00:00
John Stiles
ab9578e9c6 Update ImGui to latest stable version (1.77).
Also added various sk_app headers to BUILD.gn for ease of access.

Change-Id: I99646c8f3906e00ca95f8e583319cb9b873c66ff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300037
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2020-07-01 02:29:22 +00:00
Robert Phillips
9eb0002b47 Double down on abandoned being publicly accessible on contexts
abandoned() is publicly accessible on GrContext. Since
GrRecordingContext is taking its place in many locations, make its
abandoned() call also publicly accessible.

This CL also removes abandoned() from GrContextPriv since it is
publicly accessible.

Change-Id: I72bdae369d06e34ec3f99a18a0feb72e2ae67666
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299876
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-06-30 20:01:51 +00:00
Greg Daniel
ce9f016ed3 Remove unused GrFlushFlags.
This also adds back default flush() calls which simply do a flush
without any submit.

Change-Id: Ia8c92bbdecd515d871abfa6364592f502e98656b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298818
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-06-30 19:39:31 +00:00
Robert Phillips
44333c58f6 Make asDirectContext return a GrDirectContext
Change-Id: I373658d68582adc9728f3a75d84178a365f5b798
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299877
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Adlai Holler <adlai@google.com>
2020-06-30 18:48:17 +00:00
Ben Wagner
41abd4f5cc Remove SkWhitelistTypefaces.
This was originally added to reduce the size of the large skp set by
reducing the number of fonts fully serialized. At the time all fonts
were fully serialized into all skps. Oddly enough this was actually a
blacklist of fonts which should never be fully serialized. The list was
easy to get out of date (it needed to be regenerated whenever the
container the Chromium html to skp conversion ran in was updated) and
unclear how to use well (the user would need to replay the skps in said
container to get mostly correct playback).

Since that time, it is now possible for the user to specify how to
serialize typefaces. In addition, further flexibility is now provided
though serialization and deserialization procs provided to the recorder
so that the user can have even greater control over individual
recordings, so if this is needed again there are cleaner ways to write
it without globals. Also, Cluster Telemetry doesn't really capture skps
this way anymore so this code isn't really being used.

In the future should such a mechanism be required, it would probably be
best to first create a base image of fonts to use as system fonts and
then set up the container which captures the skps to use exactly those
system fonts. Then all system fonts can avoid serialization and the font
collection and setup (or possibly just base container) can be shared for
playback.

Change-Id: I27412a8fd35b89af293b4151ea8cecc2b1bc7226
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299838
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-06-30 14:54:53 +00:00
Adlai Holler
f19bbb52b2 Finish the DDL sk_sp migration
This will not be landed until chrome CL 2269958 lands.

Bug: skia:10425
Change-Id: I2a5081201ca3faed5232e8540086bd4c6f865767
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299292
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-29 16:49:54 +00:00
Florin Malita
65513a9834 Tweak scripts to fix CK builds with python 3
- print -> print()
- xrange() gone in 3, but range() works similarly - if somewhat
  less efficient in 2
- read() returns strings in python 2 vs. bytes in 3

Change-Id: Ia720551832ef75edbf9235b80a06e2ffa3ddf4b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299444
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2020-06-29 12:59:05 +00:00
Jim Van Verth
b29a1a6653 Fix D3D dynamic buffer reuse.
This is a temporary fix to handle an issue where we try to map a
dynamic buffer when it's in use in a previous command list.

Change-Id: Ibc6b071508c11ea394a320b326645ecc4b22105a
Bug: skia:9935
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299392
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-26 20:58:23 +00:00
Robert Phillips
98c39ba497 Make use of backend texture creation finished procs in YUV GMs
Although not necessary this, at least, demonstrates how we expect these callbacks to be used.

Change-Id: I67c81e5cf882fbf2511729ede29f6ae9af389d52
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297862
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2020-06-26 19:52:53 +00:00
Adlai Holler
562c8dbd2c Move the DDL unreffing to task destructor and update tests
Bug: skia:10425
Change-Id: If7f7bdfb21d4c3eefcb7d1a0d68e590f6bf97b0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299384
Commit-Queue: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-06-26 18:57:50 +00:00
Brian Salomon
63a0a758ce Reland "Add async rescale and read APIs to SkImage."
This reverts commit 1caf3789f8.

Makes the image GMs detect an abandoned context just like the surface
GMs.

Bug: skia:10431
Change-Id: I56a3631a75e6b0383f96a73f461cfa314ee29afa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/299379
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2020-06-26 18:17:21 +00:00