| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "content/public/browser/android/synchronous_compositor.h" | 14 #include "content/public/browser/android/synchronous_compositor.h" |
| 15 #include "content/public/browser/android/synchronous_compositor_client.h" | 15 #include "content/public/browser/android/synchronous_compositor_client.h" |
| 16 | 16 |
| 17 namespace content { | 17 namespace content { |
| 18 | 18 |
| 19 class CONTENT_EXPORT TestSynchronousCompositor : public SynchronousCompositor { | 19 class CONTENT_EXPORT TestSynchronousCompositor : public SynchronousCompositor { |
| 20 public: | 20 public: |
| 21 TestSynchronousCompositor(int process_id, int routing_id); | 21 TestSynchronousCompositor(int process_id, int routing_id); |
| 22 ~TestSynchronousCompositor() override; | 22 ~TestSynchronousCompositor() override; |
| 23 | 23 |
| 24 void SetClient(SynchronousCompositorClient* client); | 24 void SetClient(SynchronousCompositorClient* client); |
| 25 | 25 |
| 26 // SynchronousCompositor overrides. | 26 // SynchronousCompositor overrides. |
| 27 SynchronousCompositor::Frame DemandDrawHw( | 27 SynchronousCompositor::Frame DemandDrawHw( |
| 28 const gfx::Size& surface_size, | |
| 29 const gfx::Transform& transform, | |
| 30 const gfx::Rect& viewport, | 28 const gfx::Rect& viewport, |
| 31 const gfx::Rect& clip, | |
| 32 const gfx::Rect& viewport_rect_for_tile_priority, | 29 const gfx::Rect& viewport_rect_for_tile_priority, |
| 33 const gfx::Transform& transform_for_tile_priority) override; | 30 const gfx::Transform& transform_for_tile_priority) override; |
| 34 void ReturnResources(uint32_t output_surface_id, | 31 void ReturnResources(uint32_t output_surface_id, |
| 35 const cc::ReturnedResourceArray& resources) override; | 32 const cc::ReturnedResourceArray& resources) override; |
| 36 bool DemandDrawSw(SkCanvas* canvas) override; | 33 bool DemandDrawSw(SkCanvas* canvas) override; |
| 37 void SetMemoryPolicy(size_t bytes_limit) override {} | 34 void SetMemoryPolicy(size_t bytes_limit) override {} |
| 38 void DidChangeRootLayerScrollOffset( | 35 void DidChangeRootLayerScrollOffset( |
| 39 const gfx::ScrollOffset& root_offset) override {} | 36 const gfx::ScrollOffset& root_offset) override {} |
| 40 void SynchronouslyZoomBy(float zoom_delta, | 37 void SynchronouslyZoomBy(float zoom_delta, |
| 41 const gfx::Point& anchor) override {} | 38 const gfx::Point& anchor) override {} |
| (...skipping 19 matching lines...) Expand all Loading... |
| 61 const int routing_id_; | 58 const int routing_id_; |
| 62 SynchronousCompositor::Frame hardware_frame_; | 59 SynchronousCompositor::Frame hardware_frame_; |
| 63 FrameAckArray frame_ack_array_; | 60 FrameAckArray frame_ack_array_; |
| 64 | 61 |
| 65 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor); | 62 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor); |
| 66 }; | 63 }; |
| 67 | 64 |
| 68 } // namespace content | 65 } // namespace content |
| 69 | 66 |
| 70 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ | 67 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ |
| OLD | NEW |