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

Unified Diff: platform_tools/nacl/src/nacl_debugger.cpp

Issue 18055014: Fixes for nacl_debugger's use of picture. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/nacl/src/nacl_debugger.cpp
diff --git a/platform_tools/nacl/src/nacl_debugger.cpp b/platform_tools/nacl/src/nacl_debugger.cpp
index c129ed8432441d6bfb452965d2d2f88ea603a3f7..9c6a0f86753f020d4c5150e439d7b75fdd3f64ce 100644
--- a/platform_tools/nacl/src/nacl_debugger.cpp
+++ b/platform_tools/nacl/src/nacl_debugger.cpp
@@ -37,7 +37,6 @@ public:
explicit SkiaInstance(PP_Instance instance)
: pp::Instance(instance)
, fCanvas(NULL)
- , fPicture(NULL)
, fFlushLoopRunning(false)
, fFlushPending(false)
@@ -68,12 +67,13 @@ public:
return;
}
SkMemoryStream pictureStream(decodedData.getData(), decodedSize);
- fPicture = SkPicture::CreateFromStream(&pictureStream);
- if (fPicture->width() == 0 || fPicture->height() == 0) {
+ SkPicture* picture = SkPicture::CreateFromStream(&pictureStream);
+ if (NULL == picture) {
SkDebugf("Failed to create SKP.\n");
return;
}
- fDebugger.loadPicture(fPicture);
+ fDebugger.loadPicture(picture);
+ picture->unref();
// Set up the command list.
SkTArray<SkString>* commands = fDebugger.getDrawCommandsAsStrings();
@@ -194,7 +194,6 @@ private:
SkBitmap fBitmap;
SkCanvas* fCanvas;
SkDebugger fDebugger;
- SkPicture* fPicture;
bool fFlushLoopRunning;
bool fFlushPending;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698