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

Side by Side Diff: experimental/GLFWTest/glfw_main.cpp

Issue 2220933004: Revert of Cleanup use of legacy SkSurface creation methods a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.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 2015 Google Inc. 2 * Copyright 2015 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 7
8 #include "GLFW/glfw3.h" 8 #include "GLFW/glfw3.h"
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 24 matching lines...) Expand all
35 35
36 GrBackendRenderTargetDesc desc; 36 GrBackendRenderTargetDesc desc;
37 desc.fWidth = w; 37 desc.fWidth = w;
38 desc.fHeight = h; 38 desc.fHeight = h;
39 desc.fConfig = kSkia8888_GrPixelConfig; 39 desc.fConfig = kSkia8888_GrPixelConfig;
40 desc.fOrigin = kBottomLeft_GrSurfaceOrigin; 40 desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
41 desc.fSampleCnt = 1; 41 desc.fSampleCnt = 1;
42 desc.fStencilBits = 0; 42 desc.fStencilBits = 0;
43 desc.fRenderTargetHandle = 0; // assume default framebuffer 43 desc.fRenderTargetHandle = 0; // assume default framebuffer
44 44
45 sSurface = SkSurface::MakeFromBackendRenderTarget(sContext, desc, nullptr, n ullptr).release(); 45 sSurface = SkSurface::NewFromBackendRenderTarget(sContext, desc, NULL);
46 } 46 }
47 47
48 static void cleanup_skia() { 48 static void cleanup_skia() {
49 delete sSurface; 49 delete sSurface;
50 delete sContext; 50 delete sContext;
51 } 51 }
52 52
53 const int kGrid = 100; 53 const int kGrid = 100;
54 const int kWidth = 960; 54 const int kWidth = 960;
55 const int kHeight = 640; 55 const int kHeight = 640;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 glfwSwapBuffers(window); 171 glfwSwapBuffers(window);
172 } 172 }
173 173
174 cleanup_skia(); 174 cleanup_skia();
175 175
176 glfwDestroyWindow(window); 176 glfwDestroyWindow(window);
177 glfwTerminate(); 177 glfwTerminate();
178 exit(EXIT_SUCCESS); 178 exit(EXIT_SUCCESS);
179 } 179 }
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/apps/canvasproof/src/main/jni/org_skia_canvasproof_GaneshPictureRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698