| 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 | 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 #ifdef SK_BUILD_FOR_WIN | |
| 18 // iostream includes xlocale which generates warning 4530 because we're comp
iling without | |
| 19 // exceptions | |
| 20 #pragma warning(push) | |
| 21 #pragma warning(disable : 4530) | |
| 22 #endif | |
| 23 #include <iostream> | |
| 24 #ifdef SK_BUILD_FOR_WIN | |
| 25 #pragma warning(pop) | |
| 26 #endif | |
| 27 | |
| 28 static SkBitmap make_noconfig_bm(int width, int height) { | 17 static SkBitmap make_noconfig_bm(int width, int height) { |
| 29 SkBitmap bm; | 18 SkBitmap bm; |
| 30 bm.setConfig(SkBitmap::kNo_Config, width, height); | 19 bm.setConfig(SkBitmap::kNo_Config, width, height); |
| 31 return bm; | 20 return bm; |
| 32 } | 21 } |
| 33 | 22 |
| 34 SkDebugCanvas::SkDebugCanvas(int width, int height) | 23 SkDebugCanvas::SkDebugCanvas(int width, int height) |
| 35 : INHERITED(make_noconfig_bm(width, height)) | 24 : INHERITED(make_noconfig_bm(width, height)) |
| 36 , fOverdrawViz(false) | 25 , fOverdrawViz(false) |
| 37 , fOverdrawFilter(NULL) | 26 , fOverdrawFilter(NULL) |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 412 |
| 424 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { | 413 bool SkDebugCanvas::translate(SkScalar dx, SkScalar dy) { |
| 425 addDrawCommand(new SkTranslateCommand(dx, dy)); | 414 addDrawCommand(new SkTranslateCommand(dx, dy)); |
| 426 return true; | 415 return true; |
| 427 } | 416 } |
| 428 | 417 |
| 429 void SkDebugCanvas::toggleCommand(int index, bool toggle) { | 418 void SkDebugCanvas::toggleCommand(int index, bool toggle) { |
| 430 SkASSERT(index < fCommandVector.count()); | 419 SkASSERT(index < fCommandVector.count()); |
| 431 fCommandVector[index]->setVisible(toggle); | 420 fCommandVector[index]->setVisible(toggle); |
| 432 } | 421 } |
| OLD | NEW |