// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_GL_H_ #define FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_GL_H_ #include "flutter/shell/common/shell_test_platform_view.h" #include "flutter/shell/gpu/gpu_surface_gl_delegate.h" #include "flutter/testing/test_gl_surface.h" namespace flutter { namespace testing { class ShellTestPlatformViewGL : public ShellTestPlatformView, public GPUSurfaceGLDelegate { public: ShellTestPlatformViewGL(PlatformView::Delegate& delegate, TaskRunners task_runners, std::shared_ptr vsync_clock, CreateVsyncWaiter create_vsync_waiter); virtual ~ShellTestPlatformViewGL() override; virtual void SimulateVSync() override; private: TestGLSurface gl_surface_; CreateVsyncWaiter create_vsync_waiter_; std::shared_ptr vsync_clock_; // |PlatformView| std::unique_ptr CreateRenderingSurface() override; // |PlatformView| std::unique_ptr CreateVSyncWaiter() override; // |PlatformView| PointerDataDispatcherMaker GetDispatcherMaker() override; // |GPUSurfaceGLDelegate| bool GLContextMakeCurrent() override; // |GPUSurfaceGLDelegate| bool GLContextClearCurrent() override; // |GPUSurfaceGLDelegate| bool GLContextPresent() override; // |GPUSurfaceGLDelegate| intptr_t GLContextFBO() const override; // |GPUSurfaceGLDelegate| GLProcResolver GetGLProcResolver() const override; // |GPUSurfaceGLDelegate| ExternalViewEmbedder* GetExternalViewEmbedder() override; FML_DISALLOW_COPY_AND_ASSIGN(ShellTestPlatformViewGL); }; } // namespace testing } // namespace flutter #endif // FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_GL_H_