aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
Commit message (Collapse)AuthorAge
* Clean up/remove unused GrFragmentProcessor-derived ctorsGravatar Robert Phillips2017-02-28
| | | | | | | | | This is the simple (i.e., non-TextureAdjuster) portion of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) Change-Id: I8f673ebe922e03c69473c18c166bcf818507c662 Reviewed-on: https://skia-review.googlesource.com/8997 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Fix -Wshadow-field warningsGravatar Brian Salomon2017-02-28
| | | | | | | | | BUG=skia: Change-Id: I44f1e11787eab88bdc5ed25c34ea802e9001d427 Reviewed-on: https://skia-review.googlesource.com/9083 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add backend selection to viewer's GUIGravatar Brian Osman2017-02-28
| | | | | | | | | BUG=skia: Change-Id: I3314013538792c2aa82cc49f3f072aab2cdc4a55 Reviewed-on: https://skia-review.googlesource.com/9079 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* Add GrExternalTextureData and SkCrossContextImageDataGravatar Brian Osman2017-02-28
| | | | | | | | | | | | | | | | | | | | | | | | GrExternalTextureData is an API for exporting the backend-specific information about a texture in a type-safe way, and without pointing into the GrTexture. The new detachBackendTexture API lets us release ownership of a texture to the client. SkCrossContextImageData is the public API that lets clients upload textures on one thread/GrContext, then safely transfer ownership to another thread and GrContext for rendering. Only GL is implemented/supported right now. Vulkan support requires that we add thread-safe memory pools, or otherwise transfer the actual memory block containing the texture to the new context. Re-land of https://skia-review.googlesource.com/c/8529/ BUG=skia: Change-Id: I48ebd57d1ea0cfd3a1db10c475f2903afb821966 Reviewed-on: https://skia-review.googlesource.com/8960 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix crash switching to Vulkan in viewer on WindowsGravatar Brian Osman2017-02-28
| | | | | | | | | BUG=skia: Change-Id: I626aa6a1571311600a6208c42a8c3e9509d037de Reviewed-on: https://skia-review.googlesource.com/9078 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* viewer: Add a "Path renderer" dropdown menuGravatar csmartdalton2017-02-28
| | | | | | | | | BUG=skia: Change-Id: Ia3ed812d24f0f83631ab238bc418a3c95d49b9dc Reviewed-on: https://skia-review.googlesource.com/9000 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Add msaa flag and UI to viewerGravatar csmartdalton2017-02-27
| | | | | | | | | BUG=skia: Change-Id: I0a24d5e6a4271f84ea5c82eb6d9ede9a1e63f86a Reviewed-on: https://skia-review.googlesource.com/8787 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Fixes to shared context test APIGravatar Brian Osman2017-02-27
| | | | | | | | | | | | Fixes a bug in Windows shared context creation, and makes the API less fiddly. BUG=skia: Change-Id: Ia32b2e3b4816e0b8d7e9be92c22a182ca1393177 Reviewed-on: https://skia-review.googlesource.com/8965 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add onBackendCreated callback to ViewerGravatar Christopher Dalton2017-02-24
| | | | | | | | | | | | | Also removes fWidth and fHeight from Window and instead calls into WindowContent to get these values. BUG=skia: Change-Id: I72ee506004b7da73db9abb607a3bc82edfcf7d43 Reviewed-on: https://skia-review.googlesource.com/8795 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com>
* Fix some viewer crashes when switching color modeGravatar Brian Osman2017-02-24
| | | | | | | | | | | | | | | The whole idea of immediate mode GUIs is to put your GUI code and the resulting action close together. Unfortunately, for actions that tear down the backend (possibly freeing the surfaces we're drawing to), we can't do that. So defer that action until the next frame (really, the next idle). Only required when an action might call setDisplayParams. BUG=skia: Change-Id: I3eb95fdb462526cb6d95819612ad2725c6f1050b Reviewed-on: https://skia-review.googlesource.com/8953 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Add GrExternalTextureData and SkCrossContextImageData"Gravatar Brian Osman2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9ad1f92e2fceea33215c0f13cee42a679fb88d44. Reason for revert: Breaking lots of bots Original change's description: > Add GrExternalTextureData and SkCrossContextImageData > > GrExternalTextureData is an API for exporting the backend-specific > information about a texture in a type-safe way, and without pointing > into the GrTexture. The new detachBackendTexture API lets us release > ownership of a texture to the client. > > SkCrossContextImageData is the public API that lets clients upload > textures on one thread/GrContext, then safely transfer ownership to > another thread and GrContext for rendering. > > Only GL is implemented/supported right now. Vulkan support requires > that we add thread-safe memory pools, or otherwise transfer the > actual memory block containing the texture to the new context. > > BUG=skia: > > Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca > Reviewed-on: https://skia-review.googlesource.com/8529 > Commit-Queue: Brian Osman <brianosman@google.com> > Reviewed-by: Brian Salomon <bsalomon@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org,chinmaygarde@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: If27d1f4c3a169efb6533170f67a172664c0fe8ce Reviewed-on: https://skia-review.googlesource.com/8955 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add GrExternalTextureData and SkCrossContextImageDataGravatar Brian Osman2017-02-24
| | | | | | | | | | | | | | | | | | | | | | GrExternalTextureData is an API for exporting the backend-specific information about a texture in a type-safe way, and without pointing into the GrTexture. The new detachBackendTexture API lets us release ownership of a texture to the client. SkCrossContextImageData is the public API that lets clients upload textures on one thread/GrContext, then safely transfer ownership to another thread and GrContext for rendering. Only GL is implemented/supported right now. Vulkan support requires that we add thread-safe memory pools, or otherwise transfer the actual memory block containing the texture to the new context. BUG=skia: Change-Id: I784a3a74be69807df038c7d192eaed002c7e45ca Reviewed-on: https://skia-review.googlesource.com/8529 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* ImGui color space controlsGravatar Brian Osman2017-02-24
| | | | | | | | | | | | | | Adds radio buttons for switching among legacy, sRGB and F16. Also adds a list of primaries you can pick from, as well as a gamut diagram showing the primaries. The primaries can be dragged around to alter the working space. BUG=skia: Change-Id: Ibd8c67dfe085594c0d7462f0efe4d79d73999919 Reviewed-on: https://skia-review.googlesource.com/8311 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Revert "Revert[2] "hide deprecated underline and strikethru"""Gravatar Mike Reed2017-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cfd3d9ff8f370e3a4a53e2aba84dc4d682501f4c. Reason for revert: derek is fixing caller Original change's description: > Revert "Revert[2] "hide deprecated underline and strikethru"" > > This reverts commit aab68c56ef8fc88b0d1536f99aa1cc9ae7a0573a. > > Reason for revert: android still broken RecordingCanvasTests.cpp > > Original change's description: > > Revert[2] "hide deprecated underline and strikethru" > > > > android now updated. > > > > This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58. > > > > BUG=skia:6250 > > > > Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73 > > Reviewed-on: https://skia-review.googlesource.com/8815 > > Commit-Queue: Mike Reed <reed@google.com> > > Reviewed-by: Mike Reed <reed@google.com> > > > > TBR=reed@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia:6250 > > Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396 > Reviewed-on: https://skia-review.googlesource.com/8900 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=reviews@skia.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6250 Change-Id: Ie518b64219a0262cd343644754940774bf42faec Reviewed-on: https://skia-review.googlesource.com/8901 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert[2] "hide deprecated underline and strikethru""Gravatar Mike Reed2017-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit aab68c56ef8fc88b0d1536f99aa1cc9ae7a0573a. Reason for revert: android still broken RecordingCanvasTests.cpp Original change's description: > Revert[2] "hide deprecated underline and strikethru" > > android now updated. > > This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58. > > BUG=skia:6250 > > Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73 > Reviewed-on: https://skia-review.googlesource.com/8815 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Mike Reed <reed@google.com> > TBR=reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6250 Change-Id: I954575a0e4b9aca8414e10901a7be03a2d7e6396 Reviewed-on: https://skia-review.googlesource.com/8900 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Don't include GrContextFactory.h from SkCommonFlagsPathRenderer.hGravatar csmartdalton2017-02-22
| | | | | | | | | | BUG=skia: Change-Id: Ied4d23120cd21542314c45369597f375ca8affcf Reviewed-on: https://skia-review.googlesource.com/8788 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert[2] "hide deprecated underline and strikethru"Gravatar Mike Reed2017-02-22
| | | | | | | | | | | | | android now updated. This reverts commit e005edd3a5deb602beec59f59cdc8b14d3764d58. BUG=skia:6250 Change-Id: If08d344cdd863fde1d9955dc3fab671a83be0f73 Reviewed-on: https://skia-review.googlesource.com/8815 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com>
* Viewer: balance save/restores and draw offscreen to window in src modeGravatar Brian Salomon2017-02-22
| | | | | | | Change-Id: I9a9bff1c950aaeda095ee49b4860c6fee04ea731 Reviewed-on: https://skia-review.googlesource.com/8887 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add the ability to enable/disable GPU path renderersGravatar csmartdalton2017-02-22
| | | | | | | | | | | | | | Adds a bitfield to GrContextOptions that masks out path renderers. Adds commandline flags support to set this bitfield in tools apps. Removes GrGLInterfaceRemoveNVPR since we can now accomplish the same thing in the context options. BUG=skia: Change-Id: Icf2a4df36374b3ba2f69ebf0db56e8aedd6cf65f Reviewed-on: https://skia-review.googlesource.com/8786 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* hide trivial helpers on canvasGravatar Mike Reed2017-02-22
| | | | | | | | | BUG=skia: Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef Reviewed-on: https://skia-review.googlesource.com/8852 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fix Mesa compileGravatar Brian Osman2017-02-22
| | | | | | | | | | BUG=skia: Change-Id: Id532233537d18e6185a83681188aa73527b212a1 Reviewed-on: https://skia-review.googlesource.com/8842 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Support shared GL contexts in GrContextFactoryGravatar Brian Osman2017-02-22
| | | | | | | | | | | | | | | | Mostly plumbing, plus some minimal testing to make sure that the platform APIs don't explode. I plan to add testing of SkCrossContextImageData using this, which should verify that textures are actually shared. Also found a factory and some related code in the CommandBuffer test context that was totally unused. BUG=skia: Change-Id: I05bbc22c4d1ef946b702a5cc7f67788785219c62 Reviewed-on: https://skia-review.googlesource.com/8808 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Rename GrContextFactory::ContextOptions to ContextOverridesGravatar csmartdalton2017-02-21
| | | | | | | | | | | | | Also changes the behavior of these flags to only override their corresponding context options when set, and to leave them unchanged when not set. BUG=skia: Change-Id: I09f6be09997594fa888d9045dd4901354ef3f880 Reviewed-on: https://skia-review.googlesource.com/8780 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Chris Dalton <csmartdalton@google.com>
* Update Valgrind match-leak-kinds for keep-alive thread.Gravatar Mike Klein2017-02-21
| | | | | | | | | | | | | | | | Valgrind has tipped over from seeing the keep-alive thread as possibly leaked to seeing it as definitely leaked. We can suppress both. An alternative here is "all" or to just remove the line. For the moment I think this is best, as we're still excluding indirect leaks this way. I'd want to think a bit whether it made sense for the keep-alive thread to indirectly leak anything, so I'd like it to fail if it comes up. Change-Id: Ib28790a1d84a0a9061fdb6de48569ca8ea51b52a Reviewed-on: https://skia-review.googlesource.com/8764 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Revert "hide deprecated underline and strikethru"Gravatar Leon Scroggins2017-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a01bf9ab748836fc4bf271bd5024151bf1ce2e88. Reason for revert: Breaking Android merge. They access setUnderlineText on their <shudder> subclass of SkPaint. Original change's description: > hide deprecated underline and strikethru > > BUG=skia:6250 > > Change-Id: I85395e4960b16ab91237a74ff35e5b7588965512 > Reviewed-on: https://skia-review.googlesource.com/8600 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bungeman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6250 Change-Id: If55f69f061dc4439ca2faa62807a9c5694ebbeb4 Reviewed-on: https://skia-review.googlesource.com/8687 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Leon Scroggins <scroggo@google.com>
* hide deprecated underline and strikethruGravatar Mike Reed2017-02-17
| | | | | | | | | BUG=skia:6250 Change-Id: I85395e4960b16ab91237a74ff35e5b7588965512 Reviewed-on: https://skia-review.googlesource.com/8600 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fiddle: Remove extraneous newline from SkDebugf output.Gravatar Joe Gregorio2017-02-16
| | | | | | | | | BUG=skia:6247 Change-Id: I69b5fd3fd0f8ed3fe5b7e36d3e389cc4215542c6 Reviewed-on: https://skia-review.googlesource.com/8478 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Joe Gregorio <jcgregorio@google.com>
* return and take SkImageGenerator as unique_ptrGravatar Mike Reed2017-02-15
| | | | | | | | | | BUG=skia: Change-Id: I4bc11042dd1dbf1eabd40af206027bc65acc3186 Reviewed-on: https://skia-review.googlesource.com/8444 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* fiddle: use sstream for text, code cleanupGravatar Hal Canary2017-02-15
| | | | | | | Change-Id: I57cbb33688f1cd97a2172160d06e4bdd468880d1 Reviewed-on: https://skia-review.googlesource.com/8489 Reviewed-by: Joe Gregorio <jcgregorio@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Add more SampleApp support to viewer.Gravatar Jim Van Verth2017-02-14
| | | | | | | | | | | Fixes loading a Sample as first slide. Adds char input. Adds --slide and --list options. Change-Id: I34b66818e3673fcfdc649443e7d9dfb74b478062 Reviewed-on: https://skia-review.googlesource.com/8445 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* tools/git-sync-deps: less verbose when fetch is neededGravatar Hal Canary2017-02-13
| | | | | | | Change-Id: I0ab76132b9e21544ed3dfb87bd7adc91c4c4e656 Reviewed-on: https://skia-review.googlesource.com/8387 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Hal Canary <halcanary@google.com>
* fiddle: Fix JSON output logic.Gravatar Joe Gregorio2017-02-13
| | | | | | | | | BUG=skia: Change-Id: Ia17b8328f692881282be15afa5e7f661ddc83318 Reviewed-on: https://skia-review.googlesource.com/8388 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Joe Gregorio <jcgregorio@google.com>
* Add plumbing for text only fiddles.Gravatar Joe Gregorio2017-02-13
| | | | | | | | | BUG=skia: Change-Id: If3967f868c482bbded7185a0ed7c6559cd2858c5 Reviewed-on: https://skia-review.googlesource.com/8334 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Joe Gregorio <jcgregorio@google.com>
* Revert "Revert "IWYU""Gravatar Mike Reed2017-02-13
| | | | | | | | | | | This reverts commit 3c727d2386059c1d7cbdcdc9bef5fa18ed33667e. BUG=skia: Change-Id: I72e9b40fec96d044e0ac12906669a52529e77882 Reviewed-on: https://skia-review.googlesource.com/8356 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Make header files idempotent; script to checkGravatar Hal Canary2017-02-13
| | | | | | | Change-Id: I960ded854e6bc7cdee029a7393cac2a686c41754 Reviewed-on: https://skia-review.googlesource.com/8308 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Pixel zoomer in viewerGravatar Brian Osman2017-02-13
| | | | | | | | | | | | Made it a separate ImGui window (rather than part of the debug window). Bring it up with 'z'. Draggable/resizable. Variable zoom scale. Enjoy. BUG=skia: Change-Id: I949ab398126c892c8d353aaebcc8403765f42841 Reviewed-on: https://skia-review.googlesource.com/8357 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "IWYU"Gravatar Robert Phillips2017-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc. Reason for revert: It looks like this is breaking the android roll out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp" frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier Original change's description: > IWYU > > BUG=skia: > > Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee > Reviewed-on: https://skia-review.googlesource.com/8231 > Reviewed-by: Florin Malita <fmalita@chromium.org> > Commit-Queue: Mike Reed <reed@google.com> > TBR=fmalita@chromium.org,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a Reviewed-on: https://skia-review.googlesource.com/8346 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Enable threaded SkTaskGroup in ViewerGravatar csmartdalton2017-02-10
| | | | | | | | | BUG=skia: Change-Id: I7f467c094fb0bcb983bd86d07cb9bd7be34666b3 Reviewed-on: https://skia-review.googlesource.com/8332 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* IWYUGravatar Mike Reed2017-02-10
| | | | | | | | | BUG=skia: Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee Reviewed-on: https://skia-review.googlesource.com/8231 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Integrate the ImGui library with viewerGravatar Brian Osman2017-02-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code and docs are at: https://github.com/ocornut/imgui ImGui is an open source immediate mode GUI library that's lightweight and fairly simply to integrate. Widget functions return their state, and the library emits vertex and index data to render everything. It's got a huge set of built-in widgets and really robust layout control. For the initial integration, I had to fix up event handling in the viewer's app framework (to get mouse wheel and more keys, etc...). The new viewer 'Debug' window is toggled with the space bar. For this change, I've added one feature to that window: the slide picker. It's got a list of all slides, with filtering support, and the ability to click to switch slides. I also included the ImGui 'Demo' window (toggled with 'g'). This is nicely laid out, and includes examples of pretty much everything the library can do. It also serves as good documentation - find something that looks like what you want, and then go look at the corresponding code (all of it is in imgui_demo.cpp). I have other CLs with other features (like directly editing the primaries of the working color space), but I wanted to land this chunk first, then start adding more features. Other than adding new debugging features, there are few more outstanding work items: 1) Raster doesn't render the GUI correctly, due to non- invertible pos -> UV matrices. Florin is working on that. 2) Touch inputs aren't being routed yet, so the GUI isn't usable on Android yet. Might also be tough to work with, given the size. 3) ImGui has clipboard integration (that's why it wants the C, X, and V keys), but we need to wire it up to the OS' clipboard functions. 4) Draw commands can carry a void* payload to support drawing images (using whatever mechanism the engine has). I'd like to set that up (probably using SkImage*), which makes it really easy to add visualization of off-screen images in GMs, etc... BUG=skia: Change-Id: Iac2a63e37228d33141cb55b7e4d60bf11b7e9ae1 Reviewed-on: https://skia-review.googlesource.com/7702 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Improve viewer stats collection and displayGravatar Brian Osman2017-02-09
| | | | | | | | | | | | | Measure the time taken for animation and flush. Exclude UI and stats logic from the timing. Use stacked bars to visualize the breakdown of time within a frame. BUG=skia: Change-Id: I7ef84442a68147f02f65b6aa4452768fd3314de2 Reviewed-on: https://skia-review.googlesource.com/8227 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Fix viewer on AndroidGravatar Brian Osman2017-02-09
| | | | | | | | | | | | | We need libandroid in all scenarios, not just vulkan. Also, the logic for making an off-screen surface was wrong - causing us to try and make one in legacy mode. BUG=skia: Change-Id: I5ef2e3e2d46de96e9824f6a12a13f6310ea04f81 Reviewed-on: https://skia-review.googlesource.com/8252 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
* Update valgrind suppressionsGravatar Robert Phillips2017-02-08
| | | | | | | | | | It appears that the top-level function named has switched to just "main" Change-Id: I33a18a8d433867e759312d09e5b258f934f495a4 Reviewed-on: https://skia-review.googlesource.com/8194 Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Simplify viewer's handling of backbuffer surface and color spaceGravatar Brian Osman2017-02-08
| | | | | | | | | | | | | | | | | | | | | | | | | | WindowContext still supports color spaces, but not other color types. Any off-screen rendering is the app's responsibility. This change also adds (working) F16 support to viewer. Note that the previous 10-bit and FP16 support in WindowContext was broken. There was no code to push the off-screen canvas to the window. If you ever made it to the unreachable off-screen code path in createSurface, it would have simply stopped drawing. The decision to limit the window's gamut to sRGB is mostly driven by my desire to add real-time editing of gamut. This design lets us do that, without tearing down and rebuilding the window for every change. An application could still supply a different gamut via setDisplayParams and render directly to the back buffer with proper color correction. BUG=skia: Change-Id: I94df35c7a42faee396009acc83683e40bb3c284d Reviewed-on: https://skia-review.googlesource.com/8153 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | | Reland from: https://skia-review.googlesource.com/c/8021/ BUG=skia: Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a Reviewed-on: https://skia-review.googlesource.com/8136 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* fix tools/git-sync-depsGravatar Hal Canary2017-02-07
| | | | | | | Change-Id: I8755fd7a316d284627e25f88e02b69e2f67f9622 Reviewed-on: https://skia-review.googlesource.com/8126 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "SkColorSpace: remove named API, add gamut API"Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8. Reason for revert: Breaks everything Original change's description: > SkColorSpace: remove named API, add gamut API > > BUG=skia: > > Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 > Reviewed-on: https://skia-review.googlesource.com/8021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4 Reviewed-on: https://skia-review.googlesource.com/8127 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | BUG=skia: Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 Reviewed-on: https://skia-review.googlesource.com/8021 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Make iOS main() functions normal.Gravatar Mike Klein2017-02-06
| | | | | | | | | | | The weird foo_mains are no longer needed when we build with GN. CQ_INCLUDE_TRYBOTS=skia.primary:Build-Mac-Clang-arm-Debug-iOS Change-Id: Iae50696741e0dc277d96dda4968a1ae41cb17c8a Reviewed-on: https://skia-review.googlesource.com/8064 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Stephan Altmueller <stephana@google.com>
* Clean up more references to GYP.Gravatar Mike Klein2017-02-06
| | | | | | | | | | Delete files only used by GYP, and files that used GYP. Neither can possibly be actively used. Beyond that, just a couple doc tweaks. Change-Id: I0220d7226e7bb9ed7c54a7d8f2906a718313c521 Reviewed-on: https://skia-review.googlesource.com/8062 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Hal Canary <halcanary@google.com>