#include "chrome/browser/vr/renderers/radial_gradient_quad_renderer.h"
#include "chrome/browser/vr/elements/corner_radii.h"
#include "chrome/browser/vr/renderers/textured_quad_renderer.h"
#include "device/vr/vr_gl_util.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/transform.h"
namespace vr {
namespace {
static constexpr int kPositionDataSize = …;
static constexpr size_t kPositionDataOffset = …;
static constexpr int kOffsetScaleDataSize = …;
static constexpr size_t kOffsetScaleDataOffset = …;
static constexpr int kCornerPositionDataSize = …;
static constexpr size_t kCornerPositionDataOffset = …;
static constexpr size_t kDataStride = …;
static constexpr size_t kInnerRectOffset = …;
static constexpr char const* kVertexShader = …;
static constexpr char const* kFragmentShader = …;
void SetCornerOffset(GLuint handle, float radius, const gfx::SizeF& size) { … }
}
RadialGradientQuadRenderer::RadialGradientQuadRenderer()
: … { … }
RadialGradientQuadRenderer::~RadialGradientQuadRenderer() = default;
void RadialGradientQuadRenderer::Draw(
const gfx::Transform& model_view_proj_matrix,
SkColor edge_color,
SkColor center_color,
const gfx::RectF& clip_rect,
float opacity,
const gfx::SizeF& element_size,
const CornerRadii& radii) { … }
}