| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 #colorBreakPoint { | 94 #colorBreakPoint { |
| 95 margin-left: 3em; | 95 margin-left: 3em; |
| 96 } | 96 } |
| 97 | 97 |
| 98 #download { | 98 #download { |
| 99 margin: 0 3em; | 99 margin: 0 3em; |
| 100 color: #1f78b4; | 100 color: #1f78b4; |
| 101 } | 101 } |
| 102 | 102 |
| 103 dbg-info-sk, | 103 dbg-info-sk, |
| 104 #srgbMode, |
| 104 #clip { | 105 #clip { |
| 105 margin-left: 3em; | 106 margin-left: 3em; |
| 106 margin-bottom: 1em; | 107 margin-bottom: 1em; |
| 107 display: block; | 108 display: block; |
| 108 } | 109 } |
| 109 | 110 |
| 110 paper-radio-button { | 111 paper-radio-button { |
| 111 margin-left: 3em; | 112 margin-left: 3em; |
| 112 margin-bottom: 1em; | 113 margin-bottom: 1em; |
| 113 padding: 0; | 114 padding: 0; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 <div id=right class="layout vertical flex-2"> | 191 <div id=right class="layout vertical flex-2"> |
| 191 <details-sk open> | 192 <details-sk open> |
| 192 <summary-sk> | 193 <summary-sk> |
| 193 Color Mode | 194 Color Mode |
| 194 </summary-sk> | 195 </summary-sk> |
| 195 <paper-radio-group class="layout vertical" on-paper-radio-group-ch
anged="_colorModeChange" id=colorMode selected="[[_cmd.colorMode]]"> | 196 <paper-radio-group class="layout vertical" on-paper-radio-group-ch
anged="_colorModeChange" id=colorMode selected="[[_cmd.colorMode]]"> |
| 196 <paper-radio-button name="0">Linear 32-bit (Legacy)</paper-radio
-button> | 197 <paper-radio-button name="0">Linear 32-bit (Legacy)</paper-radio
-button> |
| 197 <paper-radio-button name="1">sRGB 32-bit</paper-radio-button> | 198 <paper-radio-button name="1">sRGB 32-bit</paper-radio-button> |
| 198 <paper-radio-button name="2">Linear half-precision float</paper-
radio-button> | 199 <paper-radio-button name="2">Linear half-precision float</paper-
radio-button> |
| 199 </paper-radio-group> | 200 </paper-radio-group> |
| 201 <paper-checkbox id=srgbMode checked="{{_isTrue(_cmd.srgbMode)}}" o
n-tap="_srgbMode">Treat SkColor as sRGB</paper-checkbox> |
| 200 </details-sk> | 202 </details-sk> |
| 201 <details-sk open> | 203 <details-sk open> |
| 202 <summary-sk> | 204 <summary-sk> |
| 203 Clip and Matrix | 205 Clip and Matrix |
| 204 </summary-sk> | 206 </summary-sk> |
| 205 <paper-checkbox id=clip on-tap="_clipHandler">Show Clip</paper-che
ckbox> | 207 <paper-checkbox id=clip on-tap="_clipHandler">Show Clip</paper-che
ckbox> |
| 206 <dbg-info-sk info="{{ info }}"></dbg-info-sk> | 208 <dbg-info-sk info="{{ info }}"></dbg-info-sk> |
| 207 </details-sk> | 209 </details-sk> |
| 208 | 210 |
| 209 <details-sk id=batchBoundsLegend class=hidden> | 211 <details-sk id=batchBoundsLegend class=hidden> |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 394 } |
| 393 sk.post("/colorMode/" + e.target.selected, "").then(function() { | 395 sk.post("/colorMode/" + e.target.selected, "").then(function() { |
| 394 // Reloads the image and the JSON for all the commands. | 396 // Reloads the image and the JSON for all the commands. |
| 395 this._refreshPage(); | 397 this._refreshPage(); |
| 396 }.bind(this)).catch(function(err) { | 398 }.bind(this)).catch(function(err) { |
| 397 this.$.colorMode.selected = 0; | 399 this.$.colorMode.selected = 0; |
| 398 sk.errorMessage(err); | 400 sk.errorMessage(err); |
| 399 }.bind(this)); | 401 }.bind(this)); |
| 400 }, | 402 }, |
| 401 | 403 |
| 404 _srgbMode: function(e) { |
| 405 // Ignore if this._cmd hasn't been loaded yet. |
| 406 if (!this._cmd) { |
| 407 return |
| 408 } |
| 409 // Don't do anything if the toggle and the mode already agree. |
| 410 if (this.$.srgbMode.checked === this._cmd.srgbMode) { |
| 411 return |
| 412 } |
| 413 sk.post("/srgbMode/" + (this.$.srgbMode.checked ? 1 : 0), "").then(funct
ion() { |
| 414 // Reloads the image and the JSON for all the commands. |
| 415 this._refreshPage(); |
| 416 }.bind(this)).catch(function(err) { |
| 417 this.$.srgbMode.checked = !this.$.srgbMode.checked; |
| 418 sk.errorMessage(err); |
| 419 }.bind(this)); |
| 420 }, |
| 421 |
| 402 _gpuChange: function(e) { | 422 _gpuChange: function(e) { |
| 403 // Ignore if this._cmd hasn't been loaded yet. | 423 // Ignore if this._cmd hasn't been loaded yet. |
| 404 if (!this._cmd) { | 424 if (!this._cmd) { |
| 405 return | 425 return |
| 406 } | 426 } |
| 407 // Don't do anything if the toggle and the mode already agree. | 427 // Don't do anything if the toggle and the mode already agree. |
| 408 if (e.target.checked == (this._cmd.mode == "gpu")) { | 428 if (e.target.checked == (this._cmd.mode == "gpu")) { |
| 409 return | 429 return |
| 410 } | 430 } |
| 411 sk.post("/enableGPU/" + (e.target.checked ? 1 : 0), "").then(function()
{ | 431 sk.post("/enableGPU/" + (e.target.checked ? 1 : 0), "").then(function()
{ |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 prefixes.pop(); | 626 prefixes.pop(); |
| 607 commands[i]._depth = depth; | 627 commands[i]._depth = depth; |
| 608 commands[i]._prefix = prefixes.slice(); | 628 commands[i]._prefix = prefixes.slice(); |
| 609 } | 629 } |
| 610 } | 630 } |
| 611 return cmd; | 631 return cmd; |
| 612 } | 632 } |
| 613 }); | 633 }); |
| 614 })(); | 634 })(); |
| 615 </script> | 635 </script> |
| OLD | NEW |