class Demo
Defined at line 13 of file ../../src/ui/examples/escher/common/demo.h
Base class for Escher demos.
Public Members
static const uint32_t kMaxOutstandingFrames
Public Methods
void Demo (escher::EscherWeakPtr escher, const char * name)
Defined at line 20 of file ../../src/ui/examples/escher/common/demo.cc
void ~Demo ()
Defined at line 23 of file ../../src/ui/examples/escher/common/demo.cc
bool HandleKeyPress (std::string key)
|key| must contain either a single alpha-numeric character (uppercase
only), or one of the special values "ESCAPE", "SPACE", and "RETURN".
Return true if the key-press was handled, and false otherwise.
Defined at line 25 of file ../../src/ui/examples/escher/common/demo.cc
void BeginTouch (uint64_t touch_id, double x_position, double y_position)
Begin a touch. Only one touch can have the specified |touch_id| at any
given time (it is guaranteed to not be reused until EndTouch() is called).
Defined at line 28 of file ../../src/ui/examples/escher/common/demo.h
void ContinueTouch (uint64_t touch_id, const double * x_positions, const double * y_positions, size_t position_count)
Continue a touch. Multiple positions may be aggregated since the last time
that BeginTouch()/ContinueTouch() were called; the number of positions is
provided by |position_count| which is guaranteed to be >= 1. If multiple
positions are aggregated, they are provided in order of occurrence.
Defined at line 33 of file ../../src/ui/examples/escher/common/demo.h
void DrawFrame (const escher::FramePtr & frame, const escher::ImagePtr & output_image, const escher::SemaphorePtr & framebuffer_acquired)
void EndTouch (uint64_t touch_id, double x_position, double y_position)
End a touch. Afterward, |touch_id| may appear in a subsequent call of
BeginTouch().
Defined at line 37 of file ../../src/ui/examples/escher/common/demo.h
const char * name ()
Defined at line 42 of file ../../src/ui/examples/escher/common/demo.h
escher::Escher * escher ()
Defined at line 43 of file ../../src/ui/examples/escher/common/demo.h
escher::EscherWeakPtr GetEscherWeakPtr ()
Defined at line 44 of file ../../src/ui/examples/escher/common/demo.h
const escher::VulkanContext & vulkan_context ()
Defined at line 45 of file ../../src/ui/examples/escher/common/demo.h
void RunOffscreenBenchmark (Demo * demo, uint32_t framebuffer_width, uint32_t framebuffer_height, vk::Format framebuffer_format, size_t frame_count)
Helper function that draws the specified number of frames to an offscreen buffer.
Defined at line 64 of file ../../src/ui/examples/escher/common/demo.cc
Protected Methods
void ToggleTracing ()
Defined at line 50 of file ../../src/ui/examples/escher/common/demo.cc