experimental/editor: minor change
Change-Id: Ifd3963e6bb337832c287f2b0553315828a5d3889 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/216350 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
parent
53146121b8
commit
308adbb418
@ -321,6 +321,9 @@ static inline SkRect offset(SkRect r, SkIPoint p) {
|
||||
|
||||
void Editor::paint(SkCanvas* c, PaintOpts options) {
|
||||
this->reshapeAll();
|
||||
if (!c) {
|
||||
return;
|
||||
}
|
||||
|
||||
c->drawPaint(SkPaint(options.fBackgroundColor));
|
||||
|
||||
|
@ -110,7 +110,6 @@ struct EditorLayer : public sk_app::Window::Layer {
|
||||
fHeight = height;
|
||||
if (width != fWidth) {
|
||||
fWidth = width;
|
||||
Timer timer("shaping");
|
||||
fEditor.setWidth(fWidth);
|
||||
}
|
||||
this->inval();
|
||||
@ -235,6 +234,8 @@ struct EditorApplication : public sk_app::Application {
|
||||
fWindow->pushLayer(&fLayer);
|
||||
fWindow->show();
|
||||
fLayer.onResize(fWindow->width(), fWindow->height());
|
||||
Timer timer("shaping");
|
||||
fLayer.fEditor.paint(nullptr, editor::Editor::PaintOpts());
|
||||
}
|
||||
~EditorApplication() override { fWindow->detach(); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user