aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleApp.h
Commit message (Collapse)AuthorAge
* Remove SampleApp and convert HelloWorld to sk_appGravatar Brian Osman2017-11-21
| | | | | | | | | | | | | There is still a large amount of views code that could be trimmed down, but which is used to implement samples (in viewer). Seemed simpler to remove some of this code in pieces. Bug: skia: Change-Id: Ia3415060d03c8de604a154e3dc38379b754daab6 Reviewed-on: https://skia-review.googlesource.com/72801 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Add measurement command line args to SampleAppGravatar Yuqian Li2017-09-25
| | | | | | | | | | | | | | | | | This way, we may be able to use SampleApp as a performance benchmark tool that's closer to real-world use cases than nanobench. For example, we can now run ./out/Release/SampleApp --slide Chart --backendTiles 8 --measureMS 2000 to test the threaded backend. Bug: skia: Change-Id: I92b177624bc8d16c5b4d3ad122319882e8783101 Reviewed-on: https://skia-review.googlesource.com/50801 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Let SampleApp provide the thread poolGravatar Yuqian Li2017-09-01
| | | | | | | | | | | | | | Otherwise, creating a new thread pool each frame could be a major bottleneck. Somehow, creating new thread pool each frame is good for measuring FPS, so that behavior is maintained when fMeasureFPS is true. I'm still doing experiments with my own schedulers. Once they get more stable, I'll probably apply their changes to the SkExecutor. Bug: skia: Change-Id: Iead96034e0d0abdebb5069dec41215990f71f693 Reviewed-on: https://skia-review.googlesource.com/41845 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Revert "pass surface to device-manager"Gravatar Ben Wagner2017-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7b215bcad3034aca262ca4eeebe31b5e8868638b. Reason for revert: SampleApp on Linux doesn't ever draw anything. Original change's description: > pass surface to device-manager > > Bug: skia:3216 > Change-Id: I8e00e9eca3763593a4071c16a3ab04c46bf83a3e > Reviewed-on: https://skia-review.googlesource.com/26020 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=bsalomon@google.com,reed@google.com Change-Id: I55f1292ab772bfe8fb1efb74f591b05bbe24d054 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:3216 Reviewed-on: https://skia-review.googlesource.com/26161 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* pass surface to device-managerGravatar Mike Reed2017-07-23
| | | | | | | | Bug: skia:3216 Change-Id: I8e00e9eca3763593a4071c16a3ab04c46bf83a3e Reviewed-on: https://skia-review.googlesource.com/26020 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add TiledDrawScheduler so we can concurrently draw and enqueGravatar Yuqian Li2017-06-05
| | | | | | | | | | | | | | | | | (instead of finishing enque before draw). The highlight is that we can now achieve 9x speedup compared to 5x in all our previous approaches (including multi-picture draw). The schedulers here are experimental. I'd like to move on to try initializing once for each draw before further polishing and optimizing the schedule mechanism. Bug: skia: Change-Id: Idc3d030d475af9645c24c5372ff62b9a402206cc Reviewed-on: https://skia-review.googlesource.com/17826 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add cumulative fps to SampleAppGravatar Yuqian Li2017-05-24
| | | | | | | | | | | | | | | In some samples (whose frame time is really really small), the fps number jumps so fast that I can hardly see even the first digit of the number. This problem will become more severe for threaded backend which substantially lowers the frame time. Taking an average over a long time would give me a much more stable fps number. Bug: skia: Change-Id: Ie6052b4735d9410d5e644331bf025b5bf9f40323 Reviewed-on: https://skia-review.googlesource.com/17823 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
* Add SkThreadedBMPDevice for Threaded Raster BackendGravatar Yuqian Li2017-04-03
| | | | | | | | | BUG=skia: Change-Id: I882b6563c735796f3a4dcd19f6c79e7efd8306ae Reviewed-on: https://skia-review.googlesource.com/10505 Commit-Queue: Yuqian Li <liyuqian@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Mark overridden destructors with 'override' and remove 'virtual'Gravatar Brian Salomon2017-03-22
| | | | | | | | | This silences a new warning in clang 5.0 Change-Id: Ieb5b75a6ffed60107c3fd16075d2ecfd515b55e8 Reviewed-on: https://skia-review.googlesource.com/10006 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* 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>
* Remove SkAutoTDelete.Gravatar Ben Wagner2016-11-03
| | | | | | | | | Replace with std::unique_ptr. Change-Id: I5806cfbb30515fcb20e5e66ce13fb5f3b8728176 Reviewed-on: https://skia-review.googlesource.com/4381 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix iOS surface creation for SampleAppGravatar jvanverth2016-10-10
| | | | | | | | BUG=skia:5810 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2394843003 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2394843003
* Support monitor profile in SampleApp (on Windows)Gravatar brianosman2016-09-29
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2381913003 Review-Url: https://codereview.chromium.org/2381913003
* add pipecanvasGravatar reed2016-09-13
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2201323003 Review-Url: https://codereview.chromium.org/2201323003
* Remove use of MakeRenderTargetDirect from view systemGravatar robertphillips2016-07-28
| | | | | | | | Here is the CL that sent me down the SkGammaColorFilter path GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2178353005 Review-Url: https://codereview.chromium.org/2178353005
* deferred canvasGravatar reed2016-07-08
| | | | | | | | | tries to eliminate unneeded clipRects and concats (and their associated save/restores). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2120333002 Review-Url: https://codereview.chromium.org/2120333002
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | | Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170 Review-Url: https://codereview.chromium.org/2069173002
* Revert of Lots of progress switching to SkColorSpace rather than ↵Gravatar brianosman2016-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | SkColorProfileType (patchset #10 id:180001 of https://codereview.chromium.org/2069173002/ ) Reason for revert: Mac crashes in GrUploadPixmapToTexture Original issue's description: > Lots of progress on switching to SkColorSpace rather than SkColorProfileType > > Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 > > Committed: https://skia.googlesource.com/skia/+/6a61a875467646f8dbc37cfecf49e12d1f475170 TBR=reed@google.com,herb@google.com,msarett@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/2072813002
* Lots of progress on switching to SkColorSpace rather than SkColorProfileTypeGravatar brianosman2016-06-16
| | | | | | | | | Fixed a bunch of code in Ganesh, as well as usage of SkColorProfileType in most of our tools (DM, SampleApp, Viewer, nanobench, skiaserve, HelloWorld). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069173002 Review-Url: https://codereview.chromium.org/2069173002
* Remove command buffer sample app support.Gravatar bsalomon2016-06-14
| | | | | | | | | | This hasn't compiled for months. We are deemphasizing SampleApp in favor of viewer. Windowed command buffer is not currently something we currently plan to maintain. TBR=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2061233002 Review-Url: https://codereview.chromium.org/2061233002
* Move SkTypeface to sk_sp.Gravatar bungeman2016-05-12
| | | | | | | Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933393002 Review-Url: https://codereview.chromium.org/1933393002
* Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of ↵Gravatar scroggo2016-05-12
| | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1933393002/ ) Reason for revert: fontmgr_iterAndroid failing to draw emoji. E.g. https://gold.skia.org/search2?blame=6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm Original issue's description: > Move SkTypeface to sk_sp. > > Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f TBR=reed@google.com,fmalita@chromium.org,tomhudson@google.com,bungeman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1974783002
* Move SkTypeface to sk_sp.Gravatar bungeman2016-05-11
| | | | Review-Url: https://codereview.chromium.org/1933393002
* Added --deepColor option to SampleApp, triggers creation of a ten-bit/channelGravatar brianosman2016-05-05
| | | | | | | | | | buffer. (Only on Windows at the moment). Uses new effect to do the final gamma adjustment BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1919993002 Review-Url: https://codereview.chromium.org/1919993002
* documentation: SkDocument::MakePDF()Gravatar halcanary2016-05-03
| | | | | | | | | also, update some tools. DOCS_PREVIEW= https://skia.org/user/sample/pdf?cl=1936283003 DOCS_PREVIEW= https://skia.org/user/api/canvas?cl=1936283003 Review-Url: https://codereview.chromium.org/1936283003
* Add 'P' to SampleApp to cycle through pixel geometries.Gravatar bungeman2016-03-31
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1834243002 Review URL: https://codereview.chromium.org/1834243002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Force tiles in SampleApp to integer boundaries.Gravatar bungeman2016-03-03
| | | | | | | | | | | | | | | | | | The current behavior is to create tiles from the rounded ideal tile size, tell the tile that it's upper left pixel is at the ideal location, and then draw those tiles at the ideal locations. As a result, the tiles are be out of phase with each other internally and then actually drawn at the rounded pixel location instead of the ideal location. The new behavior is to always round up to get the tile size, make the tile translation an integer offset, and then draw at the exact pixel. This also modifies SampleApp to use the numeric keypad to provide an extra manual 1/32 pixel translation for fine grained movement. BUG=skia:5020 Review URL: https://codereview.chromium.org/1763833002
* Revert of Implement support for using GL ES 3.0 with command buffer ↵Gravatar kkinnunen2016-03-03
| | | | | | | | | | | | | | | | | | | | | | | | (patchset #6 id:100001 of https://codereview.chromium.org/1684413003/ ) Reason for revert: The dependency, ES3 implementation in command_buffer_gles2, got reverted. Original issue's description: > Implement support for using GL ES 3.0 with command buffer > > Adds a new 'api': --config gpu(api=commandbuffer3) for dm/nanobench. > > BUG=skia:4943 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684413003 > > Committed: https://skia.googlesource.com/skia/+/45c2c8166bbd84a87e29fdd344b39e36e8a28a3f TBR=bsalomon@google.com # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=skia:4943 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1744963002 Review URL: https://codereview.chromium.org/1744963002
* Implement support for using GL ES 3.0 with command bufferGravatar kkinnunen2016-02-25
| | | | | | | | | Adds a new 'api': --config gpu(api=commandbuffer3) for dm/nanobench. BUG=skia:4943 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1684413003 Review URL: https://codereview.chromium.org/1684413003
* blitters for sRGB and float16Gravatar reed2016-02-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1697863002 Review URL: https://codereview.chromium.org/1697863002
* remove MPD for now, to simplify thingsGravatar reed2016-01-08
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1564343003 Review URL: https://codereview.chromium.org/1564343003
* remove SkGPipeGravatar reed2016-01-08
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1568883003 Review URL: https://codereview.chromium.org/1568883003
* SampleApp: remove Picture_DeviceTypeGravatar kkinnunen2016-01-05
| | | | | | | | | | | | | | | | | | | | | | | Remove Picture_DeviceType from SampleApp SampleWindow DeviceType enumeration. Use a bool variable to control whether the drawing happens via MultiPictureDraw. The MultiPictureDraw mode can be activated by 'M', and title is updated to contain "<MPD>". Previously the MPD mode was inaccessible. This works towards removing backend specific code from SampleApp and VisualBench with the aim to move the code to the common SkView framework (SkWindow in particular). The grand goal is to be able to use command buffer GPU API and NVPR in these apps. BUG=skia:4733 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1538343002 Review URL: https://codereview.chromium.org/1538343002
* skia: add ability to load command_buffer_gles2Gravatar hendrikw2015-08-27
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1306823003
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* remove SkDeferredCanvasGravatar reed2015-08-19
| | | | | | | | Waiting a day or so to see if the blink-removal of SkDeferredCanvas sticks BUG=skia: Review URL: https://codereview.chromium.org/1269093002
* Add high resolution WallTimer to SampleAppGravatar jvanverth2015-08-11
| | | | | | Gives better than 1 ms results when timing framerate. Review URL: https://codereview.chromium.org/1288473002
* - allow for stepping through a picture with 'n' and 'p'Gravatar reed2015-08-04
| | | | | | | | | - save current slide as .skp with 'K' BUG=skia: TBR= Review URL: https://codereview.chromium.org/1272063002
* remove SkInstCntGravatar mtklein2015-06-26
| | | | | | | | | | | | | | It's been outclassed by Valgrind and leak sanitizer, and it seems to be causing problems for external folks building Skia. I'm not sure why our own builds seem unaffected. Latest thread: https://groups.google.com/forum/#!topic/skia-discuss/oj9FsQwwSF0 BUG=skia: Review URL: https://codereview.chromium.org/1217573002
* Use SkPaintFilterCanvas for SampleApp paint filteringGravatar fmalita2015-06-15
| | | | | | | | | (one less SkDrawFilter user) BUG=skia:3587 R=robertphillips@google.com,reed@google.com Review URL: https://codereview.chromium.org/1177323002
* add DeferredCanvas mode to SampleAppGravatar reed2015-05-05
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1129603002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* SkPaint::FilterLevel -> SkFilterQualityGravatar reed2015-03-16
| | | | | | | | | clone (+rebase) of https://codereview.chromium.org/1009183002/ BUG=skia: TBR=scroggo@google.com Review URL: https://codereview.chromium.org/1014533004
* remove dead code from sampleapp, trim bad assertsGravatar reed2015-02-21
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/948693002
* Support multiple null GL contexts on a thread.Gravatar bsalomon2015-02-11
| | | | | | | | This has the side effect of requiring SkNullGLContext to use the null GL interface. It exposes SkNullGLContext and also removes null context support from SampleApp. Review URL: https://codereview.chromium.org/916733002
* add SkAnimTimer, SPACE = pause/resume, ESP = stopGravatar reed2015-02-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/894083003
* allow GMs to animateGravatar reed2015-02-01
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/888283002
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* use SkDocument to capture pdfs from SampleApp 'e'Gravatar reed2014-10-08
| | | | | | | | BUG=skia: TBR= NOTRY=True Review URL: https://codereview.chromium.org/634293004