Chromium Code Reviews| Index: content/public/browser/android/synchronous_compositor.h |
| diff --git a/content/public/browser/android/synchronous_compositor.h b/content/public/browser/android/synchronous_compositor.h |
| index 5b8b72328f5d55ff681c725f1c29db00564eca41..ae3fa63ae7f4a7cecfd27121a6186a5e6dc15290 100644 |
| --- a/content/public/browser/android/synchronous_compositor.h |
| +++ b/content/public/browser/android/synchronous_compositor.h |
| @@ -10,6 +10,7 @@ |
| #include <memory> |
| #include "base/memory/ref_counted.h" |
| +#include "base/synchronization/waitable_event.h" |
| #include "base/time/time.h" |
| #include "cc/resources/returned_resource.h" |
| #include "content/common/content_export.h" |
| @@ -59,11 +60,28 @@ class CONTENT_EXPORT SynchronousCompositor { |
| DISALLOW_COPY_AND_ASSIGN(Frame); |
| }; |
| + class FrameFuture : public base::RefCountedThreadSafe<FrameFuture> { |
| + public: |
| + FrameFuture(); |
| + void setFrame(std::unique_ptr<Frame> frame); |
| + std::unique_ptr<Frame> getFrame(); |
| + |
| + private: |
| + base::WaitableEvent waitable_event_; |
|
boliu
2016/09/22 23:05:32
ordering style:
friend, then destructor, then bla
ojars
2016/09/28 00:17:59
Done.
|
| + std::unique_ptr<Frame> frame_; |
| + friend class base::RefCountedThreadSafe<FrameFuture>; |
| + ~FrameFuture(); |
| +#if DCHECK_IS_ON() |
| + bool waited_ = false; |
| +#endif |
| + }; |
| + |
| // "On demand" hardware draw. Parameters are used by compositor for this draw. |
| // |viewport_size| is the current size to improve results during resize. |
| // |viewport_rect_for_tile_priority| and |transform_for_tile_priority| are |
| // used to customize the tiling decisions of compositor. |
| - virtual Frame DemandDrawHw( |
| + // TODO(ojars): update this and the next documentation |
|
boliu
2016/09/22 23:05:32
no change required anymore :p
ojars
2016/09/28 00:17:59
Done.
|
| + virtual SynchronousCompositor::Frame DemandDrawHw( |
|
boliu
2016/09/22 23:05:32
don't need the SynchronousCompositor:: part
ojars
2016/09/28 00:17:59
Done.
|
| const gfx::Size& viewport_size, |
| const gfx::Rect& viewport_rect_for_tile_priority, |
| const gfx::Transform& transform_for_tile_priority) = 0; |