#include "chrome/browser/vr/graphics_delegate.h"
#include <vector>
#include "base/check.h"
#include "base/notimplemented.h"
#include "base/numerics/angle_conversions.h"
#include "chrome/browser/vr/fov_rectangle.h"
#include "chrome/browser/vr/frame_type.h"
#include "chrome/browser/vr/model/camera_model.h"
#include "chrome/browser/vr/render_info.h"
#include "device/vr/public/mojom/vr_service.mojom.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/geometry/transform.h"
#if BUILDFLAG(IS_WIN)
#include "chrome/browser/vr/graphics_delegate_win.h"
#elif BUILDFLAG(IS_ANDROID)
#include "chrome/browser/vr/graphics_delegate_android.h"
#endif
namespace vr {
namespace {
constexpr float kZNear = …;
constexpr float kZFar = …;
CameraModel CameraModelViewProjFromXRView(
const device::mojom::XRViewPtr& view) { … }
}
std::unique_ptr<GraphicsDelegate> GraphicsDelegate::Create() { … }
GraphicsDelegate::GraphicsDelegate() = default;
GraphicsDelegate::~GraphicsDelegate() = default;
float GraphicsDelegate::GetZNear() { … }
void GraphicsDelegate::SetXrViews(
const std::vector<device::mojom::XRViewPtr>& views) { … }
gfx::RectF GraphicsDelegate::GetLeft() { … }
gfx::RectF GraphicsDelegate::GetRight() { … }
FovRectangles GraphicsDelegate::GetRecommendedFovs() { … }
RenderInfo GraphicsDelegate::GetRenderInfo(FrameType frame_type,
const gfx::Transform& head_pose) { … }
RenderInfo GraphicsDelegate::GetOptimizedRenderInfoForFovs(
const FovRectangles& fovs) { … }
gfx::Size GraphicsDelegate::GetTextureSize() { … }
}