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

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

Issue 1922393002: CC Animation: Unify ElementId in Blink Compositor Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@player
Patch Set: Remove NextElementId. Created 4 years, 7 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 uint8_t b = (value & SerializedScriptValue::varIntMask); 173 uint8_t b = (value & SerializedScriptValue::varIntMask);
174 value >>= SerializedScriptValue::varIntShift; 174 value >>= SerializedScriptValue::varIntShift;
175 if (!value) { 175 if (!value) {
176 append(b); 176 append(b);
177 break; 177 break;
178 } 178 }
179 append(b | (1 << SerializedScriptValue::varIntShift)); 179 append(b | (1 << SerializedScriptValue::varIntShift));
180 } 180 }
181 } 181 }
182 182
183 void doWriteInt32(int32_t value);
183 void doWriteUint32(uint32_t value); 184 void doWriteUint32(uint32_t value);
184 void doWriteUint64(uint64_t value); 185 void doWriteUint64(uint64_t value);
185 void doWriteNumber(double number); 186 void doWriteNumber(double number);
186 void append(SerializationTag); 187 void append(SerializationTag);
187 void append(uint8_t b); 188 void append(uint8_t b);
188 void append(const uint8_t* data, int length); 189 void append(const uint8_t* data, int length);
189 void ensureSpace(unsigned extra); 190 void ensureSpace(unsigned extra);
190 void fillHole(); 191 void fillHole();
191 uint8_t* byteAt(int position); 192 uint8_t* byteAt(int position);
192 int v8StringWriteOptions(); 193 int v8StringWriteOptions();
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 bool readVersion(uint32_t& version); 524 bool readVersion(uint32_t& version);
524 void setVersion(uint32_t); 525 void setVersion(uint32_t);
525 526
526 protected: 527 protected:
527 bool readWithTag(SerializationTag, v8::Local<v8::Value>*, ScriptValueComposi teCreator&); 528 bool readWithTag(SerializationTag, v8::Local<v8::Value>*, ScriptValueComposi teCreator&);
528 529
529 bool readTag(SerializationTag*); 530 bool readTag(SerializationTag*);
530 bool readWebCoreString(String*); 531 bool readWebCoreString(String*);
531 bool readUint32(v8::Local<v8::Value>*); 532 bool readUint32(v8::Local<v8::Value>*);
532 533
534 bool doReadInt32(int32_t* value);
533 bool doReadUint32(uint32_t* value); 535 bool doReadUint32(uint32_t* value);
534 536
535 private: 537 private:
536 void undoReadTag(); 538 void undoReadTag();
537 bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*); 539 bool readArrayBufferViewSubTag(ArrayBufferViewSubTag*);
538 bool readString(v8::Local<v8::Value>*); 540 bool readString(v8::Local<v8::Value>*);
539 bool readUCharString(v8::Local<v8::Value>*); 541 bool readUCharString(v8::Local<v8::Value>*);
540 bool readStringObject(v8::Local<v8::Value>*); 542 bool readStringObject(v8::Local<v8::Value>*);
541 bool readInt32(v8::Local<v8::Value>*); 543 bool readInt32(v8::Local<v8::Value>*);
542 bool readDate(v8::Local<v8::Value>*); 544 bool readDate(v8::Local<v8::Value>*);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 ArrayBufferContentsArray* m_arrayBufferContents; 651 ArrayBufferContentsArray* m_arrayBufferContents;
650 ImageBitmapContentsArray* m_imageBitmapContents; 652 ImageBitmapContentsArray* m_imageBitmapContents;
651 Vector<v8::Local<v8::Value>> m_arrayBuffers; 653 Vector<v8::Local<v8::Value>> m_arrayBuffers;
652 Vector<v8::Local<v8::Value>> m_imageBitmaps; 654 Vector<v8::Local<v8::Value>> m_imageBitmaps;
653 uint32_t m_version; 655 uint32_t m_version;
654 }; 656 };
655 657
656 } // namespace blink 658 } // namespace blink
657 659
658 #endif // ScriptValueSerializer_h 660 #endif // ScriptValueSerializer_h
OLDNEW
« no previous file with comments | « cc/trees/mutator_host_client.h ('k') | third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698