#ifndef UI_GFX_CA_LAYER_PARAMS_H_
#define UI_GFX_CA_LAYER_PARAMS_H_
#include "base/component_export.h"
#include "build/build_config.h"
#include "ui/gfx/geometry/size.h"
#if BUILDFLAG(IS_APPLE)
#include "ui/gfx/mac/io_surface.h"
#endif
namespace gfx {
struct COMPONENT_EXPORT(GFX) CALayerParams {
CALayerParams();
CALayerParams(CALayerParams&& params);
CALayerParams(const CALayerParams& params);
CALayerParams& operator=(CALayerParams&& params);
CALayerParams& operator=(const CALayerParams& params);
~CALayerParams();
bool operator==(const CALayerParams& params) const {
return is_empty == params.is_empty &&
ca_context_id == params.ca_context_id &&
#if BUILDFLAG(IS_APPLE)
io_surface_mach_port == params.io_surface_mach_port &&
#endif
pixel_size == params.pixel_size &&
scale_factor == params.scale_factor;
}
bool is_empty = true;
uint32_t ca_context_id = 0;
#if BUILDFLAG(IS_APPLE)
gfx::ScopedRefCountedIOSurfaceMachPort io_surface_mach_port;
#endif
gfx::Size pixel_size;
float scale_factor = 1.f;
};
}
#endif