0
Files
src/ui/gl/gl_image_egl_pixmap.h
Peter Boström ac80ceefd0 Remove unused "base/macros.h" in ui/
Removes `#include "base/macros.h"` from files in ui/ that do not contain
`ignore_result(`.

Bug: 1010217
Change-Id: I6a7be30599db4d98495d895040da7af98a34f921
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3274994
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#940667}
2021-11-11 05:35:12 +00:00

56 lines
1.5 KiB
C++

// Copyright (c) 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_GL_GL_IMAGE_EGL_PIXMAP_H_
#define UI_GL_GL_IMAGE_EGL_PIXMAP_H_
#include <stdint.h>
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/x/glx.h"
#include "ui/gl/gl_export.h"
#include "ui/gl/gl_image.h"
typedef void* EGLSurface;
typedef void* EGLDisplay;
namespace gl {
class GL_EXPORT GLImageEGLPixmap : public GLImage {
public:
GLImageEGLPixmap(const gfx::Size& size, gfx::BufferFormat format);
GLImageEGLPixmap(const GLImageEGLPixmap&) = delete;
GLImageEGLPixmap& operator=(const GLImageEGLPixmap&) = delete;
bool Initialize(x11::Pixmap pixmap);
// Overridden from GLImage:
gfx::Size GetSize() override;
unsigned GetInternalFormat() override;
unsigned GetDataType() override;
BindOrCopy ShouldBindOrCopy() override;
bool BindTexImage(unsigned target) override;
void ReleaseTexImage(unsigned target) override;
void Flush() override {}
void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd,
uint64_t process_tracing_id,
const std::string& dump_name) override;
protected:
~GLImageEGLPixmap() override;
gfx::BufferFormat format() const { return format_; }
private:
EGLSurface surface_;
const gfx::Size size_;
gfx::BufferFormat format_;
EGLDisplay display_;
};
} // namespace gl
#endif // UI_GL_GL_IMAGE_EGL_PIXMAP_H_