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

Side by Side Diff: src/views/animated/SkWidgetViews.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 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 | « src/utils/win/SkDWriteFontFileStream.cpp ('k') | tests/FontHostStreamTest.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 2011 Google Inc. 3 * Copyright 2011 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 #include "SkWidgetViews.h" 8 #include "SkWidgetViews.h"
9 #include "SkAnimator.h" 9 #include "SkAnimator.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 24 matching lines...) Expand all
35 "common/default/default/skins/scrollBar.xml", 35 "common/default/default/skins/scrollBar.xml",
36 "common/default/default/skins/statictextpaint.xml" 36 "common/default/default/skins/statictextpaint.xml"
37 }; 37 };
38 38
39 return gSkinPaths[se]; 39 return gSkinPaths[se];
40 } 40 }
41 41
42 void init_skin_anim(const char path[], SkAnimator* anim) { 42 void init_skin_anim(const char path[], SkAnimator* anim) {
43 SkASSERT(path && anim); 43 SkASSERT(path && anim);
44 44
45 SkAutoTUnref<SkStream> stream(SkStream::NewFromFile(path)); 45 SkAutoTDelete<SkStream> stream(SkStream::NewFromFile(path));
46 if (!stream.get()) { 46 if (!stream.get()) {
47 SkDEBUGF(("init_skin_anim: loading skin failed <%s>\n", path)); 47 SkDEBUGF(("init_skin_anim: loading skin failed <%s>\n", path));
48 sk_throw(); 48 sk_throw();
49 } 49 }
50 50
51 if (!anim->decodeStream(stream)) { 51 if (!anim->decodeStream(stream)) {
52 SkDEBUGF(("init_skin_anim: decoding skin failed <%s>\n", path)); 52 SkDEBUGF(("init_skin_anim: decoding skin failed <%s>\n", path));
53 sk_throw(); 53 sk_throw();
54 } 54 }
55 } 55 }
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 case kScroll_WidgetEnum: 389 case kScroll_WidgetEnum:
390 return new SkScrollBarView; 390 return new SkScrollBarView;
391 case kText_WidgetEnum: 391 case kText_WidgetEnum:
392 return new SkStaticTextView; 392 return new SkStaticTextView;
393 default: 393 default:
394 SkDEBUGFAIL("unknown enum passed to SkWidgetFactory"); 394 SkDEBUGFAIL("unknown enum passed to SkWidgetFactory");
395 break; 395 break;
396 } 396 }
397 return NULL; 397 return NULL;
398 } 398 }
OLDNEW
« no previous file with comments | « src/utils/win/SkDWriteFontFileStream.cpp ('k') | tests/FontHostStreamTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698