| OLD | NEW |
| 1 <!-- The <debugger-app-sk> custom element declaration. | 1 <!-- The <debugger-app-sk> custom element declaration. |
| 2 | 2 |
| 3 The main application element for the Skia Debugger. | 3 The main application element for the Skia Debugger. |
| 4 | 4 |
| 5 Attributes: | 5 Attributes: |
| 6 None. | 6 None. |
| 7 | 7 |
| 8 Events: | 8 Events: |
| 9 None. | 9 None. |
| 10 | 10 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 #colorBreakPoint { | 93 #colorBreakPoint { |
| 94 margin-left: 3em; | 94 margin-left: 3em; |
| 95 } | 95 } |
| 96 | 96 |
| 97 #download { | 97 #download { |
| 98 margin: 0 3em; | 98 margin: 0 3em; |
| 99 color: #1f78b4; | 99 color: #1f78b4; |
| 100 } | 100 } |
| 101 | 101 |
| 102 dbg-info-sk, | 102 dbg-info-sk, |
| 103 #srgbMode, | |
| 104 #clip { | 103 #clip { |
| 105 margin-left: 3em; | 104 margin-left: 3em; |
| 106 margin-bottom: 1em; | 105 margin-bottom: 1em; |
| 107 display: block; | 106 display: block; |
| 108 } | 107 } |
| 109 | 108 |
| 110 paper-radio-button { | 109 paper-radio-button { |
| 111 margin-left: 3em; | 110 margin-left: 3em; |
| 112 margin-bottom: 1em; | 111 margin-bottom: 1em; |
| 113 padding: 0; | 112 padding: 0; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 <div id=right class="layout vertical flex-2"> | 215 <div id=right class="layout vertical flex-2"> |
| 217 <details-sk open> | 216 <details-sk open> |
| 218 <summary-sk> | 217 <summary-sk> |
| 219 Color Mode | 218 Color Mode |
| 220 </summary-sk> | 219 </summary-sk> |
| 221 <paper-radio-group class="layout vertical" on-paper-radio-group-chan
ged="_colorModeChange" id=colorMode selected="[[_cmd.colorMode]]"> | 220 <paper-radio-group class="layout vertical" on-paper-radio-group-chan
ged="_colorModeChange" id=colorMode selected="[[_cmd.colorMode]]"> |
| 222 <paper-radio-button name="0">Linear 32-bit (Legacy)</paper-radio-b
utton> | 221 <paper-radio-button name="0">Linear 32-bit (Legacy)</paper-radio-b
utton> |
| 223 <paper-radio-button name="1">sRGB 32-bit</paper-radio-button> | 222 <paper-radio-button name="1">sRGB 32-bit</paper-radio-button> |
| 224 <paper-radio-button name="2">Linear half-precision float</paper-ra
dio-button> | 223 <paper-radio-button name="2">Linear half-precision float</paper-ra
dio-button> |
| 225 </paper-radio-group> | 224 </paper-radio-group> |
| 226 <paper-checkbox id=srgbMode checked="{{_isTrue(_cmd.srgbMode)}}" on-
tap="_srgbMode">Treat SkColor as sRGB</paper-checkbox> | |
| 227 </details-sk> | 225 </details-sk> |
| 228 <details-sk open> | 226 <details-sk open> |
| 229 <summary-sk> | 227 <summary-sk> |
| 230 Clip and Matrix | 228 Clip and Matrix |
| 231 </summary-sk> | 229 </summary-sk> |
| 232 <paper-checkbox id=clip on-tap="_clipHandler">Show Clip</paper-check
box> | 230 <paper-checkbox id=clip on-tap="_clipHandler">Show Clip</paper-check
box> |
| 233 <dbg-info-sk info="{{ info }}"></dbg-info-sk> | 231 <dbg-info-sk info="{{ info }}"></dbg-info-sk> |
| 234 </details-sk> | 232 </details-sk> |
| 235 | 233 |
| 236 <details-sk id=batchBoundsLegend class=hidden> | 234 <details-sk id=batchBoundsLegend class=hidden> |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 } | 429 } |
| 432 sk.post("/colorMode/" + e.target.selected, "").then(function() { | 430 sk.post("/colorMode/" + e.target.selected, "").then(function() { |
| 433 // Reloads the image and the JSON for all the commands. | 431 // Reloads the image and the JSON for all the commands. |
| 434 this._refreshPage(); | 432 this._refreshPage(); |
| 435 }.bind(this)).catch(function(err) { | 433 }.bind(this)).catch(function(err) { |
| 436 this.$.colorMode.selected = 0; | 434 this.$.colorMode.selected = 0; |
| 437 sk.errorMessage(err); | 435 sk.errorMessage(err); |
| 438 }.bind(this)); | 436 }.bind(this)); |
| 439 }, | 437 }, |
| 440 | 438 |
| 441 _srgbMode: function(e) { | |
| 442 // Ignore if this._cmd hasn't been loaded yet. | |
| 443 if (!this._cmd) { | |
| 444 return | |
| 445 } | |
| 446 // Don't do anything if the toggle and the mode already agree. | |
| 447 if (this.$.srgbMode.checked === this._cmd.srgbMode) { | |
| 448 return | |
| 449 } | |
| 450 sk.post("/srgbMode/" + (this.$.srgbMode.checked ? 1 : 0), "").then(funct
ion() { | |
| 451 // Reloads the image and the JSON for all the commands. | |
| 452 this._refreshPage(); | |
| 453 }.bind(this)).catch(function(err) { | |
| 454 this.$.srgbMode.checked = !this.$.srgbMode.checked; | |
| 455 sk.errorMessage(err); | |
| 456 }.bind(this)); | |
| 457 }, | |
| 458 | |
| 459 _gpuChange: function(e) { | 439 _gpuChange: function(e) { |
| 460 // Ignore if this._cmd hasn't been loaded yet. | 440 // Ignore if this._cmd hasn't been loaded yet. |
| 461 if (!this._cmd) { | 441 if (!this._cmd) { |
| 462 return | 442 return |
| 463 } | 443 } |
| 464 // Don't do anything if the toggle and the mode already agree. | 444 // Don't do anything if the toggle and the mode already agree. |
| 465 if (e.target.checked == (this._cmd.mode == "gpu")) { | 445 if (e.target.checked == (this._cmd.mode == "gpu")) { |
| 466 return | 446 return |
| 467 } | 447 } |
| 468 sk.post("/enableGPU/" + (e.target.checked ? 1 : 0), "").then(function()
{ | 448 sk.post("/enableGPU/" + (e.target.checked ? 1 : 0), "").then(function()
{ |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 prefixes.pop(); | 643 prefixes.pop(); |
| 664 commands[i]._depth = depth; | 644 commands[i]._depth = depth; |
| 665 commands[i]._prefix = prefixes.slice(); | 645 commands[i]._prefix = prefixes.slice(); |
| 666 } | 646 } |
| 667 } | 647 } |
| 668 return cmd; | 648 return cmd; |
| 669 } | 649 } |
| 670 }); | 650 }); |
| 671 })(); | 651 })(); |
| 672 </script> | 652 </script> |
| OLD | NEW |