diff --git a/sky/engine/core/core.gni b/sky/engine/core/core.gni index c186761ee1f..94821df344e 100644 --- a/sky/engine/core/core.gni +++ b/sky/engine/core/core.gni @@ -464,8 +464,6 @@ sky_core_files = [ "painting/Size.cpp", "painting/Size.h", "painting/TransferMode.h", - "painting/Typeface.cpp", - "painting/Typeface.h", "rendering/BidiRun.h", "rendering/BidiRunForLine.cpp", "rendering/BidiRunForLine.h", @@ -684,7 +682,6 @@ core_idl_files = get_path_info([ "painting/PictureRecorder.idl", "painting/RRect.idl", "painting/Shader.idl", - "painting/Typeface.idl", "view/EventCallback.idl", "view/FrameCallback.idl", "view/View.idl", diff --git a/sky/engine/core/painting/Canvas.cpp b/sky/engine/core/painting/Canvas.cpp index fbd34bd372f..b0c81a7ec5a 100644 --- a/sky/engine/core/painting/Canvas.cpp +++ b/sky/engine/core/painting/Canvas.cpp @@ -264,14 +264,6 @@ void Canvas::drawPaintingNode(PaintingNode* paintingNode, const Point& p) translate(-p.sk_point.x(), -p.sk_point.y()); } -void Canvas::drawText(const String& text, const Point& p, const Paint& paint) -{ - if (!m_canvas) - return; - ASSERT(text); - m_canvas->drawText(text.utf8().data(), text.length(), p.sk_point.x(), p.sk_point.y(), paint.sk_paint); -} - void Canvas::drawAtlas(CanvasImage* atlas, const Vector& transforms, const Vector& rects, const Vector& colors, SkXfermode::Mode mode, diff --git a/sky/engine/core/painting/Canvas.h b/sky/engine/core/painting/Canvas.h index e126e441478..e2ed9f2bc2e 100644 --- a/sky/engine/core/painting/Canvas.h +++ b/sky/engine/core/painting/Canvas.h @@ -91,7 +91,6 @@ public: void drawPicture(Picture* picture); void drawDrawable(Drawable* drawable); void drawPaintingNode(PaintingNode* paintingNode, const Point& p); - void drawText(const String& text, const Point& p, const Paint& paint); void drawAtlas(CanvasImage* atlas, const Vector& transforms, const Vector& rects, diff --git a/sky/engine/core/painting/Canvas.idl b/sky/engine/core/painting/Canvas.idl index c2c96eb4d9f..fef62130ec6 100644 --- a/sky/engine/core/painting/Canvas.idl +++ b/sky/engine/core/painting/Canvas.idl @@ -39,7 +39,6 @@ void drawPicture(Picture picture); void drawDrawable(Drawable drawable); void drawPaintingNode(PaintingNode paintingNode, Point p); - void drawText(DOMString text, Point p, Paint paint); // TODO(eseidel): Paint should be optional, but optional doesn't work. [RaisesException] void drawAtlas(Image image, diff --git a/sky/engine/core/painting/Paint.cpp b/sky/engine/core/painting/Paint.cpp index 8fbdf89cdae..a882a2a8769 100644 --- a/sky/engine/core/painting/Paint.cpp +++ b/sky/engine/core/painting/Paint.cpp @@ -12,7 +12,6 @@ #include "sky/engine/core/painting/PaintingStyle.h" #include "sky/engine/core/painting/Shader.h" #include "sky/engine/core/painting/TransferMode.h" -#include "sky/engine/core/painting/Typeface.h" #include "sky/engine/core/script/dom_dart_state.h" #include "sky/engine/wtf/text/StringBuilder.h" #include "third_party/skia/include/core/SkColorFilter.h" @@ -36,7 +35,6 @@ enum PaintFields { kShader, kStyle, kTransferMode, - kTypeface, // kNumberOfPaintFields must be last. kNumberOfPaintFields, @@ -84,8 +82,6 @@ Paint DartConverter::FromDart(Dart_Handle dart_paint) { paint.setStyle(DartConverter::FromDart(values[kStyle])); if (!Dart_IsNull(values[kTransferMode])) paint.setXfermodeMode(DartConverter::FromDart(values[kTransferMode])); - if (!Dart_IsNull(values[kTypeface])) - paint.setTypeface(DartConverter::FromDart(values[kTypeface])->typeface()); result.is_null = false; return result; diff --git a/sky/engine/core/painting/Paint.dart b/sky/engine/core/painting/Paint.dart index 6e4ef5f8253..9f0cbdae577 100644 --- a/sky/engine/core/painting/Paint.dart +++ b/sky/engine/core/painting/Paint.dart @@ -58,7 +58,6 @@ class Paint { _shader, _style, _transferMode, - typeface ]; } @@ -73,8 +72,6 @@ class Paint { // TODO(mpcomplete): Figure out how to show a drawLooper. if (_drawLooper != null) result += ', drawLooper:true'; - if (typeface != null) - result += ', typeface: $_typeface'; result += ')'; return result; } diff --git a/sky/engine/core/painting/Typeface.cpp b/sky/engine/core/painting/Typeface.cpp deleted file mode 100644 index 21aa933f05f..00000000000 --- a/sky/engine/core/painting/Typeface.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "sky/engine/core/painting/Typeface.h" - -namespace blink { - -Typeface::Typeface(PassRefPtr typeface) - : typeface_(typeface) { -} - -Typeface::~Typeface() -{ -} - -} // namespace blink diff --git a/sky/engine/core/painting/Typeface.h b/sky/engine/core/painting/Typeface.h deleted file mode 100644 index e7707f022df..00000000000 --- a/sky/engine/core/painting/Typeface.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef SKY_ENGINE_CORE_PAINTING_TYPEFACE_H_ -#define SKY_ENGINE_CORE_PAINTING_TYPEFACE_H_ - -#include "sky/engine/tonic/dart_wrappable.h" -#include "sky/engine/wtf/PassRefPtr.h" -#include "sky/engine/wtf/RefCounted.h" -#include "third_party/skia/include/core/SkTypeface.h" - -namespace blink { - -class Typeface : public RefCounted, public DartWrappable { - DEFINE_WRAPPERTYPEINFO(); - public: - ~Typeface() override; - - SkTypeface* typeface() { return typeface_.get(); } - void set_typeface(PassRefPtr typeface) { typeface_ = typeface; } - - protected: - Typeface(PassRefPtr typeface); - - private: - RefPtr typeface_; -}; - -} // namespace blink - -#endif // SKY_ENGINE_CORE_PAINTING_TYPEFACE_H_ diff --git a/sky/engine/core/painting/Typeface.idl b/sky/engine/core/painting/Typeface.idl deleted file mode 100644 index 427a3f7c70f..00000000000 --- a/sky/engine/core/painting/Typeface.idl +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -interface Typeface { -};