| 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 22 matching lines...) Expand all Loading... |
| 33 const gfx::Rect& viewport_rect_for_tile_priority, | 33 const gfx::Rect& viewport_rect_for_tile_priority, |
| 34 const gfx::Transform& transform_for_tile_priority) override; | 34 const gfx::Transform& transform_for_tile_priority) override; |
| 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 SetIsActive(bool is_active) override {} | |
| 44 void OnComputeScroll(base::TimeTicks animate_time) override {} | 43 void OnComputeScroll(base::TimeTicks animate_time) override {} |
| 45 | 44 |
| 46 void SetHardwareFrame(uint32_t output_surface_id, | 45 void SetHardwareFrame(uint32_t output_surface_id, |
| 47 std::unique_ptr<cc::CompositorFrame> frame); | 46 std::unique_ptr<cc::CompositorFrame> frame); |
| 48 | 47 |
| 49 struct ReturnedResources { | 48 struct ReturnedResources { |
| 50 ReturnedResources(); | 49 ReturnedResources(); |
| 51 ReturnedResources(const ReturnedResources& other); | 50 ReturnedResources(const ReturnedResources& other); |
| 52 ~ReturnedResources(); | 51 ~ReturnedResources(); |
| 53 | 52 |
| 54 uint32_t output_surface_id; | 53 uint32_t output_surface_id; |
| 55 cc::ReturnedResourceArray resources; | 54 cc::ReturnedResourceArray resources; |
| 56 }; | 55 }; |
| 57 using FrameAckArray = std::vector<ReturnedResources>; | 56 using FrameAckArray = std::vector<ReturnedResources>; |
| 58 void SwapReturnedResources(FrameAckArray* array); | 57 void SwapReturnedResources(FrameAckArray* array); |
| 59 | 58 |
| 60 private: | 59 private: |
| 61 SynchronousCompositorClient* client_; | 60 SynchronousCompositorClient* client_; |
| 62 SynchronousCompositor::Frame hardware_frame_; | 61 SynchronousCompositor::Frame hardware_frame_; |
| 63 FrameAckArray frame_ack_array_; | 62 FrameAckArray frame_ack_array_; |
| 64 | 63 |
| 65 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor); | 64 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor); |
| 66 }; | 65 }; |
| 67 | 66 |
| 68 } // namespace content | 67 } // namespace content |
| 69 | 68 |
| 70 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ | 69 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ |
| OLD | NEW |