aboutsummaryrefslogtreecommitdiffhomepage
path: root/example
diff options
context:
space:
mode:
Diffstat (limited to 'example')
-rw-r--r--example/SkiaSDLExample.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/example/SkiaSDLExample.cpp b/example/SkiaSDLExample.cpp
index f3be85045e..abd198afe9 100644
--- a/example/SkiaSDLExample.cpp
+++ b/example/SkiaSDLExample.cpp
@@ -6,7 +6,6 @@
*
*/
-#include "GrBackendSurface.h"
#include "GrContext.h"
#include "SDL.h"
#include "SkCanvas.h"
@@ -193,12 +192,16 @@ int main(int argc, char** argv) {
// Wrap the frame buffer object attached to the screen in a Skia render target so Skia can
// render to it
- GrGLFrameBufferInfo fbInfo;
+ GrBackendRenderTargetDesc desc;
+ desc.fWidth = dm.w;
+ desc.fHeight = dm.h;
+ desc.fConfig = kSkia8888_GrPixelConfig;
+ desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
+ desc.fSampleCnt = kMsaaSampleCount;
+ desc.fStencilBits = kStencilBits;
GrGLint buffer;
GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
- fbInfo.fFBOID = buffer;
- GrBackendRenderTarget backendRT(dm.w, dm.h, kMsaaSampleCount, kStencilBits,
- kSkia8888_GrPixelConfig, fbInfo);
+ desc.fRenderTargetHandle = buffer;
// setup SkSurface
// To use distance field text, use commented out SkSurfaceProps instead
@@ -206,10 +209,7 @@ int main(int argc, char** argv) {
// SkSurfaceProps::kLegacyFontHost_InitType);
SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
- sk_sp<SkSurface> surface(SkSurface::MakeFromBackendRenderTarget(grContext,
- backendRT,
- kBottomLeft_GrSurfaceOrigin,
- &props));
+ sk_sp<SkSurface> surface(SkSurface::MakeFromBackendRenderTarget(grContext, desc, &props));
SkCanvas* canvas = surface->getCanvas();