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

Unified Diff: chrome/browser/android/vr_shell/ui_elements/textured_element.cc

Issue 2856023003: Make UiElement a class (Closed)
Patch Set: rebase Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_elements/ui_element.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/ui_elements/textured_element.cc
diff --git a/chrome/browser/android/vr_shell/ui_elements/textured_element.cc b/chrome/browser/android/vr_shell/ui_elements/textured_element.cc
index b16b409d4cb710b753fc7fc5da5e2d8c096af9c5..3623c1e4529105dbc6381f1d1d13b609bc2b1fbb 100644
--- a/chrome/browser/android/vr_shell/ui_elements/textured_element.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/textured_element.cc
@@ -24,10 +24,10 @@ void TexturedElement::Initialize() {
texture_size_.width(), texture_size_.height());
GetTexture()->DrawAndLayout(surface->getCanvas(), texture_size_);
Flush(surface.get());
- fill = Fill::SELF;
+ set_fill(Fill::SELF);
gfx::SizeF drawn_size = GetTexture()->GetDrawnSize();
- float y = drawn_size.height() / drawn_size.width() * size.x();
- size = {size.x(), y, 1};
+ float y = drawn_size.height() / drawn_size.width() * size().x();
+ set_size({size().x(), y, 1});
}
void TexturedElement::Render(VrShellRenderer* renderer,
@@ -36,7 +36,7 @@ void TexturedElement::Render(VrShellRenderer* renderer,
gfx::RectF copy_rect(0, 0, drawn_size.width() / texture_size_.width(),
drawn_size.height() / texture_size_.height());
renderer->GetTexturedQuadRenderer()->AddQuad(
- texture_handle_, view_proj_matrix, copy_rect, opacity);
+ texture_handle_, view_proj_matrix, copy_rect, opacity());
}
void TexturedElement::Flush(SkSurface* surface) {
« no previous file with comments | « no previous file | chrome/browser/android/vr_shell/ui_elements/ui_element.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698