| Index: tools/viewer/sk_app/WindowContext.cpp
|
| diff --git a/tools/viewer/sk_app/WindowContext.cpp b/tools/viewer/sk_app/WindowContext.cpp
|
| index ba04e7eace9837bd267a6f220346bfaba6d8c74c..5d364bc497bf8273572480c19af6f035c428f2c2 100755
|
| --- a/tools/viewer/sk_app/WindowContext.cpp
|
| +++ b/tools/viewer/sk_app/WindowContext.cpp
|
| @@ -25,12 +25,12 @@ sk_sp<SkSurface> WindowContext::createOffscreenSurface(bool forceSRGB) {
|
| return createSurface(nullptr, 0, true, forceSRGB);
|
| }
|
|
|
| -sk_sp<SkSurface> WindowContext::createRenderSurface(sk_sp<GrRenderTarget> rt, int colorBits) {
|
| - return createSurface(rt, colorBits, false, false);
|
| +sk_sp<SkSurface> WindowContext::createRenderSurface(GrBackendRenderTargetDesc desc, int colorBits) {
|
| + return createSurface(&desc, colorBits, false, false);
|
| }
|
|
|
| sk_sp<SkSurface> WindowContext::createSurface(
|
| - sk_sp<GrRenderTarget> rt, int colorBits, bool offscreen, bool forceSRGB) {
|
| + GrBackendRenderTargetDesc* rtDesc, int colorBits, bool offscreen, bool forceSRGB) {
|
| auto flags = (fSurfaceProps.flags() & ~SkSurfaceProps::kGammaCorrect_Flag) |
|
| (GrPixelConfigIsSRGB(fPixelConfig) || forceSRGB ?
|
| SkSurfaceProps::kGammaCorrect_Flag : 0);
|
| @@ -57,7 +57,7 @@ sk_sp<SkSurface> WindowContext::createSurface(
|
| return SkSurface::MakeRaster(info, &props);
|
| }
|
| } else {
|
| - return SkSurface::MakeRenderTargetDirect(rt.get(), &props);
|
| + return SkSurface::MakeFromBackendRenderTarget(fContext, *rtDesc, &props);
|
| }
|
| }
|
|
|
|
|