| 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 334e690aaee64c410b2e6969713078e3418ba24d..f468fb949b131566c36f926a2536b427666d9753 100644
|
| --- a/services/gfx/compositor/render/render_frame.h
|
| +++ b/services/gfx/compositor/render/render_frame.h
|
| @@ -22,28 +22,43 @@ namespace compositor {
|
| // They have no direct references to the scene graph.
|
| class RenderFrame : public base::RefCountedThreadSafe<RenderFrame> {
|
| public:
|
| + // Contains metadata about a particular |RenderFrame| used for tracing
|
| + // and statistics.
|
| + class Metadata {
|
| + public:
|
| + Metadata(const mojo::gfx::composition::FrameInfo& frame_info,
|
| + int64_t composition_time);
|
| + ~Metadata();
|
| +
|
| + const mojo::gfx::composition::FrameInfo& frame_info() const {
|
| + return frame_info_;
|
| + }
|
| + int64_t composition_time() const { return composition_time_; }
|
| +
|
| + private:
|
| + mojo::gfx::composition::FrameInfo frame_info_;
|
| + int64_t composition_time_;
|
| + };
|
| +
|
| // Creates an empty render frame with no content.
|
| - RenderFrame(const SkIRect& viewport,
|
| - const mojo::gfx::composition::FrameInfo& frame_info);
|
| + RenderFrame(const Metadata& metadata, const SkIRect& viewport);
|
|
|
| // Creates render frame backed by a picture.
|
| - RenderFrame(const SkIRect& viewport,
|
| - const mojo::gfx::composition::FrameInfo& frame_info,
|
| + RenderFrame(const Metadata& metadata,
|
| + const SkIRect& viewport,
|
| const skia::RefPtr<SkPicture>& picture);
|
|
|
| + // Gets metadata about the frame.
|
| + const Metadata& metadata() const { return metadata_; }
|
| +
|
| // Gets the frame's viewport in pixels.
|
| const SkIRect& viewport() const { return viewport_; }
|
|
|
| - // Gets information about the frame to be rendered.
|
| - const mojo::gfx::composition::FrameInfo& frame_info() const {
|
| - return frame_info_;
|
| - }
|
| -
|
| // Gets the underlying picture to rasterize, or null if the frame is empty.
|
| const skia::RefPtr<SkPicture>& picture() const { return picture_; }
|
|
|
| - // Paints the frame to a canvas.
|
| - void Paint(SkCanvas* canvas) const;
|
| + // Draws the contents of the frame to a canvas.
|
| + void Draw(SkCanvas* canvas) const;
|
|
|
| private:
|
| friend class base::RefCountedThreadSafe<RenderFrame>;
|
| @@ -51,8 +66,8 @@ class RenderFrame : public base::RefCountedThreadSafe<RenderFrame> {
|
|
|
| ~RenderFrame();
|
|
|
| + Metadata metadata_;
|
| SkIRect viewport_;
|
| - mojo::gfx::composition::FrameInfo frame_info_;
|
| skia::RefPtr<SkPicture> picture_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RenderFrame);
|
|
|