Chinmay Garde 9eb446e0d5 Move shell to //flutter and split shell/BUILD.gn into smaller pieces for each subcomponent. (#3053)
* Namespaces have been updated to reflect the move from //flutter/sky/shell to //flutter/shell.
* shell/BUILD.gn file has been split into smaller GN files for each subcomponent of the shell (common, GPU, diagnostic, testing).
* GN dependencies have been rewritten to stop exposing common shell dependencies as public. Duplicates have also been removed.
* GPU subcomponent has been updated make it more suitable for Vulkan integration.
* The GLFW backend has been resurrected.
2016-09-23 15:33:25 -07:00

48 lines
1.3 KiB
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 SHELL_COMMON_RASTERIZER_H_
#define SHELL_COMMON_RASTERIZER_H_
#include <memory>
#include "flutter/flow/layers/layer_tree.h"
#include "flutter/synchronization/pipeline.h"
#include "lib/ftl/functional/closure.h"
#include "lib/ftl/memory/weak_ptr.h"
#include "lib/ftl/synchronization/waitable_event.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace shell {
class PlatformView;
class Rasterizer {
public:
virtual ~Rasterizer();
virtual void Setup(PlatformView* platform_view,
ftl::Closure rasterizer_continuation,
ftl::AutoResetWaitableEvent* setup_completion_event) = 0;
virtual void Clear(SkColor color) = 0;
virtual void Teardown(
ftl::AutoResetWaitableEvent* teardown_completion_event) = 0;
virtual ftl::WeakPtr<Rasterizer> GetWeakRasterizerPtr() = 0;
virtual flow::LayerTree* GetLastLayerTree() = 0;
virtual void Draw(
ftl::RefPtr<flutter::Pipeline<flow::LayerTree>> pipeline) = 0;
// Implemented by each GPU backend.
static std::unique_ptr<Rasterizer> Create();
};
} // namespace shell
#endif // SHELL_COMMON_RASTERIZER_H_