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

Side by Side Diff: sky/engine/core/painting/Float32List.h

Issue 1155193004: Canvas.concat takes a 16-element Float32List instead of an array. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: . Created 5 years, 6 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SKY_ENGINE_CORE_PAINTING_FLOAT32LIST_H_
6 #define SKY_ENGINE_CORE_PAINTING_FLOAT32LIST_H_
7
8 #include "dart/runtime/include/dart_api.h"
9 #include "sky/engine/tonic/dart_converter.h"
10
11 namespace blink {
12
13 // A simple wrapper around a Dart Float32List. It uses Dart_TypedDataAcquireData
14 // to obtain a raw pointer to the data, which is released when this object is
15 // destroyed.
16 //
17 // This is designed to be used with DartConverter only.
18 class Float32List {
abarth-chromium 2015/06/04 16:58:16 This class should be in //sky/engine/tonic. It's
Matt Perry 2015/06/04 17:22:44 Done.
19 public:
20 float* data;
21 intptr_t num_elements;
22
23 ~Float32List();
abarth-chromium 2015/06/04 16:58:16 We should have a Float32List constructor that init
Matt Perry 2015/06/04 17:22:44 Done.
24
25 void Init(Dart_Handle list);
26
27 private:
28 Dart_Handle dart_handle_;
29 };
30
31 template <>
32 struct DartConverter<Float32List> {
33 static Float32List FromArgumentsWithNullCheck(Dart_NativeArguments args,
34 int index,
35 Dart_Handle& exception);
36 };
37
38 } // namespace blink
39
40 #endif // SKY_ENGINE_CORE_PAINTING_FLOAT32LIST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698