Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: content/public/test/test_synchronous_compositor_android.h

Issue 2147873003: cc: Dedup IPCs to return resources to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "cc/output/compositor_frame_ack.h"
15 #include "content/public/browser/android/synchronous_compositor.h" 14 #include "content/public/browser/android/synchronous_compositor.h"
16 #include "content/public/browser/android/synchronous_compositor_client.h" 15 #include "content/public/browser/android/synchronous_compositor_client.h"
17 16
18 namespace content { 17 namespace content {
19 18
20 class CONTENT_EXPORT TestSynchronousCompositor : public SynchronousCompositor { 19 class CONTENT_EXPORT TestSynchronousCompositor : public SynchronousCompositor {
21 public: 20 public:
22 TestSynchronousCompositor(int process_id, int routing_id); 21 TestSynchronousCompositor(int process_id, int routing_id);
23 ~TestSynchronousCompositor() override; 22 ~TestSynchronousCompositor() override;
24 23
25 void SetClient(SynchronousCompositorClient* client); 24 void SetClient(SynchronousCompositorClient* client);
26 25
27 // SynchronousCompositor overrides. 26 // SynchronousCompositor overrides.
28 SynchronousCompositor::Frame DemandDrawHw( 27 SynchronousCompositor::Frame DemandDrawHw(
29 const gfx::Size& surface_size, 28 const gfx::Size& surface_size,
30 const gfx::Transform& transform, 29 const gfx::Transform& transform,
31 const gfx::Rect& viewport, 30 const gfx::Rect& viewport,
32 const gfx::Rect& clip, 31 const gfx::Rect& clip,
33 const gfx::Rect& viewport_rect_for_tile_priority, 32 const gfx::Rect& viewport_rect_for_tile_priority,
34 const gfx::Transform& transform_for_tile_priority) override; 33 const gfx::Transform& transform_for_tile_priority) override;
35 void ReturnResources(uint32_t output_surface_id, 34 void ReturnResources(uint32_t output_surface_id,
36 const cc::CompositorFrameAck& frame_ack) override; 35 const cc::ReturnedResourceArray& resources) override;
37 bool DemandDrawSw(SkCanvas* canvas) override; 36 bool DemandDrawSw(SkCanvas* canvas) override;
38 void SetMemoryPolicy(size_t bytes_limit) override {} 37 void SetMemoryPolicy(size_t bytes_limit) override {}
39 void DidChangeRootLayerScrollOffset( 38 void DidChangeRootLayerScrollOffset(
40 const gfx::ScrollOffset& root_offset) override {} 39 const gfx::ScrollOffset& root_offset) override {}
41 void SynchronouslyZoomBy(float zoom_delta, 40 void SynchronouslyZoomBy(float zoom_delta,
42 const gfx::Point& anchor) override {} 41 const gfx::Point& anchor) override {}
43 void OnComputeScroll(base::TimeTicks animate_time) override {} 42 void OnComputeScroll(base::TimeTicks animate_time) override {}
44 43
45 void SetHardwareFrame(uint32_t output_surface_id, 44 void SetHardwareFrame(uint32_t output_surface_id,
46 std::unique_ptr<cc::CompositorFrame> frame); 45 std::unique_ptr<cc::CompositorFrame> frame);
(...skipping 15 matching lines...) Expand all
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_
OLDNEW
« no previous file with comments | « content/public/browser/android/synchronous_compositor.h ('k') | content/public/test/test_synchronous_compositor_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698