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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h

Issue 2039983002: Change code path for structured cloning ImageBitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clean up code, should work Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ScriptValueSerializer_h 5 #ifndef ScriptValueSerializer_h
6 #define ScriptValueSerializer_h 6 #define ScriptValueSerializer_h
7 7
8 #include "bindings/core/v8/SerializationTag.h" 8 #include "bindings/core/v8/SerializationTag.h"
9 #include "bindings/core/v8/SerializedScriptValue.h" 9 #include "bindings/core/v8/SerializedScriptValue.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 void writeBlobIndex(int blobIndex); 136 void writeBlobIndex(int blobIndex);
137 void writeCompositorProxy(const CompositorProxy&); 137 void writeCompositorProxy(const CompositorProxy&);
138 void writeFile(const File&); 138 void writeFile(const File&);
139 void writeFileIndex(int blobIndex); 139 void writeFileIndex(int blobIndex);
140 void writeFileList(const FileList&); 140 void writeFileList(const FileList&);
141 void writeFileListIndex(const Vector<int>& blobIndices); 141 void writeFileListIndex(const Vector<int>& blobIndices);
142 void writeArrayBuffer(const DOMArrayBuffer&); 142 void writeArrayBuffer(const DOMArrayBuffer&);
143 void writeArrayBufferView(const DOMArrayBufferView&); 143 void writeArrayBufferView(const DOMArrayBufferView&);
144 void doWriteImageData(uint32_t width, uint32_t height, const uint8_t* pixelD ata, uint32_t pixelDataLength); 144 void doWriteImageData(uint32_t width, uint32_t height, const uint8_t* pixelD ata, uint32_t pixelDataLength);
145 void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelDat a, uint32_t pixelDataLength); 145 void writeImageData(uint32_t width, uint32_t height, const uint8_t* pixelDat a, uint32_t pixelDataLength);
146 void writeImageBitmap(uint32_t width, uint32_t height, uint32_t isOriginClea n, const uint8_t* pixelData, uint32_t pixelDataLength); 146 void writeImageBitmap(uint32_t width, uint32_t height, uint32_t isOriginClea n, uint32_t isPremultiplied, const uint8_t* pixelData, uint32_t pixelDataLength) ;
147 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags); 147 void writeRegExp(v8::Local<v8::String> pattern, v8::RegExp::Flags);
148 void writeTransferredMessagePort(uint32_t index); 148 void writeTransferredMessagePort(uint32_t index);
149 void writeTransferredArrayBuffer(uint32_t index); 149 void writeTransferredArrayBuffer(uint32_t index);
150 void writeTransferredImageBitmap(uint32_t index); 150 void writeTransferredImageBitmap(uint32_t index);
151 void writeTransferredOffscreenCanvas(uint32_t index, uint32_t width, uint32_ t height, uint32_t id); 151 void writeTransferredOffscreenCanvas(uint32_t index, uint32_t width, uint32_ t height, uint32_t id);
152 void writeTransferredSharedArrayBuffer(uint32_t index); 152 void writeTransferredSharedArrayBuffer(uint32_t index);
153 void writeObjectReference(uint32_t reference); 153 void writeObjectReference(uint32_t reference);
154 void writeObject(uint32_t numProperties); 154 void writeObject(uint32_t numProperties);
155 void writeSparseArray(uint32_t numProperties, uint32_t length); 155 void writeSparseArray(uint32_t numProperties, uint32_t length);
156 void writeDenseArray(uint32_t numProperties, uint32_t length); 156 void writeDenseArray(uint32_t numProperties, uint32_t length);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 private: 511 private:
512 void undoReadTag(); 512 void undoReadTag();
513 bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*); 513 bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*);
514 bool readString(v8::Local<v8::Value>*); 514 bool readString(v8::Local<v8::Value>*);
515 bool readUCharString(v8::Local<v8::Value>*); 515 bool readUCharString(v8::Local<v8::Value>*);
516 bool readStringObject(v8::Local<v8::Value>*); 516 bool readStringObject(v8::Local<v8::Value>*);
517 bool readInt32(v8::Local<v8::Value>*); 517 bool readInt32(v8::Local<v8::Value>*);
518 bool readDate(v8::Local<v8::Value>*); 518 bool readDate(v8::Local<v8::Value>*);
519 bool readNumber(v8::Local<v8::Value>*); 519 bool readNumber(v8::Local<v8::Value>*);
520 bool readNumberObject(v8::Local<v8::Value>*); 520 bool readNumberObject(v8::Local<v8::Value>*);
521 ImageData* doReadImageData(); 521 bool doReadImageDataProperties(uint32_t*, uint32_t*, uint32_t*);
522 bool readImageData(v8::Local<v8::Value>*); 522 bool readImageData(v8::Local<v8::Value>*);
523 bool readImageBitmap(v8::Local<v8::Value>*); 523 bool readImageBitmap(v8::Local<v8::Value>*);
524 bool readCompositorProxy(v8::Local<v8::Value>*); 524 bool readCompositorProxy(v8::Local<v8::Value>*);
525 DOMArrayBuffer* doReadArrayBuffer(); 525 DOMArrayBuffer* doReadArrayBuffer();
526 bool readArrayBuffer(v8::Local<v8::Value>*); 526 bool readArrayBuffer(v8::Local<v8::Value>*);
527 bool readArrayBufferView(v8::Local<v8::Value>*, ScriptValueDeserializer&); 527 bool readArrayBufferView(v8::Local<v8::Value>*, ScriptValueDeserializer&);
528 bool readRegExp(v8::Local<v8::Value>*); 528 bool readRegExp(v8::Local<v8::Value>*);
529 bool readBlob(v8::Local<v8::Value>*, bool isIndexed); 529 bool readBlob(v8::Local<v8::Value>*, bool isIndexed);
530 bool readFile(v8::Local<v8::Value>*, bool isIndexed); 530 bool readFile(v8::Local<v8::Value>*, bool isIndexed);
531 bool readFileList(v8::Local<v8::Value>*, bool isIndexed); 531 bool readFileList(v8::Local<v8::Value>*, bool isIndexed);
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 ArrayBufferContentsArray* m_arrayBufferContents; 625 ArrayBufferContentsArray* m_arrayBufferContents;
626 ImageBitmapContentsArray* m_imageBitmapContents; 626 ImageBitmapContentsArray* m_imageBitmapContents;
627 Vector<v8::Local<v8::Value>> m_arrayBuffers; 627 Vector<v8::Local<v8::Value>> m_arrayBuffers;
628 Vector<v8::Local<v8::Value>> m_imageBitmaps; 628 Vector<v8::Local<v8::Value>> m_imageBitmaps;
629 uint32_t m_version; 629 uint32_t m_version;
630 }; 630 };
631 631
632 } // namespace blink 632 } // namespace blink
633 633
634 #endif // ScriptValueSerializer_h 634 #endif // ScriptValueSerializer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698