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

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

Issue 2513773002: Added some tracing to VrShell (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_shell.cc
diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
index 48a19ba7428bd18e1c01cffffc3b08cfa2120c9f..9de3ce33217e3142f02ba836bc59074f921a3460 100644
--- a/chrome/browser/android/vr_shell/vr_shell.cc
+++ b/chrome/browser/android/vr_shell/vr_shell.cc
@@ -531,6 +531,7 @@ void VrShell::SetGvrPoseForWebVr(const gvr::Mat4f& pose, uint32_t pose_num) {
}
uint32_t GetPixelEncodedPoseIndex() {
+ TRACE_EVENT0("gpu", "VrShell::GetPixelEncodedPoseIndex");
// Read the pose index encoded in a bottom left pixel as color values.
// See also third_party/WebKit/Source/modules/vr/VRDisplay.cpp which
// encodes the pose index, and device/vr/android/gvr/gvr_device.cc
@@ -544,6 +545,7 @@ uint32_t GetPixelEncodedPoseIndex() {
}
void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) {
+ TRACE_EVENT0("gpu", "VrShell::DrawFrame");
// Reset the viewport list to just the pair of viewports for the
// primary buffer each frame. Head-locked viewports get added by
// DrawVrShell if needed.
@@ -623,6 +625,7 @@ void VrShell::DrawFrame(JNIEnv* env, const JavaParamRef<jobject>& obj) {
void VrShell::DrawVrShell(const gvr::Mat4f& head_pose,
gvr::Frame &frame) {
+ TRACE_EVENT0("gpu", "VrShell::DrawVrShell");
std::vector<const ContentRectangle*> head_locked_elements;
std::vector<const ContentRectangle*> world_elements;
for (const auto& rect : scene_->GetUiElements()) {
@@ -696,6 +699,7 @@ gvr::Sizei VrShell::GetWebVRCompositorSurfaceSize() {
void VrShell::DrawUiView(const gvr::Mat4f* head_pose,
const std::vector<const ContentRectangle*>& elements,
const gvr::Sizei& render_size, int viewport_offset) {
+ TRACE_EVENT0("gpu", "VrShell::DrawUiView");
for (auto eye : {GVR_LEFT_EYE, GVR_RIGHT_EYE}) {
buffer_viewport_list_->GetBufferViewport(
eye + viewport_offset, buffer_viewport_.get());
@@ -823,6 +827,7 @@ void VrShell::DrawCursor(const gvr::Mat4f& render_matrix) {
}
void VrShell::DrawWebVr() {
+ TRACE_EVENT0("gpu", "VrShell::DrawWebVr");
// Don't need face culling, depth testing, blending, etc. Turn it all off.
glDisable(GL_CULL_FACE);
glDepthMask(GL_FALSE);
@@ -916,6 +921,7 @@ void VrShell::ContentSurfaceChanged(JNIEnv* env,
jint width,
jint height,
const JavaParamRef<jobject>& surface) {
+ TRACE_EVENT0("gpu", "VrShell::ContentSurfaceChanged");
// If we have a delegate, must trigger "ready" callback one time only.
// Do so the first time we got a nonzero size. (This assumes it doesn't
// change, but once we get resize ability we'll no longer need this hack.)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698