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

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

Issue 137833016: add SkCanvas constructor that explicitly creates no_config with dimensions (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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/SkNWayCanvas.cpp ('k') | tests/PictureTest.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"
11 #include "SkDebugCanvas.h" 11 #include "SkDebugCanvas.h"
12 #include "SkDrawCommand.h" 12 #include "SkDrawCommand.h"
13 #include "SkDrawFilter.h" 13 #include "SkDrawFilter.h"
14 #include "SkDevice.h" 14 #include "SkDevice.h"
15 #include "SkXfermode.h" 15 #include "SkXfermode.h"
16 16
17 static SkBitmap make_noconfig_bm(int width, int height) {
18 SkBitmap bm;
19 bm.setConfig(SkBitmap::kNo_Config, width, height);
20 return bm;
21 }
22
23 SkDebugCanvas::SkDebugCanvas(int width, int height) 17 SkDebugCanvas::SkDebugCanvas(int width, int height)
24 : INHERITED(make_noconfig_bm(width, height)) 18 : INHERITED(width, height)
25 , fWidth(width) 19 , fWidth(width)
26 , fHeight(height) 20 , fHeight(height)
27 , fFilter(false) 21 , fFilter(false)
28 , fIndex(0) 22 , fIndex(0)
29 , fOverdrawViz(false) 23 , fOverdrawViz(false)
30 , fOverdrawFilter(NULL) 24 , fOverdrawFilter(NULL)
31 , fOverrideTexFiltering(false) 25 , fOverrideTexFiltering(false)
32 , fTexOverrideFilter(NULL) 26 , fTexOverrideFilter(NULL)
33 , fOutstandingSaveCount(0) { 27 , fOutstandingSaveCount(0) {
34 fUserMatrix.reset(); 28 fUserMatrix.reset();
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 461
468 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { 462 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) {
469 addDrawCommand(new SkTranslateCommand(dx, dy)); 463 addDrawCommand(new SkTranslateCommand(dx, dy));
470 return true; 464 return true;
471 } 465 }
472 466
473 void SkDebugCanvas::toggleCommand(int index, bool toggle) { 467 void SkDebugCanvas::toggleCommand(int index, bool toggle) {
474 SkASSERT(index < fCommandVector.count()); 468 SkASSERT(index < fCommandVector.count());
475 fCommandVector[index]->setVisible(toggle); 469 fCommandVector[index]->setVisible(toggle);
476 } 470 }
OLDNEW
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698