mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add initial Viz implementation for OSR (see issue #2575).
The old shared surface implementation has been removed and will need to be re-implemented using the Viz code path.
This commit is contained in:
committed by
Marshall Greenblatt
parent
cc0db5f166
commit
ac2cc54e13
42
libcef/browser/osr/host_display_client_osr.h
Normal file
42
libcef/browser/osr/host_display_client_osr.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// Copyright 2019 The Chromium Embedded Framework 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 CEF_LIBCEF_BROWSER_OSR_HOST_DISPLAY_CLIENT_OSR_H_
|
||||
#define CEF_LIBCEF_BROWSER_OSR_HOST_DISPLAY_CLIENT_OSR_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/shared_memory.h"
|
||||
#include "components/viz/host/host_display_client.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
|
||||
class CefLayeredWindowUpdaterOSR;
|
||||
class CefRenderWidgetHostViewOSR;
|
||||
|
||||
class CefHostDisplayClientOSR : public viz::HostDisplayClient {
|
||||
public:
|
||||
CefHostDisplayClientOSR(CefRenderWidgetHostViewOSR* const view,
|
||||
gfx::AcceleratedWidget widget);
|
||||
~CefHostDisplayClientOSR() override;
|
||||
|
||||
void SetActive(bool active);
|
||||
const void* GetPixelMemory() const;
|
||||
gfx::Size GetPixelSize() const;
|
||||
|
||||
private:
|
||||
// mojom::DisplayClient implementation.
|
||||
void UseProxyOutputDevice(UseProxyOutputDeviceCallback callback) override;
|
||||
|
||||
void CreateLayeredWindowUpdater(
|
||||
viz::mojom::LayeredWindowUpdaterRequest request) override;
|
||||
|
||||
CefRenderWidgetHostViewOSR* const view_;
|
||||
std::unique_ptr<CefLayeredWindowUpdaterOSR> layered_window_updater_;
|
||||
bool active_ = false;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefHostDisplayClientOSR);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_OSR_HOST_DISPLAY_CLIENT_OSR_H_
|
Reference in New Issue
Block a user