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

Side by Side Diff: tools/debugger/SkDrawCommand.cpp

Issue 2344523003: Fix SkDrawTextBlobCommand null blob crash (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | 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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkDrawCommand.h" 8 #include "SkDrawCommand.h"
9 9
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 2795 matching lines...) Expand 10 before | Expand all | Expand 10 after
2806 2806
2807 SkAutoTDelete<SkString> runsStr(new SkString); 2807 SkAutoTDelete<SkString> runsStr(new SkString);
2808 fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: ")); 2808 fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: "));
2809 fInfo.push(SkObjectParser::ScalarToString(y, "YPOS: ")); 2809 fInfo.push(SkObjectParser::ScalarToString(y, "YPOS: "));
2810 fInfo.push(SkObjectParser::RectToString(fBlob->bounds(), "Bounds: ")); 2810 fInfo.push(SkObjectParser::RectToString(fBlob->bounds(), "Bounds: "));
2811 fInfo.push(runsStr); 2811 fInfo.push(runsStr);
2812 fInfo.push(SkObjectParser::PaintToString(paint)); 2812 fInfo.push(SkObjectParser::PaintToString(paint));
2813 2813
2814 unsigned runs = 0; 2814 unsigned runs = 0;
2815 SkPaint runPaint(paint); 2815 SkPaint runPaint(paint);
2816 SkTextBlobRunIterator iter(blob.get()); 2816 SkTextBlobRunIterator iter(fBlob.get());
2817 while (!iter.done()) { 2817 while (!iter.done()) {
2818 SkAutoTDelete<SkString> tmpStr(new SkString); 2818 SkAutoTDelete<SkString> tmpStr(new SkString);
2819 tmpStr->printf("==== Run [%d] ====", runs++); 2819 tmpStr->printf("==== Run [%d] ====", runs++);
2820 fInfo.push(tmpStr.release()); 2820 fInfo.push(tmpStr.release());
2821 2821
2822 fInfo.push(SkObjectParser::IntToString(iter.glyphCount(), "GlyphCount: " )); 2822 fInfo.push(SkObjectParser::IntToString(iter.glyphCount(), "GlyphCount: " ));
2823 tmpStr.reset(new SkString("GlyphPositioning: ")); 2823 tmpStr.reset(new SkString("GlyphPositioning: "));
2824 tmpStr->append(gPositioningLabels[iter.positioning()]); 2824 tmpStr->append(gPositioningLabels[iter.positioning()]);
2825 fInfo.push(tmpStr.release()); 2825 fInfo.push(tmpStr.release());
2826 2826
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
3547 SkTranslateZCommand* SkTranslateZCommand::fromJSON(Json::Value& command, 3547 SkTranslateZCommand* SkTranslateZCommand::fromJSON(Json::Value& command,
3548 UrlDataManager& urlDataManager) { 3548 UrlDataManager& urlDataManager) {
3549 SkScalar z; 3549 SkScalar z;
3550 #ifdef SK_EXPERIMENTAL_SHADOWING 3550 #ifdef SK_EXPERIMENTAL_SHADOWING
3551 extract_json_scalar(command[SKDEBUGCANVAS_ATTRIBUTE_DRAWDEPTHTRANS], &z); 3551 extract_json_scalar(command[SKDEBUGCANVAS_ATTRIBUTE_DRAWDEPTHTRANS], &z);
3552 #else 3552 #else
3553 z = 0; 3553 z = 0;
3554 #endif 3554 #endif
3555 return new SkTranslateZCommand(z); 3555 return new SkTranslateZCommand(z);
3556 } 3556 }
OLDNEW
« 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