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

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

Issue 2078383004: Add a BrowserViewRenderer unittest for compositor switch logic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 6 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" 14 #include "cc/output/compositor_frame_ack.h"
15 #include "content/public/browser/android/synchronous_compositor.h" 15 #include "content/public/browser/android/synchronous_compositor.h"
16 #include "content/public/browser/android/synchronous_compositor_client.h" 16 #include "content/public/browser/android/synchronous_compositor_client.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 class CONTENT_EXPORT TestSynchronousCompositor : public SynchronousCompositor { 20 class CONTENT_EXPORT TestSynchronousCompositor : public SynchronousCompositor {
21 public: 21 public:
22 TestSynchronousCompositor(); 22 TestSynchronousCompositor(int process_id, int routing_id);
23 ~TestSynchronousCompositor() override; 23 ~TestSynchronousCompositor() override;
24 24
25 void SetClient(SynchronousCompositorClient* client); 25 void SetClient(SynchronousCompositorClient* client);
26 26
27 // SynchronousCompositor overrides. 27 // SynchronousCompositor overrides.
28 SynchronousCompositor::Frame DemandDrawHw( 28 SynchronousCompositor::Frame DemandDrawHw(
29 const gfx::Size& surface_size, 29 const gfx::Size& surface_size,
30 const gfx::Transform& transform, 30 const gfx::Transform& transform,
31 const gfx::Rect& viewport, 31 const gfx::Rect& viewport,
32 const gfx::Rect& clip, 32 const gfx::Rect& clip,
(...skipping 18 matching lines...) Expand all
51 ~ReturnedResources(); 51 ~ReturnedResources();
52 52
53 uint32_t output_surface_id; 53 uint32_t output_surface_id;
54 cc::ReturnedResourceArray resources; 54 cc::ReturnedResourceArray resources;
55 }; 55 };
56 using FrameAckArray = std::vector<ReturnedResources>; 56 using FrameAckArray = std::vector<ReturnedResources>;
57 void SwapReturnedResources(FrameAckArray* array); 57 void SwapReturnedResources(FrameAckArray* array);
58 58
59 private: 59 private:
60 SynchronousCompositorClient* client_; 60 SynchronousCompositorClient* client_;
61 const int process_id_;
62 const int routing_id_;
61 SynchronousCompositor::Frame hardware_frame_; 63 SynchronousCompositor::Frame hardware_frame_;
62 FrameAckArray frame_ack_array_; 64 FrameAckArray frame_ack_array_;
63 65
64 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor); 66 DISALLOW_COPY_AND_ASSIGN(TestSynchronousCompositor);
65 }; 67 };
66 68
67 } // namespace content 69 } // namespace content
68 70
69 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_ 71 #endif // CONTENT_PUBLIC_TEST_TEST_SYNCHRONOUS_COMPOSITOR_ANDROID_H_
OLDNEW
« no previous file with comments | « android_webview/browser/test/rendering_test.cc ('k') | content/public/test/test_synchronous_compositor_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698