From bcf612b5d0032f09d58c2ea5671de977130395db Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Mon, 1 May 2017 13:50:58 +0000 Subject: Revert "Revert "Plumb the use of GrBackendRenderTarget throughout Skia"" This reverts commit e3bd422fafc74dd3410c3de24a576635be92c3b4. Reason for revert: Pre-req changes have all landed in other projects at this point. Original change's description: > Revert "Plumb the use of GrBackendRenderTarget throughout Skia" > > This reverts commit fdd77daedbba3b7c53be74a82fb9fae891b51696. > > Reason for revert: Apparently I have a few more build files to update before this can land. > > Original change's description: > > Plumb the use of GrBackendRenderTarget throughout Skia > > > > Bug: skia: > > Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa > > Reviewed-on: https://skia-review.googlesource.com/14148 > > Reviewed-by: Brian Salomon > > Reviewed-by: Robert Phillips > > Commit-Queue: Greg Daniel > > > > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > > Change-Id: I984e1909870182474c4c3cce257f01b6a9d8581f > Reviewed-on: https://skia-review.googlesource.com/14531 > Reviewed-by: Greg Daniel > Commit-Queue: Greg Daniel > TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reviews@skia.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Ib7ab94aada8a7cb80fe38f24daf32f9208c5b169 Reviewed-on: https://skia-review.googlesource.com/14826 Reviewed-by: Greg Daniel Commit-Queue: Greg Daniel --- example/SkiaSDLExample.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'example') diff --git a/example/SkiaSDLExample.cpp b/example/SkiaSDLExample.cpp index abd198afe9..f3be85045e 100644 --- a/example/SkiaSDLExample.cpp +++ b/example/SkiaSDLExample.cpp @@ -6,6 +6,7 @@ * */ +#include "GrBackendSurface.h" #include "GrContext.h" #include "SDL.h" #include "SkCanvas.h" @@ -192,16 +193,12 @@ 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 - GrBackendRenderTargetDesc desc; - desc.fWidth = dm.w; - desc.fHeight = dm.h; - desc.fConfig = kSkia8888_GrPixelConfig; - desc.fOrigin = kBottomLeft_GrSurfaceOrigin; - desc.fSampleCnt = kMsaaSampleCount; - desc.fStencilBits = kStencilBits; + GrGLFrameBufferInfo fbInfo; GrGLint buffer; GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer); - desc.fRenderTargetHandle = buffer; + fbInfo.fFBOID = buffer; + GrBackendRenderTarget backendRT(dm.w, dm.h, kMsaaSampleCount, kStencilBits, + kSkia8888_GrPixelConfig, fbInfo); // setup SkSurface // To use distance field text, use commented out SkSurfaceProps instead @@ -209,7 +206,10 @@ int main(int argc, char** argv) { // SkSurfaceProps::kLegacyFontHost_InitType); SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType); - sk_sp surface(SkSurface::MakeFromBackendRenderTarget(grContext, desc, &props)); + sk_sp surface(SkSurface::MakeFromBackendRenderTarget(grContext, + backendRT, + kBottomLeft_GrSurfaceOrigin, + &props)); SkCanvas* canvas = surface->getCanvas(); -- cgit v1.2.3