Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: src/utils/debugger/SkDebugCanvas.cpp

Issue 189883010: hide getTotalClip, so we can eventually remove it (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 canvas->clipRect(r, SkRegion::kReplace_Op); 321 canvas->clipRect(r, SkRegion::kReplace_Op);
322 322
323 // visualize existing clips 323 // visualize existing clips
324 SkDebugClipVisitor visitor(canvas); 324 SkDebugClipVisitor visitor(canvas);
325 325
326 canvas->replayClips(&visitor); 326 canvas->replayClips(&visitor);
327 327
328 canvas->restore(); 328 canvas->restore();
329 } 329 }
330 fMatrix = canvas->getTotalMatrix(); 330 fMatrix = canvas->getTotalMatrix();
331 fClip = canvas->getTotalClip().getBounds(); 331 if (!canvas->getClipDeviceBounds(&fClip)) {
332 fClip.setEmpty();
333 }
332 fIndex = index; 334 fIndex = index;
333 } 335 }
334 336
335 void SkDebugCanvas::deleteDrawCommandAt(int index) { 337 void SkDebugCanvas::deleteDrawCommandAt(int index) {
336 SkASSERT(index < fCommandVector.count()); 338 SkASSERT(index < fCommandVector.count());
337 delete fCommandVector[index]; 339 delete fCommandVector[index];
338 fCommandVector.remove(index); 340 fCommandVector.remove(index);
339 } 341 }
340 342
341 SkDrawCommand* SkDebugCanvas::getDrawCommandAt(int index) { 343 SkDrawCommand* SkDebugCanvas::getDrawCommandAt(int index) {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 566
565 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { 567 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) {
566 addDrawCommand(new SkTranslateCommand(dx, dy)); 568 addDrawCommand(new SkTranslateCommand(dx, dy));
567 return true; 569 return true;
568 } 570 }
569 571
570 void SkDebugCanvas::toggleCommand(int index, bool toggle) { 572 void SkDebugCanvas::toggleCommand(int index, bool toggle) {
571 SkASSERT(index < fCommandVector.count()); 573 SkASSERT(index < fCommandVector.count());
572 fCommandVector[index]->setVisible(toggle); 574 fCommandVector[index]->setVisible(toggle);
573 } 575 }
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698