| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 uint32_t compositor_frame_sink_id; | 56 uint32_t compositor_frame_sink_id; |
| 57 std::unique_ptr<cc::CompositorFrame> frame; | 57 std::unique_ptr<cc::CompositorFrame> frame; |
| 58 | 58 |
| 59 private: | 59 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(Frame); | 60 DISALLOW_COPY_AND_ASSIGN(Frame); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 class FrameFuture : public base::RefCountedThreadSafe<FrameFuture> { | 63 class FrameFuture : public base::RefCountedThreadSafe<FrameFuture> { |
| 64 public: | 64 public: |
| 65 FrameFuture(); | 65 FrameFuture(); |
| 66 void setFrame(std::unique_ptr<Frame> frame); | 66 void SetFrame(std::unique_ptr<Frame> frame); |
| 67 std::unique_ptr<Frame> getFrame(); | 67 std::unique_ptr<Frame> GetFrame(); |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 friend class base::RefCountedThreadSafe<FrameFuture>; | 70 friend class base::RefCountedThreadSafe<FrameFuture>; |
| 71 ~FrameFuture(); | 71 ~FrameFuture(); |
| 72 | 72 |
| 73 base::WaitableEvent waitable_event_; | 73 base::WaitableEvent waitable_event_; |
| 74 std::unique_ptr<Frame> frame_; | 74 std::unique_ptr<Frame> frame_; |
| 75 #if DCHECK_IS_ON() | 75 #if DCHECK_IS_ON() |
| 76 bool waited_ = false; | 76 bool waited_ = false; |
| 77 #endif | 77 #endif |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // and if any input animation is active, it should tick now. | 118 // and if any input animation is active, it should tick now. |
| 119 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; | 119 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; |
| 120 | 120 |
| 121 protected: | 121 protected: |
| 122 virtual ~SynchronousCompositor() {} | 122 virtual ~SynchronousCompositor() {} |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 } // namespace content | 125 } // namespace content |
| 126 | 126 |
| 127 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 127 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| OLD | NEW |