Hash :
62e274e8
Author :
Date :
2019-04-23T09:17:03
[scenic] Remove dangling viewsv1 reference Clean up the includes and imports for this module as well. BUG: angleproject:2475 TEST: Built cast_runner, web_runner Change-Id: Id283c265a4ec9d2ca74e3a0132e82f051b8864f6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1579219 Reviewed-by: Michael Spang <spang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ScenicWindow.h:
// Subclasses OSWindow for Fuchsia's Scenic compositor.
//
#ifndef UTIL_FUCHSIA_SCENIC_WINDOW_H
#define UTIL_FUCHSIA_SCENIC_WINDOW_H
#include <fuchsia/ui/policy/cpp/fidl.h>
#include <fuchsia/ui/scenic/cpp/fidl.h>
#include <fuchsia_egl.h>
#include <lib/async-loop/cpp/loop.h>
#include <lib/ui/scenic/cpp/commands.h>
#include <lib/ui/scenic/cpp/resources.h>
#include <lib/ui/scenic/cpp/session.h>
#include <zircon/types.h>
#include <string>
#include "util/OSWindow.h"
#include "util/util_export.h"
struct FuchsiaEGLWindowDeleter
{
void operator()(fuchsia_egl_window *eglWindow) { fuchsia_egl_window_destroy(eglWindow); }
};
class ANGLE_UTIL_EXPORT ScenicWindow : public OSWindow
{
public:
ScenicWindow();
~ScenicWindow();
// OSWindow:
bool initialize(const std::string &name, size_t width, size_t height) override;
void destroy() override;
void resetNativeWindow() override;
EGLNativeWindowType getNativeWindow() const override;
EGLNativeDisplayType getNativeDisplay() const override;
void messageLoop() override;
void setMousePosition(int x, int y) override;
bool setPosition(int x, int y) override;
bool resize(int width, int height) override;
void setVisible(bool isVisible) override;
void signalTestEvent() override;
// FIDL callbacks:
void OnScenicEvents(std::vector<fuchsia::ui::scenic::Event> events);
void OnScenicError(zx_status_t status);
private:
// Default message loop.
async::Loop *mLoop;
// System services.
zx::channel mServiceRoot;
fuchsia::ui::scenic::ScenicPtr mScenic;
fuchsia::ui::policy::PresenterPtr mPresenter;
// Scenic session & resources.
scenic::Session mScenicSession;
scenic::ShapeNode mShape;
scenic::Material mMaterial;
// Scenic view.
std::unique_ptr<scenic::View> mView;
// EGL native window.
std::unique_ptr<fuchsia_egl_window, FuchsiaEGLWindowDeleter> mFuchsiaEGLWindow;
};
#endif // UTIL_FUCHSIA_SCENIC_WINDOW_H