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

Side by Side Diff: src/utils/debugger/SkDrawCommand.h

Issue 249253003: Hide SaveFlags from the public SkCanvas API. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Suppress the canvas-state GM. Created 6 years, 8 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/SkProxyCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.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 #ifndef SKDRAWCOMMAND_H_ 9 #ifndef SKDRAWCOMMAND_H_
10 #define SKDRAWCOMMAND_H_ 10 #define SKDRAWCOMMAND_H_
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 SkRotateCommand(SkScalar degrees); 515 SkRotateCommand(SkScalar degrees);
516 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 516 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
517 private: 517 private:
518 SkScalar fDegrees; 518 SkScalar fDegrees;
519 519
520 typedef SkDrawCommand INHERITED; 520 typedef SkDrawCommand INHERITED;
521 }; 521 };
522 522
523 class SkSaveCommand : public SkDrawCommand { 523 class SkSaveCommand : public SkDrawCommand {
524 public: 524 public:
525 SkSaveCommand(SkCanvas::SaveFlags flags); 525 SkSaveCommand(unsigned flags);
526 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 526 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
527 virtual void trackSaveState(int* state) SK_OVERRIDE; 527 virtual void trackSaveState(int* state) SK_OVERRIDE;
528 virtual Action action() const SK_OVERRIDE { return kPushLayer_Action; } 528 virtual Action action() const SK_OVERRIDE { return kPushLayer_Action; }
529 private: 529 private:
530 SkCanvas::SaveFlags fFlags; 530 unsigned fFlags;
531 531
532 typedef SkDrawCommand INHERITED; 532 typedef SkDrawCommand INHERITED;
533 }; 533 };
534 534
535 class SkSaveLayerCommand : public SkDrawCommand { 535 class SkSaveLayerCommand : public SkDrawCommand {
536 public: 536 public:
537 SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint, 537 SkSaveLayerCommand(const SkRect* bounds, const SkPaint* paint,
538 SkCanvas::SaveFlags flags); 538 unsigned flags);
539 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 539 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
540 virtual void vizExecute(SkCanvas* canvas) SK_OVERRIDE; 540 virtual void vizExecute(SkCanvas* canvas) SK_OVERRIDE;
541 virtual void trackSaveState(int* state) SK_OVERRIDE; 541 virtual void trackSaveState(int* state) SK_OVERRIDE;
542 virtual Action action() const SK_OVERRIDE{ return kPushLayer_Action; } 542 virtual Action action() const SK_OVERRIDE{ return kPushLayer_Action; }
543 virtual void setActive(bool active) SK_OVERRIDE { fActive = active; } 543 virtual void setActive(bool active) SK_OVERRIDE { fActive = active; }
544 virtual bool active() const SK_OVERRIDE { return fActive; } 544 virtual bool active() const SK_OVERRIDE { return fActive; }
545 545
546 const SkPaint* paint() const { return fPaintPtr; } 546 const SkPaint* paint() const { return fPaintPtr; }
547 547
548 private: 548 private:
549 SkRect fBounds; 549 SkRect fBounds;
550 SkPaint fPaint; 550 SkPaint fPaint;
551 SkPaint* fPaintPtr; 551 SkPaint* fPaintPtr;
552 SkCanvas::SaveFlags fFlags; 552 unsigned fFlags;
553 553
554 bool fActive; 554 bool fActive;
555 555
556 typedef SkDrawCommand INHERITED; 556 typedef SkDrawCommand INHERITED;
557 }; 557 };
558 558
559 class SkScaleCommand : public SkDrawCommand { 559 class SkScaleCommand : public SkDrawCommand {
560 public: 560 public:
561 SkScaleCommand(SkScalar sx, SkScalar sy); 561 SkScaleCommand(SkScalar sx, SkScalar sy);
562 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 562 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 class SkPopCullCommand : public SkDrawCommand { 625 class SkPopCullCommand : public SkDrawCommand {
626 public: 626 public:
627 SkPopCullCommand(); 627 SkPopCullCommand();
628 virtual void execute(SkCanvas* canvas) SK_OVERRIDE; 628 virtual void execute(SkCanvas* canvas) SK_OVERRIDE;
629 virtual Action action() const { return kPopCull_Action; } 629 virtual Action action() const { return kPopCull_Action; }
630 private: 630 private:
631 typedef SkDrawCommand INHERITED; 631 typedef SkDrawCommand INHERITED;
632 }; 632 };
633 633
634 #endif 634 #endif
OLDNEW
« no previous file with comments | « src/utils/SkProxyCanvas.cpp ('k') | src/utils/debugger/SkDrawCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698