aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer
Commit message (Collapse)AuthorAge
* Touch input support for WindowsGravatar Brian Osman2017-06-07
| | | | | | | | | | | | | | | | | | | Had to add some logic to avoid touch and mouse cross-talk, because (at least on my laptop), the touch screen generates both kinds of events. This seems really useful [1] for the many [2] Skia developers with touch-enabled Windows devices. ---------- 1: No, not really. 2: N = 1? Bug: skia: Change-Id: Ib888bf4198f2cc0a29a31581ec4b64d3d9008c33 Reviewed-on: https://skia-review.googlesource.com/18920 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Simplify some Viewer code, and fix a few bugsGravatar Brian Osman2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The content rect was always identical to the window rect, so most of the related code did nothing. The translation limit code is always useful (to avoid dragging the slide way off-screen with the mouse), so always include it. The auto-scaling to fit the screen is also still useful, but just base it on the window rect. The zoom code has four state variables, only used two of them, and one was a trivially derived computation. Fold most of that work into computeMatrix. (The translation was always zero -- we never changed the zoom center.) Include fDefaultMatrix in the matrix from computeMatrix, rather than needing to apply it specially to the canvas. Don't apply the inverse default matrix to touch or mouse points. The absolute positions of those touch points is not important, but because that matrix includes scale (and sometimes very large or very small scale), it just had the effect of greatly amplifying or damping the drag speed. Without it, the slide always pans at the speed of the touch/mouse drag -- which seems more desirable. The use of the inverse default matrix was a clever trick, but it caused the translation (applied to the global mtx) to be scaled, so the slide was always pinned incorrectly. Instead, supply the unmodified window rect and the default matrix, so the trans limit code can do the obvious correct thing: xform the slide bounds completely, then limit the translation that will be applied after that. Slides are now correctly pinned to screen edge regardless of how much zoom is present in the default matrix. Note: There are still several bugs related to all of this code, but given the web of xform state, it's hard to unravel. The touch gesture still doesn't know about viewer's zoom, so that's ignored when doing the pinning. Beyond that, it doesn't even know about window resize - it only configures the translation limit when setting up a slide. I had a fix for all of this (doing the translation limiting in computeMatrix), but then the touch gesture doesn't know about it, and can accumulate drag motion that needs to be un-dragged to get back on-screen, even though the slide is never really translated that far. SkTouchGesture is in include. No one uses it except viewer: TBR=bsalomon@google.com Bug: skia: Change-Id: I460cc07c3de6d36e63826f57d359faf1facf5ab3 Reviewed-on: https://skia-review.googlesource.com/18524 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Implement an SkImage backed by a Android hardware bufferGravatar Stan Iliev2017-06-02
| | | | | | | | | | | | | | Create a new SkImage public API to make an image from an Android hardware buffer. Implementation is using a SkImageGenerator derived class GrAndroidBufferImageGenerator. A new EGLImage texture is created, which is then wrapped with GrTextureProxy. Bug: skia: Change-Id: I610a4c5a58198686ce7c03e9a0adad3f9d2342e0 Reviewed-on: https://skia-review.googlesource.com/17789 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* Fix resource and skp paths in Android viewerGravatar Brian Salomon2017-05-26
| | | | | | | | | Docs-Preview: https://skia.org/?cl=18037 Change-Id: If92e561c6c24de1f51f81477d89b927e10308f13 Reviewed-on: https://skia-review.googlesource.com/18037 Reviewed-by: Derek Sollenberger <djsollen@google.com> Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Modify SkEventTracer::SetInstance to fail rather than assert if a tracer has ↵Gravatar Brian Salomon2017-05-12
| | | | | | | | | | | | already been installed. Chromium usually calls SetInstance once per process. However, when run in single process more renderer threads will try to set the instance after the browser process already has done so. This allows them to fail gracefully without asserting. Bug: skia:6603 Change-Id: Ic8a35422d787335aa67eefc07d0658f0fbe73db4 Reviewed-on: https://skia-review.googlesource.com/16664 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Add ShadowUtils sample.Gravatar Jim Van Verth2017-05-04
| | | | | | | | | Also enables mouse support in Viewer. Change-Id: Iaed08d42a64f591f0cd9b24684b3aee43404ed94 Reviewed-on: https://skia-review.googlesource.com/15313 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add wireframe mode to Viewer.Gravatar Jim Van Verth2017-05-02
| | | | | | | Change-Id: I0ff11088465a4702acf9841a791d76f286ddbaf1 Reviewed-on: https://skia-review.googlesource.com/15147 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Make GrBackendTexture take Gr*Info refs in ctor, and copy them.Gravatar Greg Daniel2017-05-02
| | | | | | | | | Bug: skia: Change-Id: Ic05d3384fa07560fc18c52bb8ae03541a72515f7 Reviewed-on: https://skia-review.googlesource.com/14374 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia""Gravatar Greg Daniel2017-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e3bd422fafc74dd3410c3de24a576635be92c3b4. Reason for revert: Pre-req changes have all landed in other projects at this point. Original change's description: > Revert "Plumb the use of GrBackendRenderTarget throughout Skia" > > This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. > > Reason for revert: Apparently I have a few more build files to update before this can land. > > Original change's description: > > Plumb the use of GrBackendRenderTarget throughout Skia > > > > Bug: skia: > > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > > Reviewed-on: https://skia-review.googlesource.com/14148 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Reviewed-by: Robert Phillips <robertphillips@google.com> > > Commit-Queue: Greg Daniel <egdaniel@google.com> > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f > Reviewed-on: https://skia-review.googlesource.com/14531 > Reviewed-by: Greg Daniel <egdaniel@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ib7ab94aada8a7cb80fe38f24daf32f9208c5b169 Reviewed-on: https://skia-review.googlesource.com/14826 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* add helper makeShader for the common Clamp caseGravatar Mike Reed2017-04-28
| | | | | | | | Bug: skia: Change-Id: I22cac56f35fed16daede0cf1b3e34dfa6f5ae3ea Reviewed-on: https://skia-review.googlesource.com/14625 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Plumb the use of GrBackendRenderTarget throughout Skia"Gravatar Greg Daniel2017-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. Reason for revert: Apparently I have a few more build files to update before this can land. Original change's description: > Plumb the use of GrBackendRenderTarget throughout Skia > > Bug: skia: > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > Reviewed-on: https://skia-review.googlesource.com/14148 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Greg Daniel <egdaniel@google.com> > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f Reviewed-on: https://skia-review.googlesource.com/14531 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Plumb the use of GrBackendRenderTarget throughout SkiaGravatar Greg Daniel2017-04-27
| | | | | | | | | Bug: skia: Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa Reviewed-on: https://skia-review.googlesource.com/14148 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add new GrVkBackendContext::Create explicitly requiring vk proc gettersGravatar Brian Salomon2017-04-24
| | | | | | | | | Also remove the feature of GrVkGpu that creates the instance/device if the client doesn't provide one. Change-Id: Ie617313b6c684ed355333a475b80d0aae7e3a026 Reviewed-on: https://skia-review.googlesource.com/14261 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Disable use of directly wrapping msaa RTs on VulkanGravatar Greg Daniel2017-04-20
| | | | | | | | | | | | | | | Currently the Vulkan backend is set up to always treat the "resolve" target as the main VkImage in a render target and the msaa is a side cart image. This makes it difficult to just wrap an msaa image that we don't own. However, unlike GL the equivalent FBO 0 will never be multisampled so there isn't much use for the functionality. Once we find a need for it we can find a way to refactor to make it work. Bug: skia: Change-Id: I121e9c72a70c2a6f1aaddba2dbae19d8bddc3998 Reviewed-on: https://skia-review.googlesource.com/13980 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Add backend safe classes for passing in external texture and render targets ↵Gravatar Greg Daniel2017-04-18
| | | | | | | | | | | | | | | | | into gpu This CL adds the GrBackend* classes as well as just updates the API for SkSurface and SkImage. The implementation on SkSurface/Image and the plumbing down into Ganesh will be in an additional CL. Besides the change to use the type safe classes, we also pull the SurfaceFlags, origin, samples, out of the descriptor and pass those in directly. Bug: skia: Change-Id: I9702981fe26c3d5d7d2cbcf6977ba569d356d854 Reviewed-on: https://skia-review.googlesource.com/13122 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* move vertex-mode enum into SkVerticesGravatar Mike Reed2017-04-03
| | | | | | | | | BUG=skia:6366 Change-Id: I3c0bf96cce6d32c9b8d12d16a772aaa6f18981aa Reviewed-on: https://skia-review.googlesource.com/11062 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Detect RenderDoc in Windows viewer and make a core profileGravatar Brian Osman2017-03-17
| | | | | | | | | BUG=skia: Change-Id: I03a8a1b1ed9bd2483ddd8e231ba54dc10753b454 Reviewed-on: https://skia-review.googlesource.com/9836 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Rename GrAADistanceFieldPathRenderer to GrSmallPathRendererGravatar Jim Van Verth2017-03-16
| | | | | | | | | Also disables use of small distance fields in Android framework. Change-Id: I1ba40ce85aa34d067608587e1fbe1d42e8a42868 Reviewed-on: https://skia-review.googlesource.com/9731 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com>
* Viewer's nonlinear blend mode uses SkColorSpaceXformCanvasGravatar Brian Osman2017-03-15
| | | | | | | | | | | Also avoid asserting when untagged images are being transformed. BUG=skia: Change-Id: If712f39b5f588b2bc3dc318a5b782badb7662ccf Reviewed-on: https://skia-review.googlesource.com/9695 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Added MSAA selection to viewer GUIGravatar Brian Osman2017-03-08
| | | | | | | | | | | | | | | | On Windows, we need to reconstruct the window to allow setting a new pixel format with a different sample count. Added some code that maintains window size/position across these changes. Previously, just cycling through backends would cause the window to move, as the "default" position would cycle across the screen. Now it's pinned. BUG=skia: Change-Id: Iecbe7a490577382043ffe5a88c910b4c0be2ed5c Reviewed-on: https://skia-review.googlesource.com/9085 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Maintain window position and size when re-createdGravatar Brian Osman2017-03-08
| | | | | | | | | | | Eliminates a UI oddity on Windows when cycling through backends. BUG=skia: Change-Id: I83f0325054def80bb9b6e5a9886461f8aad215ae Reviewed-on: https://skia-review.googlesource.com/9453 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Add instanced rendering command line flag to viewer.Gravatar Brian Salomon2017-03-08
| | | | | | | | | Previously this could only be turned on at runtime. Change-Id: I1b626584fba17fcf8ff64135dd93f98c7f40821d Reviewed-on: https://skia-review.googlesource.com/9445 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Use glXCreateContextAttribsARB in viewer to make it easier to attach RenderDoc.Gravatar Brian Salomon2017-03-08
| | | | | | | Change-Id: I0cc82fe826b81a082b579f60af3d9ef35d5fe351 Reviewed-on: https://skia-review.googlesource.com/9407 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
* Add viewer GUI options for desktop and Android to toggle instanced rendering.Gravatar Brian Salomon2017-03-07
| | | | | | | | | BUG=skia: Change-Id: I42674abfb7ee764f676100ac0e84cc0f07620bec Reviewed-on: https://skia-review.googlesource.com/9396 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add legacy++ to viewer (sRGB w/nonlinear blending)Gravatar Brian Osman2017-03-06
| | | | | | | | | BUG=skia:6242 Change-Id: I696de8eac61aebaf5cb07d8874bde3c7bd470277 Reviewed-on: https://skia-review.googlesource.com/9299 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Remove PLS path rendererGravatar Brian Salomon2017-03-06
| | | | | | | Change-Id: Ib727b0749a5a7da95832970e79804417e8b6a247 Reviewed-on: https://skia-review.googlesource.com/9300 Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Add path renderer options to viewer GUIGravatar Brian Osman2017-03-01
| | | | | | | | | | BUG=skia: Change-Id: I248ba081f0229d7fcf2071009076acc88b80b076 Reviewed-on: https://skia-review.googlesource.com/9088 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Set window dimensions in raster on UnixGravatar Brian Osman2017-03-01
| | | | | | | | | | | | These values were left uninitialized, leading to problems with the GUI in raster configs. BUG=skia: Change-Id: Ia8c16112e53b74daf66941d2923327c9732cf432 Reviewed-on: https://skia-review.googlesource.com/9114 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Initialize XImage struct fullyGravatar Brian Osman2017-03-01
| | | | | | | | | | | | I was getting sporadic failures from XInitImage (causing the raster backend to not draw anything). BUG=skia: Change-Id: Ied79f2b5354d89c146aca64d70fde8cf9f3ab62e Reviewed-on: https://skia-review.googlesource.com/9102 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Brian Osman <brianosman@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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>