| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ |
| 6 #define CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 void ReturnResources(uint32_t output_surface_id, | 35 void ReturnResources(uint32_t output_surface_id, |
| 36 const cc::CompositorFrameAck& frame_ack) override; | 36 const cc::CompositorFrameAck& frame_ack) override; |
| 37 bool DemandDrawSw(SkCanvas* canvas) override; | 37 bool DemandDrawSw(SkCanvas* canvas) override; |
| 38 void SetMemoryPolicy(size_t bytes_limit) override {} | 38 void SetMemoryPolicy(size_t bytes_limit) override {} |
| 39 void DidChangeRootLayerScrollOffset( | 39 void DidChangeRootLayerScrollOffset( |
| 40 const gfx::ScrollOffset& root_offset) override {} | 40 const gfx::ScrollOffset& root_offset) override {} |
| 41 void SynchronouslyZoomBy(float zoom_delta, | 41 void SynchronouslyZoomBy(float zoom_delta, |
| 42 const gfx::Point& anchor) override {} | 42 const gfx::Point& anchor) override {} |
| 43 void OnComputeScroll(base::TimeTicks animate_time) override {} | 43 void OnComputeScroll(base::TimeTicks animate_time) override {} |
| 44 | 44 |
| 45 void SetHardwareFrame(uint32_t output_surface_id, | 45 void SetHardwareFrame(uint32_t output_surface_id, cc::CompositorFrame frame); |
| 46 std::unique_ptr<cc::CompositorFrame> frame); | |
| 47 | 46 |
| 48 struct ReturnedResources { | 47 struct ReturnedResources { |
| 49 ReturnedResources(); | 48 ReturnedResources(); |
| 50 ReturnedResources(const ReturnedResources& other); | 49 ReturnedResources(const ReturnedResources& other); |
| 51 ~ReturnedResources(); | 50 ~ReturnedResources(); |
| 52 | 51 |
| 53 uint32_t output_surface_id; | 52 uint32_t output_surface_id; |
| 54 cc::ReturnedResourceArray resources; | 53 cc::ReturnedResourceArray resources; |
| 55 }; | 54 }; |
| 56 using FrameAckArray = std::vector<ReturnedResources>; | 55 using FrameAckArray = std::vector<ReturnedResources>; |
| 57 void SwapReturnedResources(FrameAckArray* array); | 56 void SwapReturnedResources(FrameAckArray* array); |
| 58 | 57 |
| 59 private: | 58 private: |
| 60 SynchronousCompositorClient* client_; | 59 SynchronousCompositorClient* client_; |
| 61 const int process_id_; | 60 const int process_id_; |
| 62 const int routing_id_; | 61 const int routing_id_; |
| 63 SynchronousCompositor::Frame hardware_frame_; | 62 SynchronousCompositor::Frame hardware_frame_; |
| 64 FrameAckArray frame_ack_array_; | 63 FrameAckArray frame_ack_array_; |
| 65 | 64 |
| 66 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor); | 65 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor); |
| 67 }; | 66 }; |
| 68 | 67 |
| 69 } // namespace content | 68 } // namespace content |
| 70 | 69 |
| 71 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ | 70 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ |
| OLD | NEW |