a8d0d6c8ba
* Move support files into sk_app and main files up to top directory * Rename VulkanTestContext and create WindowContext parent class * Place VulkanWindowContext et al. in sk_app namespace. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1944413005 Review-Url: https://codereview.chromium.org/1944413005
37 lines
672 B
C++
37 lines
672 B
C++
/*
|
|
* Copyright 2016 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef WindowContext_DEFINED
|
|
#define WindowContext_DEFINED
|
|
|
|
#include "GrTypes.h"
|
|
|
|
class SkSurface;
|
|
|
|
namespace sk_app {
|
|
|
|
// TODO: fill this out with an interface
|
|
class WindowContext {
|
|
public:
|
|
virtual ~WindowContext() {}
|
|
|
|
virtual SkSurface* getBackbufferSurface() = 0;
|
|
|
|
virtual void swapBuffers() = 0;
|
|
|
|
virtual bool makeCurrent() = 0;
|
|
|
|
virtual bool isValid() = 0;
|
|
|
|
virtual void resize(uint32_t w, uint32_t h) = 0;
|
|
|
|
virtual GrBackendContext getBackendContext() = 0;
|
|
};
|
|
|
|
} // namespace sk_app
|
|
|
|
#endif
|