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

Side by Side Diff: gpu/command_buffer/service/gpu_processor_mac.cc

Issue 4142004: Let every "accelerated IO surface swapped" message have an identifier of the surface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 10 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 | 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 #include "app/gfx/gl/gl_context.h" 5 #include "app/gfx/gl/gl_context.h"
6 #include "gpu/command_buffer/service/gpu_processor.h" 6 #include "gpu/command_buffer/service/gpu_processor.h"
7 7
8 using ::base::SharedMemory; 8 using ::base::SharedMemory;
9 9
10 namespace gpu { 10 namespace gpu {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 decoder_->UpdateOffscreenFrameBufferSize(); 86 decoder_->UpdateOffscreenFrameBufferSize();
87 return surface_->SetTransportDIBSize(size); 87 return surface_->SetTransportDIBSize(size);
88 } 88 }
89 89
90 void GPUProcessor::SetTransportDIBAllocAndFree( 90 void GPUProcessor::SetTransportDIBAllocAndFree(
91 Callback2<size_t, TransportDIB::Handle*>::Type* allocator, 91 Callback2<size_t, TransportDIB::Handle*>::Type* allocator,
92 Callback1<TransportDIB::Id>::Type* deallocator) { 92 Callback1<TransportDIB::Id>::Type* deallocator) {
93 surface_->SetTransportDIBAllocAndFree(allocator, deallocator); 93 surface_->SetTransportDIBAllocAndFree(allocator, deallocator);
94 } 94 }
95 95
96 uint64 GPUProcessor::GetSurfaceId() {
97 if (!surface_.get())
98 return 0;
99 return surface_->GetSurfaceId();
100 }
101
96 void GPUProcessor::WillSwapBuffers() { 102 void GPUProcessor::WillSwapBuffers() {
97 DCHECK(decoder_.get()); 103 DCHECK(decoder_.get());
98 DCHECK(decoder_->GetGLContext()); 104 DCHECK(decoder_->GetGLContext());
99 DCHECK(decoder_->GetGLContext()->IsCurrent()); 105 DCHECK(decoder_->GetGLContext()->IsCurrent());
100 106
101 if (surface_.get()) { 107 if (surface_.get()) {
102 surface_->SwapBuffers(); 108 surface_->SwapBuffers();
103 } 109 }
104 110
105 if (wrapped_swap_buffers_callback_.get()) { 111 if (wrapped_swap_buffers_callback_.get()) {
106 wrapped_swap_buffers_callback_->Run(); 112 wrapped_swap_buffers_callback_->Run();
107 } 113 }
108 } 114 }
109 115
110 } // namespace gpu 116 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698