1 // Copyright 2013 The Flutter 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 #include "flutter/lib/ui/painting/paint.h" 6 7 #include "flutter/fml/logging.h" 8 #include "flutter/lib/ui/painting/color_filter.h" 9 #include "flutter/lib/ui/painting/image_filter.h" 10 #include "flutter/lib/ui/painting/shader.h" 11 #include "third_party/skia/include/core/SkColorFilter.h" 12 #include "third_party/skia/include/core/SkImageFilter.h" 13 #include "third_party/skia/include/core/SkMaskFilter.h" 14 #include "third_party/skia/include/core/SkShader.h" 15 #include "third_party/skia/include/core/SkString.h" 16 17 namespace flutter { 18 19 // Must be kept in sync with the default in painting.dart. 20 constexpr uint32_t kColorDefault = 0xFF000000; 21 22 // Must be kept in sync with the MaskFilter private constants in painting.dart. 23 enum MaskFilterType { Null, Blur }; 24 Paint(uint32_t encoded_color)25Paint::Paint(uint32_t encoded_color) { 26 if (encoded_color) { 27 SkColor color = encoded_color ^ kColorDefault; 28 paint_.setColor(color); 29 } 30 } 31 Paint(Dart_Handle paint_objects,Dart_Handle paint_data)32Paint::Paint(Dart_Handle paint_objects, Dart_Handle paint_data) { 33 } 34 35 } // namespace flutter 36 37