Flutter Engine
android_surface_mock.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "flutter/shell/platform/android/surface/android_surface_mock.h"
6 
7 namespace flutter {
8 
10  const std::shared_ptr<AndroidContext>& android_context)
11  : AndroidSurface(android_context) {}
12 
13 std::unique_ptr<GLContextResult> AndroidSurfaceMock::GLContextMakeCurrent() {
14  return std::make_unique<GLContextDefaultResult>(/*static_result=*/true);
15 }
16 
18  return true;
19 }
20 
21 bool AndroidSurfaceMock::GLContextPresent(uint32_t fbo_id) {
22  return true;
23 }
24 
25 intptr_t AndroidSurfaceMock::GLContextFBO(GLFrameInfo frame_info) const {
26  return 0;
27 }
28 
29 } // namespace flutter
AndroidSurfaceMock(const std::shared_ptr< AndroidContext > &android_context)
bool GLContextPresent(uint32_t fbo_id) override
intptr_t GLContextFBO(GLFrameInfo frame_info) const override
std::unique_ptr< GLContextResult > GLContextMakeCurrent() override