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

Unified Diff: chrome/browser/android/vr_shell/vr_shell_gl.cc

Issue 2834543006: Hook up insecure content warnings for http webVR presentation. (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
Index: chrome/browser/android/vr_shell/vr_shell_gl.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell_gl.cc b/chrome/browser/android/vr_shell/vr_shell_gl.cc
index 05a6c98fdd8852cc1aff038d50e06eef49145280..27e62da0b5b5d4e74e3cf01463c52a65aa3ecded 100644
--- a/chrome/browser/android/vr_shell/vr_shell_gl.cc
+++ b/chrome/browser/android/vr_shell/vr_shell_gl.cc
@@ -15,7 +15,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/android/vr_shell/fps_meter.h"
#include "chrome/browser/android/vr_shell/mailbox_to_surface_bridge.h"
-#include "chrome/browser/android/vr_shell/ui_element.h"
+#include "chrome/browser/android/vr_shell/ui_elements/ui_element.h"
#include "chrome/browser/android/vr_shell/ui_interface.h"
#include "chrome/browser/android/vr_shell/ui_scene.h"
#include "chrome/browser/android/vr_shell/ui_scene_manager.h"
@@ -294,6 +294,8 @@ void VrShellGl::InitializeGl(gfx::AcceleratedWidget window) {
InitializeRenderer();
+ scene_->OnGLInitialized();
+
gfx::Size webvr_size =
device::GvrDelegate::GetRecommendedWebVrSize(gvr_api_.get());
DVLOG(1) << __FUNCTION__ << ": resize initial to " << webvr_size.width()
@@ -994,18 +996,13 @@ void VrShellGl::DrawElements(const vr::Mat4f& view_proj_matrix,
vr::MatrixMul(view_proj_matrix, rect->TransformMatrix(), &transform);
switch (rect->fill) {
- case Fill::SKIA: {
- break;
- }
case Fill::OPAQUE_GRADIENT: {
- vr_shell_renderer_->GetTexturedQuadRenderer()->Flush();
vr_shell_renderer_->GetGradientQuadRenderer()->Draw(
transform, rect->edge_color, rect->center_color,
rect->computed_opacity);
break;
}
case Fill::GRID_GRADIENT: {
- vr_shell_renderer_->GetTexturedQuadRenderer()->Flush();
vr_shell_renderer_->GetGradientGridRenderer()->Draw(
transform, rect->edge_color, rect->center_color,
rect->gridline_count, rect->computed_opacity);
@@ -1013,16 +1010,19 @@ void VrShellGl::DrawElements(const vr::Mat4f& view_proj_matrix,
}
case Fill::CONTENT: {
gfx::RectF copy_rect(0, 0, 1, 1);
- vr_shell_renderer_->GetTexturedQuadRenderer()->AddQuad(
+ vr_shell_renderer_->GetExternalTexturedQuadRenderer()->Draw(
content_texture_id_, transform, copy_rect, rect->computed_opacity);
break;
}
+ case Fill::SELF: {
+ rect->Render(vr_shell_renderer_.get(), transform);
+ break;
+ }
default:
break;
}
}
-
- vr_shell_renderer_->GetTexturedQuadRenderer()->Flush();
+ vr_shell_renderer_->Flush();
}
std::vector<const UiElement*> VrShellGl::GetElementsInDrawOrder(
« no previous file with comments | « chrome/browser/android/vr_shell/vr_gl_thread.cc ('k') | chrome/browser/android/vr_shell/vr_shell_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698