Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Unified Diff: chrome/browser/android/vr_shell/textures/ui_texture.cc

Issue 2862283002: VR: Add initial URL bar element and texture. (Closed)
Patch Set: Drop anti-aliasing. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/textures/ui_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/ui_texture.cc b/chrome/browser/android/vr_shell/textures/ui_texture.cc
index b5edf11cafcede42e9f3c72f548c09787a5aa0e8..4c68b42b6b057299a96ff3cf5d60b91d913f5536 100644
--- a/chrome/browser/android/vr_shell/textures/ui_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/ui_texture.cc
@@ -22,7 +22,9 @@
namespace vr_shell {
namespace {
-constexpr char kDefaultFontFamily[] = "sans-serif";
+
+static constexpr char kDefaultFontFamily[] = "sans-serif";
+
} // namespace
UiTexture::UiTexture() = default;
@@ -30,16 +32,18 @@ UiTexture::UiTexture() = default;
UiTexture::~UiTexture() = default;
void UiTexture::DrawAndLayout(SkCanvas* canvas, const gfx::Size& texture_size) {
- cc::SkiaPaintCanvas paint_canvas(canvas);
- gfx::Canvas gfx_canvas(&paint_canvas, 1.0f);
- gfx_canvas.DrawColor(SK_ColorTRANSPARENT);
- Draw(&gfx_canvas, texture_size);
+ canvas->drawColor(SK_ColorTRANSPARENT);
+ Draw(canvas, texture_size);
}
bool UiTexture::IsRTL() {
return base::i18n::IsRTL();
}
+gfx::FontList UiTexture::GetDefaultFontList(int size) {
+ return gfx::FontList(gfx::Font(kDefaultFontFamily, size));
+}
+
gfx::FontList UiTexture::GetFontList(int size, base::string16 text) {
gfx::Font default_font(kDefaultFontFamily, size);
std::vector<gfx::Font> fonts{default_font};
« no previous file with comments | « chrome/browser/android/vr_shell/textures/ui_texture.h ('k') | chrome/browser/android/vr_shell/textures/url_bar_texture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698