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

Side by Side Diff: samplecode/SampleApp.cpp

Issue 147683003: fix more 64bit warnings (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleComplexClip.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 #include "SampleApp.h" 7 #include "SampleApp.h"
8 8
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 121 }
122 122
123 static const char* gPrefFileName = "sampleapp_prefs.txt"; 123 static const char* gPrefFileName = "sampleapp_prefs.txt";
124 124
125 static bool readTitleFromPrefs(SkString* title) { 125 static bool readTitleFromPrefs(SkString* title) {
126 SkFILEStream stream(gPrefFileName); 126 SkFILEStream stream(gPrefFileName);
127 if (!stream.isValid()) { 127 if (!stream.isValid()) {
128 return false; 128 return false;
129 } 129 }
130 130
131 int len = stream.getLength(); 131 size_t len = stream.getLength();
132 SkString data(len); 132 SkString data(len);
133 stream.read(data.writable_str(), len); 133 stream.read(data.writable_str(), len);
134 const char* s = data.c_str(); 134 const char* s = data.c_str();
135 135
136 s = skip_past(s, "curr-slide-title"); 136 s = skip_past(s, "curr-slide-title");
137 s = skip_past(s, "="); 137 s = skip_past(s, "=");
138 s = skip_past(s, "\""); 138 s = skip_past(s, "\"");
139 const char* stop = skip_until(s, "\""); 139 const char* stop = skip_until(s, "\"");
140 if (stop > s) { 140 if (stop > s) {
141 title->set(s, stop - s); 141 title->set(s, stop - s);
(...skipping 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2610 SkGraphics::Init(); 2610 SkGraphics::Init();
2611 SkEvent::Init(); 2611 SkEvent::Init();
2612 } 2612 }
2613 2613
2614 // FIXME: this should be in a header 2614 // FIXME: this should be in a header
2615 void application_term(); 2615 void application_term();
2616 void application_term() { 2616 void application_term() {
2617 SkEvent::Term(); 2617 SkEvent::Term();
2618 SkGraphics::Term(); 2618 SkGraphics::Term();
2619 } 2619 }
OLDNEW
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleComplexClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698