flutter_flutter/sky/shell/gpu_delegate.h
Adam Barth e5d7e69346 Pass the sky::LayerTree to the GPU thread for drawing
Instead of squashing the layers down into a single SkPicture, we now pass the
tree to the GPU thread, which draws everything separately.
2015-09-03 19:20:32 -07:00

34 lines
795 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.
#ifndef SKY_SHELL_GPU_DELEGATE_H_
#define SKY_SHELL_GPU_DELEGATE_H_
#include <memory>
#include "base/memory/scoped_ptr.h"
#include "sky/compositor/layer_tree.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_widget_types.h"
class SkPicture;
namespace sky {
namespace shell {
class GPUDelegate {
public:
virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) = 0;
virtual void OnOutputSurfaceDestroyed() = 0;
virtual void Draw(scoped_ptr<LayerTree> layer_tree) = 0;
protected:
virtual ~GPUDelegate();
};
} // namespace shell
} // namespace sky
#endif // SKY_SHELL_GPU_DELEGATE_H_