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

Unified Diff: example/SkiaSDLExample.cpp

Issue 2210603003: Get Mac viewer working with SDL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix patch Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gyp/viewer.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/SkiaSDLExample.cpp
diff --git a/example/SkiaSDLExample.cpp b/example/SkiaSDLExample.cpp
index da5f2dc9c11b42994b737e40eb9bcb18f5004015..0072f0f595df992157c284220619e81d2d1af3ec 100644
--- a/example/SkiaSDLExample.cpp
+++ b/example/SkiaSDLExample.cpp
@@ -20,7 +20,7 @@
#elif defined(SK_BUILD_FOR_UNIX)
#include <GL/gl.h>
#elif defined(SK_BUILD_FOR_MAC)
-#include <gl.h>
+#include <OpenGL/gl.h>
#endif
/*
@@ -224,7 +224,7 @@ int main(int argc, char** argv) {
SkPaint paint;
// create a surface for CPU rasterization
- SkAutoTUnref<SkSurface> cpuSurface(SkSurface::NewRaster(canvas->imageInfo()));
+ sk_sp<SkSurface> cpuSurface(SkSurface::MakeRaster(canvas->imageInfo()));
SkCanvas* offscreen = cpuSurface->getCanvas();
offscreen->save();
@@ -232,7 +232,7 @@ int main(int argc, char** argv) {
offscreen->drawPath(create_star(), paint);
offscreen->restore();
- SkAutoTUnref<SkImage> image(cpuSurface->newImageSnapshot());
+ sk_sp<SkImage> image = cpuSurface->makeImageSnapshot();
int rotation = 0;
while (!state.fQuit) { // Our application loop
« no previous file with comments | « no previous file | gyp/viewer.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698