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

Unified Diff: src/utils/SkCanvasStateUtils.cpp

Issue 23477067: fix printing of error messages in canvasstatetest. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix mac build Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/CanvasStateTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkCanvasStateUtils.cpp
diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp
index cd79a44f5032276bdf22324855fc719b88caeb4d..0cc42c5c1ca491a4ae43456ef55509ce1d858162 100644
--- a/src/utils/SkCanvasStateUtils.cpp
+++ b/src/utils/SkCanvasStateUtils.cpp
@@ -10,6 +10,7 @@
#include "SkBitmapDevice.h"
#include "SkCanvas.h"
#include "SkCanvasStack.h"
+#include "SkErrorInternals.h"
#include "SkWriter32.h"
#define CANVAS_STATE_VERSION 1
@@ -183,7 +184,8 @@ SkCanvasState* SkCanvasStateUtils::CaptureCanvasState(SkCanvas* canvas) {
ClipValidator validator;
canvas->replayClips(&validator);
if (validator.failed()) {
- SkDEBUGF(("CaptureCanvasState does not support canvases with antialiased clips.\n"));
+ SkErrorInternals::SetError(kInvalidOperation_SkError,
+ "CaptureCanvasState does not support canvases with antialiased clips.\n");
return NULL;
}
@@ -244,7 +246,7 @@ SkCanvasState* SkCanvasStateUtils::CaptureCanvasState(SkCanvas* canvas) {
// for now, just ignore any client supplied DrawFilter.
if (canvas->getDrawFilter()) {
- SkDEBUGF(("CaptureCanvasState will ignore the canvases draw filter.\n"));
+// SkDEBUGF(("CaptureCanvasState will ignore the canvases draw filter.\n"));
}
return canvasState.detach();
« no previous file with comments | « no previous file | tests/CanvasStateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698