Dan Field 4a88d5e109
Revert hint_freed (#20746)
This caused over-aggressive GCs, which vastly increased CPU usage benchmarks.

* Revert "fix build (#20644)"

This reverts commit b59793ee20be29463fac7a79635bf20253f04107.

* Revert "Hint freed (#19842)"

This reverts commit 3930ac1b25820baee3c67d921a0b009606cb3dae.
2020-08-25 11:55:40 -07:00

51 lines
1.6 KiB
C++

// Copyright 2013 The Flutter 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 FLUTTER_SHELL_PLATFORM_FUCHSIA_COMPOSITOR_CONTEXT_H_
#define FLUTTER_SHELL_PLATFORM_FUCHSIA_COMPOSITOR_CONTEXT_H_
#include <memory>
#include "flutter/flow/compositor_context.h"
#include "flutter/flow/embedded_views.h"
#include "flutter/flow/scene_update_context.h"
#include "flutter/fml/macros.h"
#include "session_connection.h"
#include "vulkan_surface_producer.h"
namespace flutter_runner {
// Holds composition specific state and bindings specific to composition on
// Fuchsia.
class CompositorContext final : public flutter::CompositorContext {
public:
CompositorContext(SessionConnection& session_connection,
VulkanSurfaceProducer& surface_producer,
flutter::SceneUpdateContext& scene_update_context);
~CompositorContext() override;
private:
SessionConnection& session_connection_;
VulkanSurfaceProducer& surface_producer_;
flutter::SceneUpdateContext& scene_update_context_;
// |flutter::CompositorContext|
std::unique_ptr<ScopedFrame> AcquireFrame(
GrDirectContext* gr_context,
SkCanvas* canvas,
flutter::ExternalViewEmbedder* view_embedder,
const SkMatrix& root_surface_transformation,
bool instrumentation_enabled,
bool surface_supports_readback,
fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger) override;
FML_DISALLOW_COPY_AND_ASSIGN(CompositorContext);
};
} // namespace flutter_runner
#endif // FLUTTER_SHELL_PLATFORM_FUCHSIA_COMPOSITOR_CONTEXT_H_