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

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRDisplay.cpp

Issue 2616403002: Revert of Add more WebVR layout tests, adjust test format (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/LayoutTests/vr/stageParameters_match.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "modules/vr/VRDisplay.h" 5 #include "modules/vr/VRDisplay.h"
6 6
7 #include "core/css/StylePropertySet.h" 7 #include "core/css/StylePropertySet.h"
8 #include "core/dom/DOMException.h" 8 #include "core/dom/DOMException.h"
9 #include "core/dom/DocumentUserGestureToken.h" 9 #include "core/dom/DocumentUserGestureToken.h"
10 #include "core/dom/FrameRequestCallback.h" 10 #include "core/dom/FrameRequestCallback.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 leftBounds->left = m_layer.leftBounds()[0]; 551 leftBounds->left = m_layer.leftBounds()[0];
552 leftBounds->top = m_layer.leftBounds()[1]; 552 leftBounds->top = m_layer.leftBounds()[1];
553 leftBounds->width = m_layer.leftBounds()[2]; 553 leftBounds->width = m_layer.leftBounds()[2];
554 leftBounds->height = m_layer.leftBounds()[3]; 554 leftBounds->height = m_layer.leftBounds()[3];
555 } else { 555 } else {
556 // Left eye defaults 556 // Left eye defaults
557 leftBounds->left = 0.0f; 557 leftBounds->left = 0.0f;
558 leftBounds->top = 0.0f; 558 leftBounds->top = 0.0f;
559 leftBounds->width = 0.5f; 559 leftBounds->width = 0.5f;
560 leftBounds->height = 1.0f; 560 leftBounds->height = 1.0f;
561 m_layer.setLeftBounds({0.0f, 0.0f, 0.5f, 1.0f});
562 } 561 }
563 562
564 if (m_layer.rightBounds().size() == 4) { 563 if (m_layer.rightBounds().size() == 4) {
565 rightBounds->left = m_layer.rightBounds()[0]; 564 rightBounds->left = m_layer.rightBounds()[0];
566 rightBounds->top = m_layer.rightBounds()[1]; 565 rightBounds->top = m_layer.rightBounds()[1];
567 rightBounds->width = m_layer.rightBounds()[2]; 566 rightBounds->width = m_layer.rightBounds()[2];
568 rightBounds->height = m_layer.rightBounds()[3]; 567 rightBounds->height = m_layer.rightBounds()[3];
569 } else { 568 } else {
570 // Right eye defaults 569 // Right eye defaults
571 rightBounds->left = 0.5f; 570 rightBounds->left = 0.5f;
572 rightBounds->top = 0.0f; 571 rightBounds->top = 0.0f;
573 rightBounds->width = 0.5f; 572 rightBounds->width = 0.5f;
574 rightBounds->height = 1.0f; 573 rightBounds->height = 1.0f;
575 m_layer.setRightBounds({0.5f, 0.0f, 0.5f, 1.0f});
576 } 574 }
577 575
578 m_display->UpdateLayerBounds(std::move(leftBounds), std::move(rightBounds)); 576 m_display->UpdateLayerBounds(std::move(leftBounds), std::move(rightBounds));
579 } 577 }
580 578
581 HeapVector<VRLayer> VRDisplay::getLayers() { 579 HeapVector<VRLayer> VRDisplay::getLayers() {
582 HeapVector<VRLayer> layers; 580 HeapVector<VRLayer> layers;
583 581
584 if (m_isPresenting) { 582 if (m_isPresenting) {
585 layers.append(m_layer); 583 layers.append(m_layer);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 visitor->trace(m_stageParameters); 766 visitor->trace(m_stageParameters);
769 visitor->trace(m_eyeParametersLeft); 767 visitor->trace(m_eyeParametersLeft);
770 visitor->trace(m_eyeParametersRight); 768 visitor->trace(m_eyeParametersRight);
771 visitor->trace(m_layer); 769 visitor->trace(m_layer);
772 visitor->trace(m_renderingContext); 770 visitor->trace(m_renderingContext);
773 visitor->trace(m_scriptedAnimationController); 771 visitor->trace(m_scriptedAnimationController);
774 visitor->trace(m_pendingPresentResolvers); 772 visitor->trace(m_pendingPresentResolvers);
775 } 773 }
776 774
777 } // namespace blink 775 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/vr/stageParameters_match.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698