| Index: third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| index 0c85c13a84877f6bde86a1ac2583841d2cf1ddd4..4fa6fa737b48b1bcd283427ec31cc2e29c010de0 100644
|
| --- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| +++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
|
| @@ -558,9 +558,14 @@ void VRDisplay::submitFrame() {
|
| RefPtr<Image> imageRef = m_renderingContext->getImage(
|
| PreferAcceleration, SnapshotReasonCreateImageBitmap);
|
|
|
| - // Hardware-accelerated rendering should always be texture backed.
|
| - // I hope nobody is trying to do WebVR with software rendering.
|
| - DCHECK(imageRef->isTextureBacked());
|
| + // Hardware-accelerated rendering should always be texture backed,
|
| + // as implemented by AcceleratedStaticBitmapImage. Ensure this is
|
| + // the case, don't attempt to render if using an unexpected drawing
|
| + // path.
|
| + if (!imageRef->isTextureBacked()) {
|
| + NOTREACHED() << "WebVR requires hardware-accelerated rendering to texture";
|
| + return;
|
| + }
|
|
|
| // The AcceleratedStaticBitmapImage must be kept alive until the
|
| // mailbox is used via createAndConsumeTextureCHROMIUM, the mailbox
|
|
|