OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |