Flutter Engine
The Flutter Engine
WindowContext.cpp
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
9
11#if defined(SK_GRAPHITE)
14#endif
15
16namespace skwindow {
17
19 : fDisplayParams(params) {}
20
22
24 this->onSwapBuffers();
25}
26
27#if defined(SK_GRAPHITE)
28void WindowContext::snapRecordingAndSubmit() {
29 if (fGraphiteContext) {
30 SkASSERT(fGraphiteRecorder);
31 std::unique_ptr<skgpu::graphite::Recording> recording = fGraphiteRecorder->snap();
32 if (recording) {
34 info.fRecording = recording.get();
35 fGraphiteContext->insertRecording(info);
36 fGraphiteContext->submit(skgpu::graphite::SyncToCpu::kNo);
37 }
38 }
39}
40#endif
41
42} // namespace skwindow
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
#define SkASSERT(cond)
Definition: SkAssert.h:116
WindowContext(const DisplayParams &)
virtual void onSwapBuffers()=0
const EmbeddedViewParams * params