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

Side by Side Diff: chrome/gpu/gpu_command_buffer_stub.cc

Issue 6551019: Trace_event upgrades (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More gooder js thanks to arv. Created 9 years, 10 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/debug/trace_event.h"
7 #include "base/process_util.h" 8 #include "base/process_util.h"
8 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
9 #include "build/build_config.h" 10 #include "build/build_config.h"
10 #include "chrome/common/child_thread.h" 11 #include "chrome/common/child_thread.h"
11 #include "chrome/common/gpu_messages.h" 12 #include "chrome/common/gpu_messages.h"
12 #include "chrome/gpu/gpu_channel.h" 13 #include "chrome/gpu/gpu_channel.h"
13 #include "chrome/gpu/gpu_command_buffer_stub.h" 14 #include "chrome/gpu/gpu_command_buffer_stub.h"
14 #include "chrome/gpu/gpu_thread.h" 15 #include "chrome/gpu/gpu_thread.h"
15 16
16 using gpu::Buffer; 17 using gpu::Buffer;
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 transfer_buffer); 309 transfer_buffer);
309 *size = buffer.shared_memory->created_size(); 310 *size = buffer.shared_memory->created_size();
310 } 311 }
311 } 312 }
312 313
313 void GpuCommandBufferStub::OnResizeOffscreenFrameBuffer(const gfx::Size& size) { 314 void GpuCommandBufferStub::OnResizeOffscreenFrameBuffer(const gfx::Size& size) {
314 processor_->ResizeOffscreenFrameBuffer(size); 315 processor_->ResizeOffscreenFrameBuffer(size);
315 } 316 }
316 317
317 void GpuCommandBufferStub::OnSwapBuffers() { 318 void GpuCommandBufferStub::OnSwapBuffers() {
319 TRACE_EVENT_INSTANT0("GPU_INFO", "GpuCommandBufferStub::OnSwapBuffers");
318 Send(new GpuCommandBufferMsg_SwapBuffers(route_id_)); 320 Send(new GpuCommandBufferMsg_SwapBuffers(route_id_));
319 } 321 }
320 322
321 #if defined(OS_MACOSX) 323 #if defined(OS_MACOSX)
322 void GpuCommandBufferStub::OnSetWindowSize(const gfx::Size& size) { 324 void GpuCommandBufferStub::OnSetWindowSize(const gfx::Size& size) {
323 GpuThread* gpu_thread = channel_->gpu_thread(); 325 GpuThread* gpu_thread = channel_->gpu_thread();
324 // Try using the IOSurface version first. 326 // Try using the IOSurface version first.
325 uint64 new_backing_store = processor_->SetWindowSizeForIOSurface(size); 327 uint64 new_backing_store = processor_->SetWindowSizeForIOSurface(size);
326 if (new_backing_store) { 328 if (new_backing_store) {
327 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params params; 329 GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params params;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 #elif defined(OS_WIN) 376 #elif defined(OS_WIN)
375 HWND hwnd = static_cast<HWND>(compositor_window_); 377 HWND hwnd = static_cast<HWND>(compositor_window_);
376 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | 378 UINT swp_flags = SWP_NOSENDCHANGING | SWP_NOOWNERZORDER | SWP_NOCOPYBITS |
377 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE; 379 SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_DEFERERASE;
378 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags); 380 SetWindowPos(hwnd, NULL, 0, 0, size.width(), size.height(), swp_flags);
379 #endif // defined(OS_LINUX) 381 #endif // defined(OS_LINUX)
380 } 382 }
381 } 383 }
382 384
383 #endif // defined(ENABLE_GPU) 385 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698