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

Side by Side Diff: cc/output/output_surface_unittest.cc

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/output/output_surface_client.h ('k') | cc/scheduler/begin_frame_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "cc/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "cc/output/managed_memory_policy.h" 8 #include "cc/output/managed_memory_policy.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "cc/output/software_output_device.h" 10 #include "cc/output/software_output_device.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return InitializeAndSetContext3d(new_context_provider); 42 return InitializeAndSetContext3d(new_context_provider);
43 } 43 }
44 44
45 using OutputSurface::ReleaseGL; 45 using OutputSurface::ReleaseGL;
46 46
47 void CommitVSyncParametersForTesting(base::TimeTicks timebase, 47 void CommitVSyncParametersForTesting(base::TimeTicks timebase,
48 base::TimeDelta interval) { 48 base::TimeDelta interval) {
49 CommitVSyncParameters(timebase, interval); 49 CommitVSyncParameters(timebase, interval);
50 } 50 }
51 51
52 void BeginFrameForTesting() {
53 client_->BeginFrame(CreateExpiredBeginFrameArgsForTesting());
54 }
55
56 void DidSwapBuffersForTesting() { client_->DidSwapBuffers(); } 52 void DidSwapBuffersForTesting() { client_->DidSwapBuffers(); }
57 53
58 void OnSwapBuffersCompleteForTesting() { client_->DidSwapBuffersComplete(); } 54 void OnSwapBuffersCompleteForTesting() { client_->DidSwapBuffersComplete(); }
59 55
60 protected: 56 protected:
61 }; 57 };
62 58
63 class TestSoftwareOutputDevice : public SoftwareOutputDevice { 59 class TestSoftwareOutputDevice : public SoftwareOutputDevice {
64 public: 60 public:
65 TestSoftwareOutputDevice(); 61 TestSoftwareOutputDevice();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); 219 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count());
224 EXPECT_EQ(0, software_output_device->discard_backbuffer_count()); 220 EXPECT_EQ(0, software_output_device->discard_backbuffer_count());
225 output_surface.DiscardBackbuffer(); 221 output_surface.DiscardBackbuffer();
226 222
227 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); 223 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count());
228 EXPECT_EQ(1, software_output_device->discard_backbuffer_count()); 224 EXPECT_EQ(1, software_output_device->discard_backbuffer_count());
229 } 225 }
230 226
231 } // namespace 227 } // namespace
232 } // namespace cc 228 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface_client.h ('k') | cc/scheduler/begin_frame_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698