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

Side by Side Diff: ui/aura/bench/bench_main.cc

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mock gpu video accelerator factory Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #if defined(USE_X11) 5 #if defined(USE_X11)
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 #endif 7 #endif
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 TimeTicks start_time_; 136 TimeTicks start_time_;
137 int frames_; 137 int frames_;
138 int max_frames_; 138 int max_frames_;
139 139
140 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver); 140 DISALLOW_COPY_AND_ASSIGN(BenchCompositorObserver);
141 }; 141 };
142 142
143 void ReturnMailbox(scoped_refptr<cc::ContextProvider> context_provider, 143 void ReturnMailbox(scoped_refptr<cc::ContextProvider> context_provider,
144 GLuint texture, 144 GLuint texture,
145 GLuint sync_point, 145 GLuint sync_point,
146 const gpu::SyncToken& sync_token,
146 bool is_lost) { 147 bool is_lost) {
147 gpu::gles2::GLES2Interface* gl = context_provider->ContextGL(); 148 gpu::gles2::GLES2Interface* gl = context_provider->ContextGL();
148 gl->WaitSyncPointCHROMIUM(sync_point); 149 gl->WaitSyncPointCHROMIUM(sync_point, sync_token.GetConstData());
149 gl->DeleteTextures(1, &texture); 150 gl->DeleteTextures(1, &texture);
150 gl->ShallowFlushCHROMIUM(); 151 gl->ShallowFlushCHROMIUM();
151 } 152 }
152 153
153 gfx::Size GetFullscreenSize() { 154 gfx::Size GetFullscreenSize() {
154 #if defined(OS_WIN) 155 #if defined(OS_WIN)
155 return gfx::Size(GetSystemMetrics(SM_CXSCREEN), 156 return gfx::Size(GetSystemMetrics(SM_CXSCREEN),
156 GetSystemMetrics(SM_CYSCREEN)); 157 GetSystemMetrics(SM_CYSCREEN));
157 #else 158 #else
158 NOTIMPLEMENTED(); 159 NOTIMPLEMENTED();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); 376 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100));
376 #endif 377 #endif
377 378
378 host->Show(); 379 host->Show();
379 base::MessageLoopForUI::current()->Run(); 380 base::MessageLoopForUI::current()->Run();
380 focus_client.reset(); 381 focus_client.reset();
381 host.reset(); 382 host.reset();
382 383
383 return 0; 384 return 0;
384 } 385 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698