| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SKDEBUGGER_H_ | 10 #ifndef SKDEBUGGER_H_ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 void rewind(); | 37 void rewind(); |
| 38 | 38 |
| 39 bool isCommandVisible(int index) { | 39 bool isCommandVisible(int index) { |
| 40 return fDebugCanvas->getDrawCommandVisibilityAt(index); | 40 return fDebugCanvas->getDrawCommandVisibilityAt(index); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void setCommandVisible(int index, bool isVisible) { | 43 void setCommandVisible(int index, bool isVisible) { |
| 44 fDebugCanvas->toggleCommand(index, isVisible); | 44 fDebugCanvas->toggleCommand(index, isVisible); |
| 45 } | 45 } |
| 46 | 46 |
| 47 SkTArray<SkString>* getDrawCommandsAsStrings() { | 47 SkDrawCommand* getDrawCommandAt(int index) { |
| 48 return fDebugCanvas->getDrawCommandsAsStrings(); | 48 return fDebugCanvas->getDrawCommandAt(index); |
| 49 } | |
| 50 | |
| 51 SkTDArray<size_t>* getDrawCommandOffsets() { | |
| 52 return fDebugCanvas->getDrawCommandOffsets(); | |
| 53 } | 49 } |
| 54 | 50 |
| 55 const SkTDArray<SkDrawCommand*>& getDrawCommands() const { | 51 const SkTDArray<SkDrawCommand*>& getDrawCommands() const { |
| 56 return fDebugCanvas->getDrawCommands(); | 52 return fDebugCanvas->getDrawCommands(); |
| 57 } | 53 } |
| 58 | 54 |
| 59 void highlightCurrentCommand(bool on) { | 55 void highlightCurrentCommand(bool on) { |
| 60 fDebugCanvas->toggleFilter(on); | 56 fDebugCanvas->toggleFilter(on); |
| 61 } | 57 } |
| 62 | 58 |
| 63 void setWindowSize(int width, int height) { fDebugCanvas->setWindowSize(widt
h, height); } | 59 void setWindowSize(int width, int height) { fDebugCanvas->setWindowSize(widt
h, height); } |
| 64 | 60 |
| 65 void loadPicture(SkPicture* picture); | 61 void loadPicture(SkPicture* picture); |
| 66 | 62 |
| 67 SkPicture* copyPicture(); | 63 SkPicture* copyPicture(); |
| 68 | 64 |
| 69 int getSize() { | 65 int getSize() const { |
| 70 return fDebugCanvas->getSize(); | 66 return fDebugCanvas->getSize(); |
| 71 } | 67 } |
| 72 | 68 |
| 73 void setUserMatrix(SkMatrix userMatrix) { | 69 void setUserMatrix(SkMatrix userMatrix) { |
| 74 // Should this live in debugger instead? | 70 // Should this live in debugger instead? |
| 75 fDebugCanvas->setUserMatrix(userMatrix); | 71 fDebugCanvas->setUserMatrix(userMatrix); |
| 76 } | 72 } |
| 77 | 73 |
| 78 int getCommandAtPoint(int x, int y, int index) { | 74 int getCommandAtPoint(int x, int y, int index) { |
| 79 return fDebugCanvas->getCommandAtPoint(x, y, index); | 75 return fDebugCanvas->getCommandAtPoint(x, y, index); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 126 |
| 131 private: | 127 private: |
| 132 SkDebugCanvas* fDebugCanvas; | 128 SkDebugCanvas* fDebugCanvas; |
| 133 SkPicture* fPicture; | 129 SkPicture* fPicture; |
| 134 | 130 |
| 135 int fIndex; | 131 int fIndex; |
| 136 }; | 132 }; |
| 137 | 133 |
| 138 | 134 |
| 139 #endif /* SKDEBUGGER_H_ */ | 135 #endif /* SKDEBUGGER_H_ */ |
| OLD | NEW |