aboutsummaryrefslogtreecommitdiff
path: root/samplecode/SampleApp.cpp
diff options
context:
space:
mode:
authorScroggo <Scroggo@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-16 14:00:15 +0000
committerScroggo <Scroggo@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-16 14:00:15 +0000
commit716a0387ca197ca728ba691f3d812d4252c0f10b (patch)
tree8842a87b82fb18708f0bc1102e1ab66d369aef42 /samplecode/SampleApp.cpp
parentc29d7cdf3ee768057e9e98dfffa012e3c017295a (diff)
Fix the mac build of the SampleApp.
My call to glViewport breaks the mac build, but benefits the Android and linux builds. Fix the mac build until I come up with a better solution. Reviewed at http://codereview.appspot.com/4628042/ git-svn-id: http://skia.googlecode.com/svn/trunk@1612 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleApp.cpp')
-rw-r--r--samplecode/SampleApp.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index c457ef68a8..8d5e13d97f 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -1323,12 +1323,13 @@ void SampleWindow::onSizeChange() {
fZoomCenterX = SkScalarHalf(this->width());
fZoomCenterY = SkScalarHalf(this->height());
+#if defined(SK_BUILD_FOR_UNIX) || defined(ANDROID)
if (fGrContext) {
glViewport(0, 0, SkScalarRound(this->width()),
SkScalarRound(this->height()));
fGrContext->resetContext();
}
-
+#endif
this->updateTitle(); // to refresh our config
}