| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 | 54 |
| 55 const SkTDArray<SkDrawCommand*>& getDrawCommands() const { | 55 const SkTDArray<SkDrawCommand*>& getDrawCommands() const { |
| 56 return fDebugCanvas->getDrawCommands(); | 56 return fDebugCanvas->getDrawCommands(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 void highlightCurrentCommand(bool on) { | 59 void highlightCurrentCommand(bool on) { |
| 60 fDebugCanvas->toggleFilter(on); | 60 fDebugCanvas->toggleFilter(on); |
| 61 } | 61 } |
| 62 | 62 |
| 63 void resize(int width, int height) { | 63 void setWindowSize(int width, int height) { fDebugCanvas->setWindowSize(widt
h, height); } |
| 64 fDebugCanvas->setBounds(width, height); | |
| 65 } | |
| 66 | 64 |
| 67 void loadPicture(SkPicture* picture); | 65 void loadPicture(SkPicture* picture); |
| 68 | 66 |
| 69 SkPicture* copyPicture(); | 67 SkPicture* copyPicture(); |
| 70 | 68 |
| 71 int getSize() { | 69 int getSize() { |
| 72 return fDebugCanvas->getSize(); | 70 return fDebugCanvas->getSize(); |
| 73 } | 71 } |
| 74 | 72 |
| 75 void setUserMatrix(SkMatrix userMatrix) { | 73 void setUserMatrix(SkMatrix userMatrix) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 86 } | 84 } |
| 87 | 85 |
| 88 const SkMatrix& getCurrentMatrix() { | 86 const SkMatrix& getCurrentMatrix() { |
| 89 return fDebugCanvas->getCurrentMatrix(); | 87 return fDebugCanvas->getCurrentMatrix(); |
| 90 } | 88 } |
| 91 | 89 |
| 92 const SkIRect& getCurrentClip() { | 90 const SkIRect& getCurrentClip() { |
| 93 return fDebugCanvas->getCurrentClip(); | 91 return fDebugCanvas->getCurrentClip(); |
| 94 } | 92 } |
| 95 | 93 |
| 96 int pictureHeight() { | 94 SkRect pictureCull() const { |
| 97 return fPictureHeight; | 95 return NULL == fPicture ? SkRect::MakeEmpty() : fPicture->cullRect(); |
| 98 } | |
| 99 | |
| 100 int pictureWidth() { | |
| 101 return fPictureWidth; | |
| 102 } | 96 } |
| 103 | 97 |
| 104 int index() { | 98 int index() { |
| 105 return fIndex; | 99 return fIndex; |
| 106 } | 100 } |
| 107 | 101 |
| 108 void setOverdrawViz(bool overDrawViz) { | 102 void setOverdrawViz(bool overDrawViz) { |
| 109 if (NULL != fDebugCanvas) { | 103 if (NULL != fDebugCanvas) { |
| 110 fDebugCanvas->setOverdrawViz(overDrawViz); | 104 fDebugCanvas->setOverdrawViz(overDrawViz); |
| 111 } | 105 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 131 | 125 |
| 132 void getOverviewText(const SkTDArray<double>* typeTimes, double totTime, | 126 void getOverviewText(const SkTDArray<double>* typeTimes, double totTime, |
| 133 SkString* overview, int numRuns); | 127 SkString* overview, int numRuns); |
| 134 | 128 |
| 135 void getClipStackText(SkString* clipStack); | 129 void getClipStackText(SkString* clipStack); |
| 136 | 130 |
| 137 private: | 131 private: |
| 138 SkDebugCanvas* fDebugCanvas; | 132 SkDebugCanvas* fDebugCanvas; |
| 139 SkPicture* fPicture; | 133 SkPicture* fPicture; |
| 140 | 134 |
| 141 int fPictureWidth; | |
| 142 int fPictureHeight; | |
| 143 int fIndex; | 135 int fIndex; |
| 144 }; | 136 }; |
| 145 | 137 |
| 146 | 138 |
| 147 #endif /* SKDEBUGGER_H_ */ | 139 #endif /* SKDEBUGGER_H_ */ |
| OLD | NEW |