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

Unified Diff: sky/engine/core/painting/PaintingContext.h

Issue 1122423009: Make it possible to custom-paint without an Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Comment tweak Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/core/painting/PaintingContext.h
diff --git a/sky/engine/core/painting/PaintingContext.h b/sky/engine/core/painting/PaintingContext.h
index 2c082522213f507a79707e6c1bb73e0b4388426c..8d51be47c88df0c31fe24b0e92d4f17831a8a69e 100644
--- a/sky/engine/core/painting/PaintingContext.h
+++ b/sky/engine/core/painting/PaintingContext.h
@@ -5,34 +5,23 @@
#ifndef SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_
#define SKY_ENGINE_CORE_PAINTING_PAINTINGCONTEXT_H_
-#include "sky/engine/core/painting/Paint.h"
-#include "sky/engine/platform/graphics/DisplayList.h"
-#include "sky/engine/tonic/dart_wrappable.h"
-#include "sky/engine/wtf/PassRefPtr.h"
-#include "sky/engine/wtf/RefCounted.h"
+#include "sky/engine/core/painting/Canvas.h"
namespace blink {
class Element;
-class PaintingContext : public RefCounted<PaintingContext>, public DartWrappable {
+class PaintingContext : public Canvas {
DEFINE_WRAPPERTYPEINFO();
public:
~PaintingContext() override;
static PassRefPtr<PaintingContext> create(PassRefPtr<Element> element, const FloatSize& size);
- double height() const { return m_size.height(); }
- double width() const { return m_size.width(); }
-
- void drawCircle(double x, double y, double radius, Paint* paint);
void commit();
private:
PaintingContext(PassRefPtr<Element> element, const FloatSize& size);
RefPtr<Element> m_element;
- FloatSize m_size;
- RefPtr<DisplayList> m_displayList;
- SkCanvas* m_canvas;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698