| 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 #include "SkDebugger.h" | 9 #include "SkDebugger.h" |
| 10 #include "SkString.h" | 10 #include "SkString.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 picture->draw(fDebugCanvas); | 35 picture->draw(fDebugCanvas); |
| 36 fDebugCanvas->setPicture(NULL); | 36 fDebugCanvas->setPicture(NULL); |
| 37 fIndex = fDebugCanvas->getSize() - 1; | 37 fIndex = fDebugCanvas->getSize() - 1; |
| 38 SkRefCnt_SafeAssign(fPicture, picture); | 38 SkRefCnt_SafeAssign(fPicture, picture); |
| 39 } | 39 } |
| 40 | 40 |
| 41 SkPicture* SkDebugger::copyPicture() { | 41 SkPicture* SkDebugger::copyPicture() { |
| 42 // We can't just call clone here since we want to removed the "deleted" | 42 // We can't just call clone here since we want to removed the "deleted" |
| 43 // commands. Playing back will strip those out. | 43 // commands. Playing back will strip those out. |
| 44 SkPictureRecorder recorder; | 44 SkPictureRecorder recorder; |
| 45 SkCanvas* canvas = recorder.beginRecording(fPictureWidth, fPictureHeight); | 45 SkCanvas* canvas = recorder.beginRecording(fPictureWidth, fPictureHeight, NU
LL, 0); |
| 46 | 46 |
| 47 bool vizMode = fDebugCanvas->getMegaVizMode(); | 47 bool vizMode = fDebugCanvas->getMegaVizMode(); |
| 48 fDebugCanvas->setMegaVizMode(false); | 48 fDebugCanvas->setMegaVizMode(false); |
| 49 bool overDraw = fDebugCanvas->getOverdrawViz(); | 49 bool overDraw = fDebugCanvas->getOverdrawViz(); |
| 50 fDebugCanvas->setOverdrawViz(false); | 50 fDebugCanvas->setOverdrawViz(false); |
| 51 int saveCount = fDebugCanvas->getOutstandingSaveCount(); | 51 int saveCount = fDebugCanvas->getOutstandingSaveCount(); |
| 52 fDebugCanvas->setOutstandingSaveCount(0); | 52 fDebugCanvas->setOutstandingSaveCount(0); |
| 53 | 53 |
| 54 fDebugCanvas->draw(canvas); | 54 fDebugCanvas->draw(canvas); |
| 55 | 55 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 overview->insert(0, totalStr); | 140 overview->insert(0, totalStr); |
| 141 | 141 |
| 142 overview->append("<br/>"); | 142 overview->append("<br/>"); |
| 143 overview->append("SkPicture Width: "); | 143 overview->append("SkPicture Width: "); |
| 144 overview->appendS32(pictureWidth()); | 144 overview->appendS32(pictureWidth()); |
| 145 overview->append("px<br/>"); | 145 overview->append("px<br/>"); |
| 146 overview->append("SkPicture Height: "); | 146 overview->append("SkPicture Height: "); |
| 147 overview->appendS32(pictureHeight()); | 147 overview->appendS32(pictureHeight()); |
| 148 overview->append("px"); | 148 overview->append("px"); |
| 149 } | 149 } |
| OLD | NEW |