forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathca_layer_frame_sink.h
32 lines (24 loc) · 1.14 KB
/
ca_layer_frame_sink.h
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
// Copyright 2017 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 UI_ACCELERATED_WIDGET_MAC_CA_LAYER_FRAME_SINK_H_
#define UI_ACCELERATED_WIDGET_MAC_CA_LAYER_FRAME_SINK_H_
#include "base/time/time.h"
#include "ui/accelerated_widget_mac/accelerated_widget_mac_export.h"
#include "ui/gfx/ca_layer_params.h"
#include "ui/gfx/native_widget_types.h"
namespace ui {
// An interface to an NSView that will embed content described by CALayerParams
// in its heirarchy.
class ACCELERATED_WIDGET_MAC_EXPORT CALayerFrameSink {
public:
virtual ~CALayerFrameSink() {}
// Translate from a gfx::AcceleratedWidget to the gfx::CALayerFrameSink
// interface through which frames may be submitted. This may return nullptr.
static CALayerFrameSink* FromAcceleratedWidget(gfx::AcceleratedWidget widget);
// Update the embedder's CALayer tree to show the content described by
// |ca_layer_params|.
virtual void UpdateCALayerTree(const gfx::CALayerParams& ca_layer_params) = 0;
};
} // namespace ui
#endif // UI_ACCELERATED_WIDGET_MAC_CA_LAYER_FRAME_SINK_H_