Commit 27984fb4 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[arraybuffer] Remove uses of DOMTypedArray::View

The indirection over DOMTypedArray::View is not necessary, DOMTypedArray
can be used directly. This CL works towards removing ArrayBufferView and
TypedArray.

R=haraken@chromium.org

Bug: chromium:1008840
Change-Id: Ib4ab7844b4a10339b4aefd9add4637890e1ce09e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2102653Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750442}
parent 755c0b67
...@@ -88,7 +88,7 @@ TextEncoderEncodeIntoResult* TextEncoder::encodeInto( ...@@ -88,7 +88,7 @@ TextEncoderEncodeIntoResult* TextEncoder::encodeInto(
TextEncoderEncodeIntoResult::Create(); TextEncoderEncodeIntoResult::Create();
TextCodec::EncodeIntoResult encode_into_result_data; TextCodec::EncodeIntoResult encode_into_result_data;
unsigned char* destination_buffer = destination.View()->View()->Data(); unsigned char* destination_buffer = destination.View()->Data();
if (source.Is8Bit()) { if (source.Is8Bit()) {
encode_into_result_data = codec_->EncodeInto( encode_into_result_data = codec_->EncodeInto(
source.Characters8(), source.length(), destination_buffer, source.Characters8(), source.length(), destination_buffer,
......
...@@ -142,7 +142,7 @@ DOMFloat32Array* XRRay::matrix() { ...@@ -142,7 +142,7 @@ DOMFloat32Array* XRRay::matrix() {
// steps: // steps:
// Step 1. If the operation IsDetachedBuffer on internal matrix is false, // Step 1. If the operation IsDetachedBuffer on internal matrix is false,
// return transform’s internal matrix. // return transform’s internal matrix.
if (!matrix_ || !matrix_->View() || !matrix_->View()->Data()) { if (!matrix_ || !matrix_->Data()) {
// Returned matrix should represent transformation from ray originating at // Returned matrix should represent transformation from ray originating at
// (0,0,0) with direction (0,0,-1) into ray originating at |origin_| with // (0,0,0) with direction (0,0,-1) into ray originating at |origin_| with
// direction |direction_|. // direction |direction_|.
......
...@@ -92,8 +92,7 @@ DOMFloat32Array* XRRigidTransform::matrix() { ...@@ -92,8 +92,7 @@ DOMFloat32Array* XRRigidTransform::matrix() {
matrix_array_ = transformationMatrixToDOMFloat32Array(*matrix_); matrix_array_ = transformationMatrixToDOMFloat32Array(*matrix_);
} }
if (!matrix_array_ || !matrix_array_->View() || if (!matrix_array_ || !matrix_array_->Data()) {
!matrix_array_->View()->Data()) {
// A page may take the matrix_array_ value and detach it so matrix_array_ is // A page may take the matrix_array_ value and detach it so matrix_array_ is
// a detached array buffer. This breaks the inspector, so return null // a detached array buffer. This breaks the inspector, so return null
// instead. // instead.
......
...@@ -34,8 +34,7 @@ XRSession* XRView::session() const { ...@@ -34,8 +34,7 @@ XRSession* XRView::session() const {
} }
DOMFloat32Array* XRView::projectionMatrix() const { DOMFloat32Array* XRView::projectionMatrix() const {
if (!projection_matrix_ || !projection_matrix_->View() || if (!projection_matrix_ || !projection_matrix_->Data()) {
!projection_matrix_->View()->Data()) {
// A page may take the projection matrix value and detach it so // A page may take the projection matrix value and detach it so
// projection_matrix_ is a detached array buffer. This breaks the // projection_matrix_ is a detached array buffer. This breaks the
// inspector, so return null instead. // inspector, so return null instead.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment