Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: content/browser/android/synchronous_compositor_host.h

Issue 2347563003: Added FrameFuture class (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/android/synchronous_compositor_host.h
diff --git a/content/browser/android/synchronous_compositor_host.h b/content/browser/android/synchronous_compositor_host.h
index 9cd39a5f654645b828f72c1dfd2687f5a04f8e6d..46af0c90f269e0a357fc7fc57e9ba1dc1e8c8a63 100644
--- a/content/browser/android/synchronous_compositor_host.h
+++ b/content/browser/android/synchronous_compositor_host.h
@@ -11,6 +11,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
#include "cc/output/compositor_frame.h"
@@ -54,11 +55,11 @@ class SynchronousCompositorHost : public SynchronousCompositor {
~SynchronousCompositorHost() override;
// SynchronousCompositor overrides.
- SynchronousCompositor::Frame DemandDrawHw(
+ scoped_refptr<SynchronousCompositor::FrameFuture> DemandDrawHw(
const gfx::Size& viewport_size,
const gfx::Rect& viewport_rect_for_tile_priority,
const gfx::Transform& transform_for_tile_priority) override;
- void DemandDrawHwAsync(
+ scoped_refptr<SynchronousCompositor::FrameFuture> DemandDrawHwAsync(
const gfx::Size& viewport_size,
const gfx::Rect& viewport_rect_for_tile_priority,
const gfx::Transform& transform_for_tile_priority) override;
@@ -95,7 +96,7 @@ class SynchronousCompositorHost : public SynchronousCompositor {
bool DemandDrawSwInProc(SkCanvas* canvas);
void SetSoftwareDrawSharedMemoryIfNeeded(size_t stride, size_t buffer_size);
void SendZeroMemory();
- SynchronousCompositor::Frame ProcessHardwareFrame(
+ std::unique_ptr<SynchronousCompositor::Frame> ProcessHardwareFrame(
uint32_t output_surface_id,
cc::CompositorFrame compositor_frame);
bool DemandDrawHwReceiveFrame(const IPC::Message& message);
@@ -111,6 +112,7 @@ class SynchronousCompositorHost : public SynchronousCompositor {
size_t bytes_limit_;
std::unique_ptr<SharedMemoryWithSize> software_draw_shm_;
+ scoped_refptr<SynchronousCompositor::FrameFuture> frame_future_;
// Updated by both renderer and browser.
gfx::ScrollOffset root_scroll_offset_;

Powered by Google App Engine
This is Rietveld 408576698