aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/sk_app/WindowContext.h
diff options
context:
space:
mode:
authorGravatar liyuqian <liyuqian@google.com>2016-06-16 14:10:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-16 14:10:34 -0700
commit74959a1471cd3b20e2dd79fc0c685e7205a25cd9 (patch)
treebd13a55276240cce600dd0b8d1a9dbd66ec1cf4c /tools/viewer/sk_app/WindowContext.h
parent6dc3af4499893045f7b187d5d85bc785b6e44baa (diff)
Use Offscreen Surface for Split Screen
A dashed line is also added to split the screen. Currently, drawing images with sRGB seems to still have bugs. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2069653002 Review-Url: https://codereview.chromium.org/2069653002
Diffstat (limited to 'tools/viewer/sk_app/WindowContext.h')
-rw-r--r--tools/viewer/sk_app/WindowContext.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/viewer/sk_app/WindowContext.h b/tools/viewer/sk_app/WindowContext.h
index fdd847445c..2c526a4bfe 100644
--- a/tools/viewer/sk_app/WindowContext.h
+++ b/tools/viewer/sk_app/WindowContext.h
@@ -44,6 +44,7 @@ public:
virtual GrBackendContext getBackendContext() = 0;
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);
@@ -58,6 +59,10 @@ protected:
DisplayParams fDisplayParams;
GrPixelConfig fPixelConfig;
SkSurfaceProps fSurfaceProps;
+
+private:
+ sk_sp<SkSurface> createSurface(
+ sk_sp<GrRenderTarget>, int colorBits, bool offscreen, bool forceSRGB);
};
} // namespace sk_app