aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/GLFWTest/glfw_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/GLFWTest/glfw_main.cpp')
-rw-r--r--experimental/GLFWTest/glfw_main.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/experimental/GLFWTest/glfw_main.cpp b/experimental/GLFWTest/glfw_main.cpp
index 34fbd4ed55..63ea1f1d9f 100644
--- a/experimental/GLFWTest/glfw_main.cpp
+++ b/experimental/GLFWTest/glfw_main.cpp
@@ -5,11 +5,12 @@
* found in the LICENSE file.
*/
+#include "GLFW/glfw3.h"
#include <stdlib.h>
#include <stdio.h>
-#include "GLFW/glfw3.h"
-#include "GrBackendSurface.h"
+
#include "GrContext.h"
+
#include "SkCanvas.h"
#include "SkImage.h"
#include "SkRSXform.h"
@@ -31,18 +32,17 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
static void init_skia(int w, int h) {
sContext = GrContext::Create(kOpenGL_GrBackend, 0);
-
- GrGLFramebufferInfo framebufferInfo;
- framebufferInfo.fFBOID = 0; // assume default framebuffer
- GrBackendRenderTarget backendRenderTarget(w, h,
- 0, // sample count
- 0, // stencil bits
- kSkia8888_GrPixelConfig,
- framebufferInfo);
-
- sSurface = SkSurface::MakeFromBackendRenderTarget(sContext, backendRenderTarget,
- kBottomLeft_GrSurfaceOrigin,
- nullptr, nullptr).release();
+
+ GrBackendRenderTargetDesc desc;
+ desc.fWidth = w;
+ desc.fHeight = h;
+ desc.fConfig = kSkia8888_GrPixelConfig;
+ desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
+ desc.fSampleCnt = 1;
+ desc.fStencilBits = 0;
+ desc.fRenderTargetHandle = 0; // assume default framebuffer
+
+ sSurface = SkSurface::MakeFromBackendRenderTarget(sContext, desc, nullptr, nullptr).release();
}
static void cleanup_skia() {