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

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

Issue 2903363002: VR: Split off UI code into a library to ease future unit testing. (Closed)
Patch Set: More tweaks. 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/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 c734358fb6c87b74369f5f967fe0150e4c21c9b1..9593aa5779b181bc031d2a2c12085497bd94518a 100644
--- a/chrome/browser/android/vr_shell/ui_elements/textured_element.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/textured_element.cc
@@ -7,7 +7,7 @@
#include "base/trace_event/trace_event.h"
#include "cc/paint/skia_paint_canvas.h"
#include "chrome/browser/android/vr_shell/textures/ui_texture.h"
-#include "chrome/browser/android/vr_shell/vr_shell_renderer.h"
+#include "chrome/browser/android/vr_shell/ui_element_renderer.h"
#include "third_party/skia/include/core/SkSurface.h"
namespace vr_shell {
@@ -39,15 +39,15 @@ void TexturedElement::UpdateTexture() {
Flush(surface.get());
}
-void TexturedElement::Render(VrShellRenderer* renderer,
+void TexturedElement::Render(UiElementRenderer* renderer,
vr::Mat4f view_proj_matrix) const {
if (!initialized_)
return;
gfx::SizeF drawn_size = GetTexture()->GetDrawnSize();
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());
+ renderer->DrawTexturedQuad(texture_handle_, view_proj_matrix, copy_rect,
+ opacity());
}
void TexturedElement::Flush(SkSurface* surface) {

Powered by Google App Engine
This is Rietveld 408576698