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

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, 2 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 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 26 matching lines...) Expand all
37 return InitializeAndSetContext3d(new_context_provider); 37 return InitializeAndSetContext3d(new_context_provider);
38 } 38 }
39 39
40 using OutputSurface::ReleaseGL; 40 using OutputSurface::ReleaseGL;
41 41
42 void CommitVSyncParametersForTesting(base::TimeTicks timebase, 42 void CommitVSyncParametersForTesting(base::TimeTicks timebase,
43 base::TimeDelta interval) { 43 base::TimeDelta interval) {
44 CommitVSyncParameters(timebase, interval); 44 CommitVSyncParameters(timebase, interval);
45 } 45 }
46 46
47 void BeginFrameForTesting() {
48 client_->BeginFrame(CreateExpiredBeginFrameArgsForTesting());
49 }
50
51 void DidSwapBuffersForTesting() { client_->DidSwapBuffers(); } 47 void DidSwapBuffersForTesting() { client_->DidSwapBuffers(); }
52 48
53 void OnSwapBuffersCompleteForTesting() { client_->DidSwapBuffersComplete(); } 49 void OnSwapBuffersCompleteForTesting() { client_->DidSwapBuffersComplete(); }
54 50
55 protected: 51 protected:
56 }; 52 };
57 53
58 class TestSoftwareOutputDevice : public SoftwareOutputDevice { 54 class TestSoftwareOutputDevice : public SoftwareOutputDevice {
59 public: 55 public:
60 TestSoftwareOutputDevice(); 56 TestSoftwareOutputDevice();
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); 214 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count());
219 EXPECT_EQ(0, software_output_device->discard_backbuffer_count()); 215 EXPECT_EQ(0, software_output_device->discard_backbuffer_count());
220 output_surface.DiscardBackbuffer(); 216 output_surface.DiscardBackbuffer();
221 217
222 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count()); 218 EXPECT_EQ(1, software_output_device->ensure_backbuffer_count());
223 EXPECT_EQ(1, software_output_device->discard_backbuffer_count()); 219 EXPECT_EQ(1, software_output_device->discard_backbuffer_count());
224 } 220 }
225 221
226 } // namespace 222 } // namespace
227 } // namespace cc 223 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698