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

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

Issue 2911943002: [vr] Add incognito coloring (Closed)
Patch Set: Created 3 years, 6 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 TRACE_EVENT0("gpu", "UiTexture::DrawAndLayout"); 49 TRACE_EVENT0("gpu", "UiTexture::DrawAndLayout");
50 canvas->drawColor(SK_ColorTRANSPARENT); 50 canvas->drawColor(SK_ColorTRANSPARENT);
51 dirty_ = false; 51 dirty_ = false;
52 Draw(canvas, texture_size); 52 Draw(canvas, texture_size);
53 } 53 }
54 54
55 bool UiTexture::HitTest(const gfx::PointF& point) const { 55 bool UiTexture::HitTest(const gfx::PointF& point) const {
56 return false; 56 return false;
57 } 57 }
58 58
59 void UiTexture::SetMode(ColorScheme::Mode mode) {
60 if (mode_ == mode)
61 return;
62 mode_ = mode;
63 OnSetMode();
64 }
65
66 void UiTexture::OnSetMode() {}
67
59 std::vector<std::unique_ptr<gfx::RenderText>> UiTexture::PrepareDrawStringRect( 68 std::vector<std::unique_ptr<gfx::RenderText>> UiTexture::PrepareDrawStringRect(
60 const base::string16& text, 69 const base::string16& text,
61 const gfx::FontList& font_list, 70 const gfx::FontList& font_list,
62 SkColor color, 71 SkColor color,
63 gfx::Rect* bounds, 72 gfx::Rect* bounds,
64 UiTexture::TextAlignment text_alignment, 73 UiTexture::TextAlignment text_alignment,
65 UiTexture::WrappingBehavior wrapping_behavior) { 74 UiTexture::WrappingBehavior wrapping_behavior) {
66 DCHECK(bounds); 75 DCHECK(bounds);
67 76
68 std::vector<std::unique_ptr<gfx::RenderText>> lines; 77 std::vector<std::unique_ptr<gfx::RenderText>> lines;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 fonts.push_back(gfx::Font(name, size)); 196 fonts.push_back(gfx::Font(name, size));
188 *font_list = gfx::FontList(fonts); 197 *font_list = gfx::FontList(fonts);
189 return true; 198 return true;
190 } 199 }
191 200
192 void UiTexture::SetForceFontFallbackFailureForTesting(bool force) { 201 void UiTexture::SetForceFontFallbackFailureForTesting(bool force) {
193 force_font_fallback_failure_for_testing_ = force; 202 force_font_fallback_failure_for_testing_ = force;
194 } 203 }
195 204
196 } // namespace vr_shell 205 } // namespace vr_shell
OLDNEW
« 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