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

Unified Diff: tools/viewer/sk_app/WindowContext.h

Issue 2165703002: Make sk_app::WindowContext directly create a SkSurface without an intermediate GrRenderTarget (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: tools/viewer/sk_app/WindowContext.h
diff --git a/tools/viewer/sk_app/WindowContext.h b/tools/viewer/sk_app/WindowContext.h
index 2c526a4bfe0d176c35536e221021e6f39ada9d2b..917eb4edf81b086d84971911a73efcd4af748eea 100644
--- a/tools/viewer/sk_app/WindowContext.h
+++ b/tools/viewer/sk_app/WindowContext.h
@@ -45,13 +45,14 @@ public:
GrContext* getGrContext() const { return fContext; }
sk_sp<SkSurface> createOffscreenSurface(bool sRGB);
- sk_sp<SkSurface> createRenderSurface(sk_sp<GrRenderTarget>, int colorBits);
void presentRenderSurface(sk_sp<SkSurface> renderSurface, sk_sp<GrRenderTarget> rt,
int colorBits);
protected:
virtual bool isGpuContext() { return true; }
+ sk_sp<SkSurface> createRenderSurface(GrBackendRenderTargetDesc, int colorBits);
Brian Osman 2016/07/19 16:08:18 Pass the desc by const& in both places? (Why is it
bsalomon 2016/07/19 16:19:17 It's required for this function and optional for t
+
GrContext* fContext;
int fWidth;
@@ -62,7 +63,7 @@ protected:
private:
sk_sp<SkSurface> createSurface(
- sk_sp<GrRenderTarget>, int colorBits, bool offscreen, bool forceSRGB);
+ GrBackendRenderTargetDesc*, int colorBits, bool offscreen, bool forceSRGB);
};
} // namespace sk_app

Powered by Google App Engine
This is Rietveld 408576698