mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
This CL adds a global view object that can receive a Picture and be signaled to draw. When using SkyView, this Picture shows up on screen. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1134913003
30 lines
609 B
C++
30 lines
609 B
C++
// 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/config.h"
|
|
#include "sky/engine/core/view/View.h"
|
|
|
|
namespace blink {
|
|
|
|
PassRefPtr<View> View::create(const base::Closure& schedulePaintCallback)
|
|
{
|
|
return adoptRef(new View(schedulePaintCallback));
|
|
}
|
|
|
|
View::View(const base::Closure& schedulePaintCallback)
|
|
: m_schedulePaintCallback(schedulePaintCallback)
|
|
{
|
|
}
|
|
|
|
View::~View()
|
|
{
|
|
}
|
|
|
|
void View::schedulePaint()
|
|
{
|
|
m_schedulePaintCallback.Run();
|
|
}
|
|
|
|
} // namespace blink
|