mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Previously, we weren't scheduling a visual update when our surface was created, so we'd just continue to show black until the author requested a new animation frame. After this CL, we schedule a visual update as soon as our surface is created. As part of this change, I've removed knowledge of the GPU delegate from PlatformView. Now, all the calls from PlatformView to the GPU system bounce through the UI delegate, which serializes the commands with other commands from the UI engine to the GPU rasterizer. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/974483004
31 lines
837 B
C++
31 lines
837 B
C++
// Copyright 2015 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_UI_DELEGATE_H_
|
|
#define SKY_SHELL_UI_DELEGATE_H_
|
|
|
|
#include "mojo/public/cpp/bindings/interface_request.h"
|
|
#include "sky/services/viewport/viewport_observer.mojom.h"
|
|
#include "ui/gfx/geometry/size.h"
|
|
#include "ui/gfx/native_widget_types.h"
|
|
|
|
namespace sky {
|
|
namespace shell {
|
|
|
|
class UIDelegate {
|
|
public:
|
|
virtual void ConnectToViewportObserver(
|
|
mojo::InterfaceRequest<ViewportObserver> request) = 0;
|
|
virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) = 0;
|
|
virtual void OnOutputSurfaceDestroyed() = 0;
|
|
|
|
protected:
|
|
virtual ~UIDelegate();
|
|
};
|
|
|
|
} // namespace shell
|
|
} // namespace sky
|
|
|
|
#endif // SKY_SHELL_UI_DELEGATE_H_
|