#include "render.h"
#include <unistd.h>
#include <xcb/xcb.h>
#include <xcb/xcbext.h>
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/xproto_internal.h"
namespace x11 {
Render::Render(Connection* connection, const x11::QueryExtensionReply& info)
: … { … }
std::string Render::PictFormatError::ToString() const { … }
template <>
void ReadError<Render::PictFormatError>(Render::PictFormatError* error_,
ReadBuffer* buffer) { … }
std::string Render::PictureError::ToString() const { … }
template <>
void ReadError<Render::PictureError>(Render::PictureError* error_,
ReadBuffer* buffer) { … }
std::string Render::PictOpError::ToString() const { … }
template <>
void ReadError<Render::PictOpError>(Render::PictOpError* error_,
ReadBuffer* buffer) { … }
std::string Render::GlyphSetError::ToString() const { … }
template <>
void ReadError<Render::GlyphSetError>(Render::GlyphSetError* error_,
ReadBuffer* buffer) { … }
std::string Render::GlyphError::ToString() const { … }
template <>
void ReadError<Render::GlyphError>(Render::GlyphError* error_,
ReadBuffer* buffer) { … }
Future<Render::QueryVersionReply> Render::QueryVersion(
const Render::QueryVersionRequest& request) { … }
Future<Render::QueryVersionReply> Render::QueryVersion(
const uint32_t& client_major_version,
const uint32_t& client_minor_version) { … }
template <>
COMPONENT_EXPORT(X11)
std::unique_ptr<Render::QueryVersionReply> detail::ReadReply<
Render::QueryVersionReply>(ReadBuffer* buffer) { … }
Future<Render::QueryPictFormatsReply> Render::QueryPictFormats(
const Render::QueryPictFormatsRequest& request) { … }
Future<Render::QueryPictFormatsReply> Render::QueryPictFormats() { … }
template <>
COMPONENT_EXPORT(X11)
std::unique_ptr<Render::QueryPictFormatsReply> detail::ReadReply<
Render::QueryPictFormatsReply>(ReadBuffer* buffer) { … }
Future<Render::QueryPictIndexValuesReply> Render::QueryPictIndexValues(
const Render::QueryPictIndexValuesRequest& request) { … }
Future<Render::QueryPictIndexValuesReply> Render::QueryPictIndexValues(
const PictFormat& format) { … }
template <>
COMPONENT_EXPORT(X11)
std::unique_ptr<Render::QueryPictIndexValuesReply> detail::ReadReply<
Render::QueryPictIndexValuesReply>(ReadBuffer* buffer) { … }
Future<void> Render::CreatePicture(
const Render::CreatePictureRequest& request) { … }
Future<void> Render::CreatePicture(
const Picture& pid,
const Drawable& drawable,
const PictFormat& format,
const std::optional<Repeat>& repeat,
const std::optional<Picture>& alphamap,
const std::optional<int32_t>& alphaxorigin,
const std::optional<int32_t>& alphayorigin,
const std::optional<int32_t>& clipxorigin,
const std::optional<int32_t>& clipyorigin,
const std::optional<Pixmap>& clipmask,
const std::optional<uint32_t>& graphicsexposure,
const std::optional<SubwindowMode>& subwindowmode,
const std::optional<PolyEdge>& polyedge,
const std::optional<PolyMode>& polymode,
const std::optional<Atom>& dither,
const std::optional<uint32_t>& componentalpha) { … }
Future<void> Render::ChangePicture(
const Render::ChangePictureRequest& request) { … }
Future<void> Render::ChangePicture(
const Picture& picture,
const std::optional<Repeat>& repeat,
const std::optional<Picture>& alphamap,
const std::optional<int32_t>& alphaxorigin,
const std::optional<int32_t>& alphayorigin,
const std::optional<int32_t>& clipxorigin,
const std::optional<int32_t>& clipyorigin,
const std::optional<Pixmap>& clipmask,
const std::optional<uint32_t>& graphicsexposure,
const std::optional<SubwindowMode>& subwindowmode,
const std::optional<PolyEdge>& polyedge,
const std::optional<PolyMode>& polymode,
const std::optional<Atom>& dither,
const std::optional<uint32_t>& componentalpha) { … }
Future<void> Render::SetPictureClipRectangles(
const Render::SetPictureClipRectanglesRequest& request) { … }
Future<void> Render::SetPictureClipRectangles(
const Picture& picture,
const int16_t& clip_x_origin,
const int16_t& clip_y_origin,
const std::vector<Rectangle>& rectangles) { … }
Future<void> Render::FreePicture(const Render::FreePictureRequest& request) { … }
Future<void> Render::FreePicture(const Picture& picture) { … }
Future<void> Render::Composite(const Render::CompositeRequest& request) { … }
Future<void> Render::Composite(const PictOp& op,
const Picture& src,
const Picture& mask,
const Picture& dst,
const int16_t& src_x,
const int16_t& src_y,
const int16_t& mask_x,
const int16_t& mask_y,
const int16_t& dst_x,
const int16_t& dst_y,
const uint16_t& width,
const uint16_t& height) { … }
Future<void> Render::Trapezoids(const Render::TrapezoidsRequest& request) { … }
Future<void> Render::Trapezoids(const PictOp& op,
const Picture& src,
const Picture& dst,
const PictFormat& mask_format,
const int16_t& src_x,
const int16_t& src_y,
const std::vector<Trapezoid>& traps) { … }
Future<void> Render::Triangles(const Render::TrianglesRequest& request) { … }
Future<void> Render::Triangles(const PictOp& op,
const Picture& src,
const Picture& dst,
const PictFormat& mask_format,
const int16_t& src_x,
const int16_t& src_y,
const std::vector<Triangle>& triangles) { … }
Future<void> Render::TriStrip(const Render::TriStripRequest& request) { … }
Future<void> Render::TriStrip(const PictOp& op,
const Picture& src,
const Picture& dst,
const PictFormat& mask_format,
const int16_t& src_x,
const int16_t& src_y,
const std::vector<PointFix>& points) { … }
Future<void> Render::TriFan(const Render::TriFanRequest& request) { … }
Future<void> Render::TriFan(const PictOp& op,
const Picture& src,
const Picture& dst,
const PictFormat& mask_format,
const int16_t& src_x,
const int16_t& src_y,
const std::vector<PointFix>& points) { … }
Future<void> Render::CreateGlyphSet(
const Render::CreateGlyphSetRequest& request) { … }
Future<void> Render::CreateGlyphSet(const GlyphSet& gsid,
const PictFormat& format) { … }
Future<void> Render::ReferenceGlyphSet(
const Render::ReferenceGlyphSetRequest& request) { … }
Future<void> Render::ReferenceGlyphSet(const GlyphSet& gsid,
const GlyphSet& existing) { … }
Future<void> Render::FreeGlyphSet(const Render::FreeGlyphSetRequest& request) { … }
Future<void> Render::FreeGlyphSet(const GlyphSet& glyphset) { … }
Future<void> Render::AddGlyphs(const Render::AddGlyphsRequest& request) { … }
Future<void> Render::AddGlyphs(const GlyphSet& glyphset,
const std::vector<uint32_t>& glyphids,
const std::vector<GlyphInfo>& glyphs,
const std::vector<uint8_t>& data) { … }
Future<void> Render::FreeGlyphs(const Render::FreeGlyphsRequest& request) { … }
Future<void> Render::FreeGlyphs(const GlyphSet& glyphset,
const std::vector<Glyph>& glyphs) { … }
Future<void> Render::CompositeGlyphs8(
const Render::CompositeGlyphs8Request& request) { … }
Future<void> Render::CompositeGlyphs8(const PictOp& op,
const Picture& src,
const Picture& dst,
const PictFormat& mask_format,
const GlyphSet& glyphset,
const int16_t& src_x,
const int16_t& src_y,
const std::vector<uint8_t>& glyphcmds) { … }
Future<void> Render::CompositeGlyphs16(
const Render::CompositeGlyphs16Request& request) { … }
Future<void> Render::CompositeGlyphs16(const PictOp& op,
const Picture& src,
const Picture& dst,
const PictFormat& mask_format,
const GlyphSet& glyphset,
const int16_t& src_x,
const int16_t& src_y,
const std::vector<uint8_t>& glyphcmds) { … }
Future<void> Render::CompositeGlyphs32(
const Render::CompositeGlyphs32Request& request) { … }
Future<void> Render::CompositeGlyphs32(const PictOp& op,
const Picture& src,
const Picture& dst,
const PictFormat& mask_format,
const GlyphSet& glyphset,
const int16_t& src_x,
const int16_t& src_y,
const std::vector<uint8_t>& glyphcmds) { … }
Future<void> Render::FillRectangles(
const Render::FillRectanglesRequest& request) { … }
Future<void> Render::FillRectangles(const PictOp& op,
const Picture& dst,
const Color& color,
const std::vector<Rectangle>& rects) { … }
Future<void> Render::CreateCursor(const Render::CreateCursorRequest& request) { … }
Future<void> Render::CreateCursor(const Cursor& cid,
const Picture& source,
const uint16_t& x,
const uint16_t& y) { … }
Future<void> Render::SetPictureTransform(
const Render::SetPictureTransformRequest& request) { … }
Future<void> Render::SetPictureTransform(const Picture& picture,
const Transform& transform) { … }
Future<Render::QueryFiltersReply> Render::QueryFilters(
const Render::QueryFiltersRequest& request) { … }
Future<Render::QueryFiltersReply> Render::QueryFilters(
const Drawable& drawable) { … }
template <>
COMPONENT_EXPORT(X11)
std::unique_ptr<Render::QueryFiltersReply> detail::ReadReply<
Render::QueryFiltersReply>(ReadBuffer* buffer) { … }
Future<void> Render::SetPictureFilter(
const Render::SetPictureFilterRequest& request) { … }
Future<void> Render::SetPictureFilter(const Picture& picture,
const std::string& filter,
const std::vector<Fixed>& values) { … }
Future<void> Render::CreateAnimCursor(
const Render::CreateAnimCursorRequest& request) { … }
Future<void> Render::CreateAnimCursor(
const Cursor& cid,
const std::vector<AnimationCursorElement>& cursors) { … }
Future<void> Render::AddTraps(const Render::AddTrapsRequest& request) { … }
Future<void> Render::AddTraps(const Picture& picture,
const int16_t& x_off,
const int16_t& y_off,
const std::vector<Trap>& traps) { … }
Future<void> Render::CreateSolidFill(
const Render::CreateSolidFillRequest& request) { … }
Future<void> Render::CreateSolidFill(const Picture& picture,
const Color& color) { … }
Future<void> Render::CreateLinearGradient(
const Render::CreateLinearGradientRequest& request) { … }
Future<void> Render::CreateLinearGradient(const Picture& picture,
const PointFix& p1,
const PointFix& p2,
const std::vector<Fixed>& stops,
const std::vector<Color>& colors) { … }
Future<void> Render::CreateRadialGradient(
const Render::CreateRadialGradientRequest& request) { … }
Future<void> Render::CreateRadialGradient(const Picture& picture,
const PointFix& inner,
const PointFix& outer,
const Fixed& inner_radius,
const Fixed& outer_radius,
const std::vector<Fixed>& stops,
const std::vector<Color>& colors) { … }
Future<void> Render::CreateConicalGradient(
const Render::CreateConicalGradientRequest& request) { … }
Future<void> Render::CreateConicalGradient(const Picture& picture,
const PointFix& center,
const Fixed& angle,
const std::vector<Fixed>& stops,
const std::vector<Color>& colors) { … }
}