flutter_flutter/sky/shell/gpu/direct/surface_notifications_direct.h
Adam Barth 81ae27ab61 Remove startup flicker on Android (#2733)
According to hackbod on Stack Overflow, we're supposed to block in the
surfaceCreated callback until we've actually drawn into the surface:

http://stackoverflow.com/questions/8772862/surfaceview-flashes-black-on-load/8888108#8888108
2016-06-02 21:01:02 -07:00

26 lines
816 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_GPU_DIRECT_SURFACE_NOTIFICATIONS_DIRECT_H_
#define SKY_SHELL_GPU_DIRECT_SURFACE_NOTIFICATIONS_DIRECT_H_
#include "base/synchronization/waitable_event.h"
#include "sky/shell/platform_view.h"
namespace sky {
namespace shell {
class SurfaceNotificationsDirect {
public:
static void NotifyCreated(const PlatformView::Config& config,
gfx::AcceleratedWidget widget,
base::WaitableEvent* did_draw);
static void NotifyDestroyed(const PlatformView::Config& config);
};
} // namespace shell
} // namespace sky
#endif // SKY_SHELL_GPU_DIRECT_SURFACE_NOTIFICATIONS_DIRECT_H_