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

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

Issue 1944413005: More refactoring for Viewer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix up Android Created 4 years, 7 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
« no previous file with comments | « tools/viewer/sk_app/Window.h ('k') | tools/viewer/sk_app/WindowContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/Window.cpp
diff --git a/tools/viewer/Window.cpp b/tools/viewer/sk_app/Window.cpp
similarity index 88%
rename from tools/viewer/Window.cpp
rename to tools/viewer/sk_app/Window.cpp
index 6a83a3ba815d8ccb60b43eda9bb7be3de64f445d..a7fd6b0cf67d95a07042747142e2fd5580a0d5bf 100644
--- a/tools/viewer/Window.cpp
+++ b/tools/viewer/sk_app/Window.cpp
@@ -9,7 +9,7 @@
#include "SkSurface.h"
#include "SkCanvas.h"
-#include "VulkanTestContext.h"
+#include "VulkanWindowContext.h"
namespace sk_app {
@@ -36,8 +36,8 @@ Window::Window() : fCharFunc(default_char_func)
}
void Window::detach() {
- delete fTestContext;
- fTestContext = nullptr;
+ delete fWindowContext;
+ fWindowContext = nullptr;
}
bool Window::onChar(SkUnichar c, uint32_t modifiers) {
@@ -53,7 +53,7 @@ bool Window::onMouse(int x, int y, InputState state, uint32_t modifiers) {
}
void Window::onPaint() {
- SkSurface* backbuffer = fTestContext->getBackbufferSurface();
+ SkSurface* backbuffer = fWindowContext->getBackbufferSurface();
if (backbuffer) {
// draw into the canvas of this surface
SkCanvas* canvas = backbuffer->getCanvas();
@@ -62,7 +62,7 @@ void Window::onPaint() {
canvas->flush();
- fTestContext->swapBuffers();
+ fWindowContext->swapBuffers();
} else {
// try recreating testcontext
}
@@ -72,7 +72,7 @@ void Window::onPaint() {
void Window::onResize(uint32_t w, uint32_t h) {
fWidth = w;
fHeight = h;
- fTestContext->resize(w, h);
+ fWindowContext->resize(w, h);
}
} // namespace sk_app
« no previous file with comments | « tools/viewer/sk_app/Window.h ('k') | tools/viewer/sk_app/WindowContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698