Merge pull request #590 from collinjackson/rollback

Roll back drawText Canvas support; we are instead going to refactor RenderParagraph into ParagraphPainter
This commit is contained in:
Collin Jackson 2015-08-13 17:05:55 -07:00
commit 28813a9b7d
9 changed files with 0 additions and 75 deletions

View File

@ -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",

View File

@ -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<RSTransform>& transforms, const Vector<Rect>& rects,
const Vector<SkColor>& colors, SkXfermode::Mode mode,

View File

@ -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<RSTransform>& transforms, const Vector<Rect>& rects,

View File

@ -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,

View File

@ -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<Paint>::FromDart(Dart_Handle dart_paint) {
paint.setStyle(DartConverter<PaintingStyle>::FromDart(values[kStyle]));
if (!Dart_IsNull(values[kTransferMode]))
paint.setXfermodeMode(DartConverter<TransferMode>::FromDart(values[kTransferMode]));
if (!Dart_IsNull(values[kTypeface]))
paint.setTypeface(DartConverter<Typeface*>::FromDart(values[kTypeface])->typeface());
result.is_null = false;
return result;

View File

@ -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;
}

View File

@ -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<SkTypeface> typeface)
: typeface_(typeface) {
}
Typeface::~Typeface()
{
}
} // namespace blink

View File

@ -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<Typeface>, public DartWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
~Typeface() override;
SkTypeface* typeface() { return typeface_.get(); }
void set_typeface(PassRefPtr<SkTypeface> typeface) { typeface_ = typeface; }
protected:
Typeface(PassRefPtr<SkTypeface> typeface);
private:
RefPtr<SkTypeface> typeface_;
};
} // namespace blink
#endif // SKY_ENGINE_CORE_PAINTING_TYPEFACE_H_

View File

@ -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 {
};