chromium/chrome/browser/vr/elements/text.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/vr/elements/text.h"

#include "base/memory/raw_ptr.h"
#include "base/numerics/safe_conversions.h"
#include "cc/paint/skia_paint_canvas.h"
#include "chrome/browser/vr/elements/ui_texture.h"
#include "third_party/icu/source/common/unicode/uscript.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/vector2d.h"
#include "ui/gfx/render_text.h"
#include "ui/gfx/shadow_value.h"
#include "ui/gfx/text_elider.h"

namespace vr {

namespace {

constexpr int kTextPixelPerDmm =;
constexpr char kDefaultFontFamily[] =;

int DmmToPixel(float dmm) {}

float PixelToDmm(int pixel) {}

void UpdateRenderText(gfx::RenderText* render_text,
                      const std::u16string& text,
                      const gfx::FontList& font_list,
                      SkColor color) {}

}  // namespace

class TextTexture : public UiTexture {};

Text::Text(float font_height_dmms)
    :{}

Text::~Text() {}

void Text::SetText(const std::u16string& text) {}

void Text::SetFieldWidth(float width) {}

void Text::SetColor(SkColor color) {}

const std::vector<std::unique_ptr<gfx::RenderText>>& Text::LinesForTest() {}

UiTexture* Text::GetTexture() const {}

bool Text::TextureDependsOnMeasurement() const {}

gfx::Size Text::MeasureTextureSize() {}

gfx::Size TextTexture::LayOutText() {}

void TextTexture::Draw(SkCanvas* sk_canvas, const gfx::Size& texture_size) {}

void TextTexture::PrepareDrawText(const std::u16string& text,
                                  const gfx::FontList& font_list,
                                  gfx::Rect* bounds,
                                  SkColor color) {}

}  // namespace vr