forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a PlatformView implementation for Linux (flutter#2796)
- Loading branch information
1 parent
3976beb
commit ca72520
Showing
2 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2016 The Chromium 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 SKY_SHELL_PLATFORM_LINUX_PLATFORM_VIEW_LINUX_H_ | ||
#define SKY_SHELL_PLATFORM_LINUX_PLATFORM_VIEW_LINUX_H_ | ||
|
||
#include "sky/shell/platform_view.h" | ||
|
||
namespace sky { | ||
namespace shell { | ||
|
||
class PlatformViewLinux : public PlatformView { | ||
public: | ||
explicit PlatformViewLinux(const Config& config, SurfaceConfig surface_config); | ||
|
||
~PlatformViewLinux() override; | ||
|
||
// sky::shell::PlatformView override | ||
base::WeakPtr<sky::shell::PlatformView> GetWeakViewPtr() override; | ||
|
||
// sky::shell::PlatformView override | ||
uint64_t DefaultFramebuffer() const override; | ||
|
||
// sky::shell::PlatformView override | ||
bool ContextMakeCurrent() override; | ||
|
||
// sky::shell::PlatformView override | ||
bool SwapBuffers() override; | ||
|
||
private: | ||
base::WeakPtrFactory<PlatformViewLinux> weak_factory_; | ||
|
||
DISALLOW_COPY_AND_ASSIGN(PlatformViewLinux); | ||
}; | ||
|
||
} // namespace shell | ||
} // namespace sky | ||
|
||
#endif // SKY_SHELL_PLATFORM_LINUX_PLATFORM_VIEW_LINUX_H_ |