Fix Windows build breakage in http://code.google.com/p/skia/source/detail?r=2925
TBR=reed Review URL: http://codereview.appspot.com/5500087 git-svn-id: http://skia.googlecode.com/svn/trunk@2927 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
0c00f21fee
commit
6fc7cc23a9
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2011 Google Inc.
|
* Copyright 2011 Google Inc.
|
||||||
*
|
*
|
||||||
@ -97,7 +96,7 @@ static const char* skip_past(const char* str, const char* skip) {
|
|||||||
|
|
||||||
static const char* gPrefFileName = "sampleapp_prefs.txt";
|
static const char* gPrefFileName = "sampleapp_prefs.txt";
|
||||||
|
|
||||||
static bool readTiTleFromPrefs(SkString* title) {
|
static bool readTitleFromPrefs(SkString* title) {
|
||||||
SkFILEStream stream(gPrefFileName);
|
SkFILEStream stream(gPrefFileName);
|
||||||
if (!stream.isValid()) {
|
if (!stream.isValid()) {
|
||||||
return false;
|
return false;
|
||||||
@ -119,7 +118,7 @@ static bool readTiTleFromPrefs(SkString* title) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool writeTitleToPrefs(const char* title) {
|
static void writeTitleToPrefs(const char* title) {
|
||||||
SkFILEWStream stream(gPrefFileName);
|
SkFILEWStream stream(gPrefFileName);
|
||||||
SkString data;
|
SkString data;
|
||||||
data.printf("curr-slide-title = \"%s\"\n", title);
|
data.printf("curr-slide-title = \"%s\"\n", title);
|
||||||
@ -711,7 +710,7 @@ SampleWindow::SampleWindow(void* hwnd, int argc, char** argv, DeviceManager* dev
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SkString title;
|
SkString title;
|
||||||
if (readTiTleFromPrefs(&title)) {
|
if (readTitleFromPrefs(&title)) {
|
||||||
fCurrIndex = findByTitle(title.c_str());
|
fCurrIndex = findByTitle(title.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -759,6 +758,8 @@ int SampleWindow::findByTitle(const char title[]) {
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO(reed): what should this return if the title is not found?
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static SkBitmap capture_bitmap(SkCanvas* canvas) {
|
static SkBitmap capture_bitmap(SkCanvas* canvas) {
|
||||||
|
Loading…
Reference in New Issue
Block a user