| Index: services/gfx/compositor/render/render_frame.h
|
| diff --git a/services/gfx/compositor/render/render_frame.h b/services/gfx/compositor/render/render_frame.h
|
| index 21cdb77834c50c4ad828e5487bc61d0a818f295a..f9cf8386f5425046eb651c9b9bf43b50b05ce48b 100644
|
| --- a/services/gfx/compositor/render/render_frame.h
|
| +++ b/services/gfx/compositor/render/render_frame.h
|
| @@ -8,40 +8,35 @@
|
| #include <memory>
|
|
|
| #include "base/macros.h"
|
| -#include "mojo/services/gfx/composition/interfaces/hit_tests.mojom.h"
|
| #include "mojo/services/gfx/composition/interfaces/scheduling.mojom.h"
|
| +#include "skia/ext/refptr.h"
|
| #include "third_party/skia/include/core/SkRect.h"
|
|
|
| class SkCanvas;
|
| -struct SkPoint;
|
| +class SkPicture;
|
|
|
| namespace compositor {
|
|
|
| -class RenderLayer;
|
| -
|
| -// Describes a sequence of drawing commands to be evaluated as a single pass.
|
| -// Frames are introduced into the render frame at points where blending must
|
| -// occur or where portions of a scene graph may be drawn once into a temporary
|
| -// buffer and used many times.
|
| +// Describes a frame to be rendered.
|
| //
|
| // Render objects are thread-safe, immutable, and reference counted via
|
| // std::shared_ptr. They have no direct references to the scene graph.
|
| class RenderFrame {
|
| public:
|
| - RenderFrame(const std::shared_ptr<RenderLayer>& root_layer,
|
| + RenderFrame(const skia::RefPtr<SkPicture>& picture,
|
| const SkRect& viewport,
|
| const mojo::gfx::composition::FrameInfo& frame_info);
|
| ~RenderFrame();
|
|
|
| static std::shared_ptr<RenderFrame> Create(
|
| - const std::shared_ptr<RenderLayer>& root_layer,
|
| + const skia::RefPtr<SkPicture>& picture,
|
| const SkRect& viewport,
|
| const mojo::gfx::composition::FrameInfo& frame_info) {
|
| - return std::make_shared<RenderFrame>(root_layer, viewport, frame_info);
|
| + return std::make_shared<RenderFrame>(picture, viewport, frame_info);
|
| }
|
|
|
| - // Gets the root layer of the frame.
|
| - const std::shared_ptr<RenderLayer>& root_layer() const { return root_layer_; }
|
| + // Gets the underlying picture to rasterize.
|
| + const skia::RefPtr<SkPicture>& picture() const { return picture_; }
|
|
|
| // Gets the frame's viewport.
|
| const SkRect& viewport() const { return viewport_; }
|
| @@ -54,13 +49,10 @@ class RenderFrame {
|
| // Paints the frame to a canvas.
|
| void Paint(SkCanvas* canvas) const;
|
|
|
| - // Performs a hit test on the content of the frame.
|
| - mojo::gfx::composition::HitTestResultPtr HitTest(const SkPoint& point) const;
|
| -
|
| private:
|
| friend class RenderFrameBuilder;
|
|
|
| - std::shared_ptr<RenderLayer> root_layer_;
|
| + skia::RefPtr<SkPicture> picture_;
|
| SkRect viewport_;
|
| mojo::gfx::composition::FrameInfo frame_info_;
|
|
|
|
|