Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
gles2_frame_backend.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_CAMERA_GLES2_FRAME_BACKEND_H_
5#define SYMBIAN_API_CAMERA_GLES2_FRAME_BACKEND_H_
6
7#include <cstdint>
8
9#include <absl/base/nullability.h>
10
11#include "absl/status/status.h"
13
14namespace symbian::api::camera {
15
17
18// GLES2 RGBA8888 transfers and resampling on the caller's current context.
19// Textures remain owned by their producer/consumer. A nonzero device token
20// identifies the current context; the caller supplies the same token to both
21// texture views. Use kExclusive only when this backend alone owns the current
22// context's GL state. This skips state queries and restoration; it is
23// useful for a dedicated upload/processing context. CPU rows are top-down,
24// while GL stores bottom-up, so transfers
25// reverse row order. Texture-to-texture operations stay on the GPU.
26// Client upload bytes may be released when the call returns. Texture work
27// remains ordered in this context; callers using another context supply fences.
28// Producers in another context must make their input ready before the call.
29class Gles2FrameBackend final {
30 public:
31 explicit Gles2FrameBackend(
32 std::uintptr_t device,
37
38 absl::Status Transform(const FrameView& source,
39 const MutableFrameView& destination,
40 ResampleFilter filter);
41 // Non-owning transform view valid only while this backend is alive.
43 void Close();
44
45 private:
46 struct Impl;
47 Impl* absl_nullable impl_ = nullptr;
48 std::uintptr_t device_;
49 Gles2ContextUse context_use_;
50};
51
52} // namespace symbian::api::camera
53
54#endif // SYMBIAN_API_CAMERA_GLES2_FRAME_BACKEND_H_
Definition gles2_frame_backend.h:29
Gles2FrameBackend(const Gles2FrameBackend &)=delete
~Gles2FrameBackend()
Definition gles2_frame_backend.cc:365
absl::Status Transform(const FrameView &source, const MutableFrameView &destination, ResampleFilter filter)
Definition gles2_frame_backend.cc:377
FrameBackend Borrow()
Definition gles2_frame_backend.cc:369
Gles2FrameBackend & operator=(const Gles2FrameBackend &)=delete
void Close()
Definition gles2_frame_backend.cc:520
Definition camera.cc:9
ResampleFilter
Definition frame.h:116
Gles2ContextUse
Definition gles2_frame_backend.h:16
Definition frame.h:75
Definition gles2_frame_backend.cc:250