#include <renderer.h>
Definition at line 19 of file renderer.h.
◆ RenderCallback
◆ Renderer()
Definition at line 15 of file renderer.cc.
17 : frames_in_flight_sema_(std::make_shared<fml::Semaphore>(
18 std::max<std::size_t>(1u, max_frames_in_flight))),
19 context_(std::move(context)) {
20 if (!context_ || !context_->IsValid()) {
21 return;
22 }
23
24 is_valid_ = true;
25}
◆ ~Renderer()
impeller::Renderer::~Renderer |
( |
| ) |
|
|
default |
◆ GetContext()
std::shared_ptr< Context > impeller::Renderer::GetContext |
( |
| ) |
const |
Definition at line 61 of file renderer.cc.
61 {
62 return context_;
63}
◆ IsValid()
bool impeller::Renderer::IsValid |
( |
| ) |
const |
Definition at line 29 of file renderer.cc.
29 {
30 return is_valid_;
31}
◆ Render()
bool impeller::Renderer::Render |
( |
std::unique_ptr< Surface > |
surface, |
|
|
const RenderCallback & |
callback |
|
) |
| const |
Definition at line 33 of file renderer.cc.
34 {
37 return false;
38 }
39
41 return false;
42 }
43
45
46 if (render_callback && !render_callback(render_target)) {
47 return false;
48 }
49
50 if (!frames_in_flight_sema_->Wait()) {
51 return false;
52 }
53
54 const auto present_result =
surface->Present();
55
56 frames_in_flight_sema_->Signal();
57
58 return present_result;
59}
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
#define TRACE_EVENT0(category_group, name)
◆ kDefaultMaxFramesInFlight
constexpr size_t impeller::Renderer::kDefaultMaxFramesInFlight = 3u |
|
staticconstexpr |
The documentation for this class was generated from the following files: