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

Side by Side Diff: android_webview/browser/test/rendering_test.h

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make CompositorFrameMetadata movable 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 ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_
6 #define ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ 6 #define ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "android_webview/browser/browser_view_renderer_client.h" 10 #include "android_webview/browser/browser_view_renderer_client.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 CompositorFrameConsumer* GetCompositorFrameConsumer(); 75 CompositorFrameConsumer* GetCompositorFrameConsumer();
76 CompositorFrameProducer* GetCompositorFrameProducer(); 76 CompositorFrameProducer* GetCompositorFrameProducer();
77 77
78 virtual void SetUpTestHarness(); 78 virtual void SetUpTestHarness();
79 virtual void StartTest(); 79 virtual void StartTest();
80 80
81 void RunTest(); 81 void RunTest();
82 void InitializeCompositor(); 82 void InitializeCompositor();
83 void EndTest(); 83 void EndTest();
84 content::SynchronousCompositor* ActiveCompositor() const; 84 content::SynchronousCompositor* ActiveCompositor() const;
85 std::unique_ptr<cc::CompositorFrame> ConstructEmptyFrame(); 85 cc::CompositorFrame ConstructEmptyFrame();
86 std::unique_ptr<cc::CompositorFrame> ConstructFrame( 86 cc::CompositorFrame ConstructFrame(cc::ResourceId resource_id);
87 cc::ResourceId resource_id);
88 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 87 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
89 std::unique_ptr<FakeWindow> window_; 88 std::unique_ptr<FakeWindow> window_;
90 std::unique_ptr<FakeFunctor> functor_; 89 std::unique_ptr<FakeFunctor> functor_;
91 std::unique_ptr<BrowserViewRenderer> browser_view_renderer_; 90 std::unique_ptr<BrowserViewRenderer> browser_view_renderer_;
92 std::unique_ptr<content::TestSynchronousCompositor> compositor_; 91 std::unique_ptr<content::TestSynchronousCompositor> compositor_;
93 92
94 private: 93 private:
95 void QuitMessageLoop(); 94 void QuitMessageLoop();
96 95
97 void DrawGL(AwDrawGLInfo* aw_draw_gl_info); 96 void DrawGL(AwDrawGLInfo* aw_draw_gl_info);
98 97
99 const std::unique_ptr<base::MessageLoop> message_loop_; 98 const std::unique_ptr<base::MessageLoop> message_loop_;
100 99
101 DISALLOW_COPY_AND_ASSIGN(RenderingTest); 100 DISALLOW_COPY_AND_ASSIGN(RenderingTest);
102 }; 101 };
103 102
104 #define RENDERING_TEST_F(TEST_FIXTURE_NAME) \ 103 #define RENDERING_TEST_F(TEST_FIXTURE_NAME) \
105 TEST_F(TEST_FIXTURE_NAME, RunTest) { RunTest(); } \ 104 TEST_F(TEST_FIXTURE_NAME, RunTest) { RunTest(); } \
106 class NeedsSemicolon##TEST_FIXTURE_NAME {} 105 class NeedsSemicolon##TEST_FIXTURE_NAME {}
107 106
108 } // namespace android_webview 107 } // namespace android_webview
109 108
110 #endif // ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_ 109 #endif // ANDROID_WEBVIEW_BROWSER_TEST_RENDERING_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698