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

Unified Diff: tools/viewer/sk_app/Window.cpp

Issue 2069653002: Use Offscreen Surface for Split Screen (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix nits Created 4 years, 6 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/Window.cpp
diff --git a/tools/viewer/sk_app/Window.cpp b/tools/viewer/sk_app/Window.cpp
index 7ec8baae36b7ef04f5ae0f92b17711e066568fd0..dfc5c2e453c582acbfb2e1a6ce06b3bef09e7c6d 100644
--- a/tools/viewer/sk_app/Window.cpp
+++ b/tools/viewer/sk_app/Window.cpp
@@ -7,6 +7,7 @@
#include "Window.h"
+#include "GrRenderTarget.h"
djsollen 2016/06/15 14:14:29 why do you need this include?
liyuqian 2016/06/15 16:43:12 Line 118. The first nullptr is GrRenderTarget* and
#include "SkSurface.h"
#include "SkCanvas.h"
#include "VulkanWindowContext.h"
@@ -113,4 +114,8 @@ void Window::markInvalProcessed() {
fIsContentInvalidated = false;
}
+sk_sp<SkSurface> Window::getOffscreenSurface(bool sRGB) {
+ return fWindowContext->createRenderSurface(nullptr, 0, true, sRGB);
+}
+
} // namespace sk_app

Powered by Google App Engine
This is Rietveld 408576698