Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(673)

Issue 1955293002: Add flexible keybinding/command system to sk_app (Closed)

Created:
4 years, 7 months ago by Brian Osman
Modified:
4 years, 7 months ago
Reviewers:
jvanverth1, bsalomon
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add flexible keybinding/command system to sk_app. Viewer demonstrates use: Just create an instance of CommandSet, register with the window, and add commands. Hopefully, we can keep all commands in one place, and get some nice side-benefits. With this framework, if you want to add a new command, you are only required to add code in ONE place. And you get added to the help screen, for free. CommandSet automatically binds 'h' to cycle through the help modes. (Functional grouping is most useful for general use, but the other mode is nice to know what a key does, or to find an unused key for a new feature). Grouped by function: https://screenshot.googleplex.com/G5h3f52wFKu.png Alphabetical by key: https://screenshot.googleplex.com/nZiopabLKJ6.png BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955293002 Committed: https://skia.googlesource.com/skia/+/622c8d5de12f264e496e8d4664a2eea9333922d0

Patch Set 1 #

Patch Set 2 : Extract keybinding system as CommandSet. Add grouping and two help modes. #

Total comments: 2

Patch Set 3 : Comment CommandSet. Remove _Key suffix from Window::Key values #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -124 lines) Patch
M tools/viewer/Viewer.h View 1 3 chunks +2 lines, -2 lines 0 comments Download
M tools/viewer/Viewer.cpp View 1 2 4 chunks +40 lines, -76 lines 0 comments Download
A tools/viewer/sk_app/CommandSet.h View 1 2 1 chunk +107 lines, -0 lines 0 comments Download
A tools/viewer/sk_app/CommandSet.cpp View 1 1 chunk +157 lines, -0 lines 0 comments Download
M tools/viewer/sk_app/Window.h View 1 2 1 chunk +38 lines, -38 lines 0 comments Download
M tools/viewer/sk_app/win/Window_win.cpp View 1 2 1 chunk +8 lines, -8 lines 0 comments Download

Messages

Total messages: 33 (15 generated)
Brian Osman
4 years, 7 months ago (2016-05-08 16:22:16 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1955293002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1955293002/1
4 years, 7 months ago (2016-05-08 16:22:53 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-08 16:48:44 UTC) #8
bsalomon
This looks super handy. Should we factor it out as a helper in sk_app that ...
4 years, 7 months ago (2016-05-09 13:20:58 UTC) #9
jvanverth1
On 2016/05/09 13:20:58, bsalomon wrote: > This looks super handy. Should we factor it out ...
4 years, 7 months ago (2016-05-09 13:33:31 UTC) #10
Brian Osman
On 2016/05/09 13:33:31, jvanverth1 wrote: > On 2016/05/09 13:20:58, bsalomon wrote: > > This looks ...
4 years, 7 months ago (2016-05-09 16:21:24 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1955293002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1955293002/20001
4 years, 7 months ago (2016-05-09 19:48:38 UTC) #14
Brian Osman
Better.
4 years, 7 months ago (2016-05-09 19:48:53 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-09 20:10:45 UTC) #17
bsalomon
lgtm with some minor comments inline https://codereview.chromium.org/1955293002/diff/20001/tools/viewer/sk_app/CommandSet.h File tools/viewer/sk_app/CommandSet.h (right): https://codereview.chromium.org/1955293002/diff/20001/tools/viewer/sk_app/CommandSet.h#newcode20 tools/viewer/sk_app/CommandSet.h:20: class CommandSet { ...
4 years, 7 months ago (2016-05-09 20:25:53 UTC) #18
Brian Osman
Addressed review issues.
4 years, 7 months ago (2016-05-09 20:47:00 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1955293002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1955293002/40001
4 years, 7 months ago (2016-05-09 21:04:45 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/8421) skia_presubmit-Trybot on ...
4 years, 7 months ago (2016-05-09 21:06:15 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1955293002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1955293002/60001
4 years, 7 months ago (2016-05-09 21:16:35 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-09 21:38:08 UTC) #27
jvanverth1
If you're waiting on me, lgtm
4 years, 7 months ago (2016-05-10 12:55:49 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1955293002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1955293002/60001
4 years, 7 months ago (2016-05-10 13:49:58 UTC) #31
commit-bot: I haz the power
4 years, 7 months ago (2016-05-10 13:50:52 UTC) #33
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://skia.googlesource.com/skia/+/622c8d5de12f264e496e8d4664a2eea9333922d0

Powered by Google App Engine
This is Rietveld 408576698