| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 SKY_ENGINE_CORE_PAINTING_RECT_H_ | 5 #ifndef SKY_ENGINE_CORE_PAINTING_RECT_H_ |
| 6 #define SKY_ENGINE_CORE_PAINTING_RECT_H_ | 6 #define SKY_ENGINE_CORE_PAINTING_RECT_H_ |
| 7 | 7 |
| 8 #include "dart/runtime/include/dart_api.h" | 8 #include "dart/runtime/include/dart_api.h" |
| 9 #include "sky/engine/tonic/dart_converter.h" | 9 #include "sky/engine/tonic/dart_converter.h" |
| 10 #include "third_party/skia/include/core/SkRect.h" | 10 #include "third_party/skia/include/core/SkRect.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 // Very simple wrapper for SkRect to add a null state. | 13 // Very simple wrapper for SkRect to add a null state. |
| 14 class Rect { | 14 class Rect { |
| 15 public: | 15 public: |
| 16 SkRect sk_rect; | 16 SkRect skRect; |
| 17 bool is_null; | 17 bool isNull; |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 template<> | 20 template<> |
| 21 struct DartConverter<Rect, void> { | 21 struct DartConverter<Rect, void> { |
| 22 static Rect FromArgumentsWithNullCheck(Dart_NativeArguments args, | 22 static Rect FromArgumentsWithNullCheck(Dart_NativeArguments args, |
| 23 int index, | 23 int index, |
| 24 Dart_Handle& exception); | 24 Dart_Handle& exception); |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 } // namespace blink | 27 } // namespace blink |
| 28 | 28 |
| 29 #endif // SKY_ENGINE_CORE_PAINTING_RECT_H_ | 29 #endif // SKY_ENGINE_CORE_PAINTING_RECT_H_ |
| OLD | NEW |