| 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 "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 struct Frame { | 51 struct Frame { |
| 52 Frame(); | 52 Frame(); |
| 53 ~Frame(); | 53 ~Frame(); |
| 54 | 54 |
| 55 // Movable type. | 55 // Movable type. |
| 56 Frame(Frame&& rhs); | 56 Frame(Frame&& rhs); |
| 57 Frame& operator=(Frame&& rhs); | 57 Frame& operator=(Frame&& rhs); |
| 58 | 58 |
| 59 uint32_t output_surface_id; | 59 uint32_t output_surface_id; |
| 60 scoped_ptr<cc::CompositorFrame> frame; | 60 std::unique_ptr<cc::CompositorFrame> frame; |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 DISALLOW_COPY_AND_ASSIGN(Frame); | 63 DISALLOW_COPY_AND_ASSIGN(Frame); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 // "On demand" hardware draw. The content is first clipped to |damage_area|, | 66 // "On demand" hardware draw. The content is first clipped to |damage_area|, |
| 67 // then transformed through |transform|, and finally clipped to |view_size|. | 67 // then transformed through |transform|, and finally clipped to |view_size|. |
| 68 virtual Frame DemandDrawHw( | 68 virtual Frame DemandDrawHw( |
| 69 const gfx::Size& surface_size, | 69 const gfx::Size& surface_size, |
| 70 const gfx::Transform& transform, | 70 const gfx::Transform& transform, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 // and if any input animation is active, it should tick now. | 104 // and if any input animation is active, it should tick now. |
| 105 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; | 105 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; |
| 106 | 106 |
| 107 protected: | 107 protected: |
| 108 virtual ~SynchronousCompositor() {} | 108 virtual ~SynchronousCompositor() {} |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 } // namespace content | 111 } // namespace content |
| 112 | 112 |
| 113 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ | 113 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ |
| OLD | NEW |