| Flutter Impeller |

context.cc
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "impeller/renderer/context.h"
6
7 #include <utility>
8
9 namespace impeller {
10
11 Context::~Context() = default;
12
13 Context::Context() = default;
14
15 bool Context::UpdateOffscreenLayerPixelFormat(PixelFormat format) {
16 return false;
17 }
18
19 bool Context::EnqueueCommandBuffer(
20 std::shared_ptr<CommandBuffer> command_buffer) {
21 return GetCommandQueue()->Submit({std::move(command_buffer)}).ok();
22 }
23
24 bool Context::FlushCommandBuffers() {
25 return true;
26 }
27
28 std::shared_ptr<const IdleWaiter> Context::GetIdleWaiter() const {
29 return nullptr;
30 }
31
32 void Context::ResetThreadLocalState() const {
33 // Nothing to do.
34 }
35
36 bool Context::AddTrackingFence(const std::shared_ptr<Texture>& texture) const {
37 return false;
38 }
39
40 bool Context::SubmitOnscreen(std::shared_ptr<CommandBuffer> cmd_buffer) {
41 return EnqueueCommandBuffer(std::move(cmd_buffer));
42 }
43
44 } // namespace impeller
impeller::Context::GetIdleWaiter
virtual std::shared_ptr< const IdleWaiter > GetIdleWaiter() const
Definition: context.cc:28
impeller::Context::AddTrackingFence
virtual bool AddTrackingFence(const std::shared_ptr< Texture > &texture) const
Definition: context.cc:36
impeller::Context::SubmitOnscreen
virtual bool SubmitOnscreen(std::shared_ptr< CommandBuffer > cmd_buffer)
Submit the command buffer that renders to the onscreen surface.
Definition: context.cc:40
impeller::Context::UpdateOffscreenLayerPixelFormat
virtual bool UpdateOffscreenLayerPixelFormat(PixelFormat format)
Definition: context.cc:15
impeller::Context::Context
Context()
impeller::Context::FlushCommandBuffers
virtual bool FlushCommandBuffers()
Flush all pending command buffers.
Definition: context.cc:24
impeller::Context::GetCommandQueue
virtual std::shared_ptr< CommandQueue > GetCommandQueue() const =0
Return the graphics queue for submitting command buffers.
impeller::Context::~Context
virtual ~Context()
Destroys an Impeller context.
impeller::Context::ResetThreadLocalState
virtual void ResetThreadLocalState() const
Definition: context.cc:32
impeller::Context::EnqueueCommandBuffer
virtual bool EnqueueCommandBuffer(std::shared_ptr< CommandBuffer > command_buffer)
Enqueue command_buffer for submission by the end of the frame.
Definition: context.cc:19
impeller
Definition: allocation.cc:12
impeller::PixelFormat
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
Definition: formats.h:99
context.h