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

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

Issue 138013009: Culling API (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Updated per comments. 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 | Annotate | Revision Log
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | src/utils/debugger/SkDrawCommand.h » ('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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 424
425 void SkDebugCanvas::drawVertices(VertexMode vmode, int vertexCount, 425 void SkDebugCanvas::drawVertices(VertexMode vmode, int vertexCount,
426 const SkPoint vertices[], const SkPoint texs[], const SkColor colors[], 426 const SkPoint vertices[], const SkPoint texs[], const SkColor colors[],
427 SkXfermode*, const uint16_t indices[], int indexCount, 427 SkXfermode*, const uint16_t indices[], int indexCount,
428 const SkPaint& paint) { 428 const SkPaint& paint) {
429 addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices, 429 addDrawCommand(new SkDrawVerticesCommand(vmode, vertexCount, vertices,
430 texs, colors, NULL, indices, indexCount, paint)); 430 texs, colors, NULL, indices, indexCount, paint));
431 } 431 }
432 432
433 void SkDebugCanvas::onPushCull(const SkRect& cullRect) {
434 this->addDrawCommand(new SkPushCullCommand(cullRect));
435 }
436
437 void SkDebugCanvas::onPopCull() {
438 this->addDrawCommand(new SkPopCullCommand());
439 }
440
433 void SkDebugCanvas::restore() { 441 void SkDebugCanvas::restore() {
434 addDrawCommand(new SkRestoreCommand()); 442 addDrawCommand(new SkRestoreCommand());
435 } 443 }
436 444
437 bool SkDebugCanvas::rotate(SkScalar degrees) { 445 bool SkDebugCanvas::rotate(SkScalar degrees) {
438 addDrawCommand(new SkRotateCommand(degrees)); 446 addDrawCommand(new SkRotateCommand(degrees));
439 return true; 447 return true;
440 } 448 }
441 449
442 int SkDebugCanvas::save(SaveFlags flags) { 450 int SkDebugCanvas::save(SaveFlags flags) {
(...skipping 23 matching lines...) Expand all
466 474
467 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { 475 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) {
468 addDrawCommand(new SkTranslateCommand(dx, dy)); 476 addDrawCommand(new SkTranslateCommand(dx, dy));
469 return true; 477 return true;
470 } 478 }
471 479
472 void SkDebugCanvas::toggleCommand(int index, bool toggle) { 480 void SkDebugCanvas::toggleCommand(int index, bool toggle) {
473 SkASSERT(index < fCommandVector.count()); 481 SkASSERT(index < fCommandVector.count());
474 fCommandVector[index]->setVisible(toggle); 482 fCommandVector[index]->setVisible(toggle);
475 } 483 }
OLDNEW
« no previous file with comments | « src/utils/debugger/SkDebugCanvas.h ('k') | src/utils/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698