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

Side by Side Diff: chrome/browser/android/vr_shell/textures/ui_texture.cc

Issue 2902043005: [vr] Add incognito coloring (Closed)
Patch Set: . 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/vr_shell/textures/ui_texture.h" 5 #include "chrome/browser/android/vr_shell/textures/ui_texture.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 TRACE_EVENT0("gpu", "UiTexture::DrawAndLayout"); 47 TRACE_EVENT0("gpu", "UiTexture::DrawAndLayout");
48 canvas->drawColor(SK_ColorTRANSPARENT); 48 canvas->drawColor(SK_ColorTRANSPARENT);
49 dirty_ = false; 49 dirty_ = false;
50 Draw(canvas, texture_size); 50 Draw(canvas, texture_size);
51 } 51 }
52 52
53 bool UiTexture::HitTest(const gfx::PointF& point) const { 53 bool UiTexture::HitTest(const gfx::PointF& point) const {
54 return false; 54 return false;
55 } 55 }
56 56
57 void UiTexture::SetMode(ColorScheme::Mode mode) {
58 if (mode_ == mode)
59 return;
60 mode_ = mode;
61 OnSetMode();
62 }
63
64 void UiTexture::OnSetMode() {}
65
57 std::vector<std::unique_ptr<gfx::RenderText>> UiTexture::PrepareDrawStringRect( 66 std::vector<std::unique_ptr<gfx::RenderText>> UiTexture::PrepareDrawStringRect(
58 const base::string16& text, 67 const base::string16& text,
59 const gfx::FontList& font_list, 68 const gfx::FontList& font_list,
60 SkColor color, 69 SkColor color,
61 gfx::Rect* bounds, 70 gfx::Rect* bounds,
62 UiTexture::TextAlignment text_alignment, 71 UiTexture::TextAlignment text_alignment,
63 UiTexture::WrappingBehavior wrapping_behavior) { 72 UiTexture::WrappingBehavior wrapping_behavior) {
64 DCHECK(bounds); 73 DCHECK(bounds);
65 74
66 std::vector<std::unique_ptr<gfx::RenderText>> lines; 75 std::vector<std::unique_ptr<gfx::RenderText>> lines;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 std::string name = GetFallbackFontNameForChar(default_font, c, ""); 181 std::string name = GetFallbackFontNameForChar(default_font, c, "");
173 if (!name.empty()) 182 if (!name.empty())
174 names.insert(name); 183 names.insert(name);
175 } 184 }
176 for (const auto& name : names) 185 for (const auto& name : names)
177 fonts.push_back(gfx::Font(name, size)); 186 fonts.push_back(gfx::Font(name, size));
178 return gfx::FontList(fonts); 187 return gfx::FontList(fonts);
179 } 188 }
180 189
181 } // namespace vr_shell 190 } // namespace vr_shell
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698