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

Side by Side Diff: cc/test/test_context_support.cc

Issue 362863002: Add future sync point methods to ContextSupport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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/test/test_context_support.h" 5 #include "cc/test/test_context_support.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 schedule_overlay_plane_callback_ = schedule_overlay_plane_callback; 58 schedule_overlay_plane_callback_ = schedule_overlay_plane_callback;
59 } 59 }
60 60
61 void TestContextSupport::Swap() { 61 void TestContextSupport::Swap() {
62 last_swap_type_ = SWAP; 62 last_swap_type_ = SWAP;
63 base::MessageLoop::current()->PostTask( 63 base::MessageLoop::current()->PostTask(
64 FROM_HERE, base::Bind(&TestContextSupport::OnSwapBuffersComplete, 64 FROM_HERE, base::Bind(&TestContextSupport::OnSwapBuffersComplete,
65 weak_ptr_factory_.GetWeakPtr())); 65 weak_ptr_factory_.GetWeakPtr()));
66 } 66 }
67 67
68 uint32 TestContextSupport::InsertFutureSyncPointCHROMIUM() {
69 NOTIMPLEMENTED();
70 return 0;
71 }
72
73 void TestContextSupport::RetireSyncPointCHROMIUM(uint32 sync_point) {
74 NOTIMPLEMENTED();
75 }
76
68 void TestContextSupport::PartialSwapBuffers(const gfx::Rect& sub_buffer) { 77 void TestContextSupport::PartialSwapBuffers(const gfx::Rect& sub_buffer) {
69 last_swap_type_ = PARTIAL_SWAP; 78 last_swap_type_ = PARTIAL_SWAP;
70 last_partial_swap_rect_ = sub_buffer; 79 last_partial_swap_rect_ = sub_buffer;
71 base::MessageLoop::current()->PostTask( 80 base::MessageLoop::current()->PostTask(
72 FROM_HERE, base::Bind(&TestContextSupport::OnSwapBuffersComplete, 81 FROM_HERE, base::Bind(&TestContextSupport::OnSwapBuffersComplete,
73 weak_ptr_factory_.GetWeakPtr())); 82 weak_ptr_factory_.GetWeakPtr()));
74 } 83 }
75 84
76 void TestContextSupport::ScheduleOverlayPlane( 85 void TestContextSupport::ScheduleOverlayPlane(
77 int plane_z_order, 86 int plane_z_order,
(...skipping 14 matching lines...) Expand all
92 const base::Closure& callback) { 101 const base::Closure& callback) {
93 swap_buffers_complete_callback_ = callback; 102 swap_buffers_complete_callback_ = callback;
94 } 103 }
95 104
96 void TestContextSupport::OnSwapBuffersComplete() { 105 void TestContextSupport::OnSwapBuffersComplete() {
97 if (!swap_buffers_complete_callback_.is_null()) 106 if (!swap_buffers_complete_callback_.is_null())
98 swap_buffers_complete_callback_.Run(); 107 swap_buffers_complete_callback_.Run();
99 } 108 }
100 109
101 } // namespace cc 110 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_context_support.h ('k') | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_future_sync_point.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698