Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
gles_rect_batch.h
Go to the documentation of this file.
1// Copyright 2026 The Symbian SDK Authors.
2// Licensed under the Apache License, Version 2.0.
3
4#ifndef SYMBIAN_API_DISPLAY_GLES_RECT_BATCH_H_
5#define SYMBIAN_API_DISPLAY_GLES_RECT_BATCH_H_
6
7#include <memory>
8
9#include "absl/base/nullability.h"
10#include "absl/status/status.h"
11#include "absl/status/statusor.h"
12
13namespace symbian::api::display {
14
23class GlesRectBatch final {
24 public:
25 static absl::StatusOr<GlesRectBatch> Create();
26 static absl::StatusOr<std::unique_ptr<GlesRectBatch>> CreateUnique();
27 GlesRectBatch(const GlesRectBatch&) = delete;
29 GlesRectBatch(GlesRectBatch&& other) noexcept;
30 GlesRectBatch& operator=(GlesRectBatch&& other) noexcept;
32
33 void Begin(int width, int height);
34 void AddRect(int x, int y, int width, int height, float red, float green,
35 float blue, float alpha = 1.0f);
36 void Draw();
37 void Close();
38
39 private:
41 absl::Status Open();
42 struct Impl;
43 Impl* absl_nullable impl_ = nullptr;
44};
45
46} // namespace symbian::api::display
47
48#endif // SYMBIAN_API_DISPLAY_GLES_RECT_BATCH_H_
unsigned green
Definition frame.cc:423
AxisSample y
Definition frame.cc:453
unsigned blue
Definition frame.cc:424
unsigned red
Definition frame.cc:422
AxisSample x
Definition frame.cc:452
Batches ordered solid-color UI rectangles into GLES2 draw calls.
Definition gles_rect_batch.h:23
void Close()
Definition gles_rect_batch.cc:198
void AddRect(int x, int y, int width, int height, float red, float green, float blue, float alpha=1.0f)
Definition gles_rect_batch.cc:165
static absl::StatusOr< GlesRectBatch > Create()
Definition gles_rect_batch.cc:93
static absl::StatusOr< std::unique_ptr< GlesRectBatch > > CreateUnique()
Definition gles_rect_batch.cc:99
~GlesRectBatch()
Definition gles_rect_batch.cc:109
GlesRectBatch & operator=(const GlesRectBatch &)=delete
void Begin(int width, int height)
Definition gles_rect_batch.cc:156
void Draw()
Definition gles_rect_batch.cc:192
GlesRectBatch(const GlesRectBatch &)=delete
Definition display.cc:9
Definition gles_rect_batch.cc:44
std::uint32_t height
Definition window_surface.cc:109
std::uint32_t width
Definition window_surface.cc:108