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

Side by Side Diff: content/common/gpu/image_transport_surface_mac.cc

Issue 10663003: Merge the IPCs used for GPU process synchronization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 (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(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "content/common/gpu/image_transport_surface.h" 7 #include "content/common/gpu/image_transport_surface.h"
8 8
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 26 matching lines...) Expand all
37 virtual gfx::Size GetSize() OVERRIDE; 37 virtual gfx::Size GetSize() OVERRIDE;
38 virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE; 38 virtual bool OnMakeCurrent(gfx::GLContext* context) OVERRIDE;
39 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; 39 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
40 virtual void SetBackbufferAllocation(bool allocated) OVERRIDE; 40 virtual void SetBackbufferAllocation(bool allocated) OVERRIDE;
41 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; 41 virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE;
42 42
43 protected: 43 protected:
44 // ImageTransportSurface implementation 44 // ImageTransportSurface implementation
45 virtual void OnNewSurfaceACK(uint64 surface_handle, 45 virtual void OnNewSurfaceACK(uint64 surface_handle,
46 TransportDIB::Handle shm_handle) OVERRIDE; 46 TransportDIB::Handle shm_handle) OVERRIDE;
47 virtual void OnBuffersSwappedACK() OVERRIDE; 47 virtual void OnBufferPresented() OVERRIDE;
48 virtual void OnPostSubBufferACK() OVERRIDE;
49 virtual void OnResizeViewACK() OVERRIDE; 48 virtual void OnResizeViewACK() OVERRIDE;
50 virtual void OnResize(gfx::Size size) OVERRIDE; 49 virtual void OnResize(gfx::Size size) OVERRIDE;
51 50
52 private: 51 private:
53 virtual ~IOSurfaceImageTransportSurface() OVERRIDE; 52 virtual ~IOSurfaceImageTransportSurface() OVERRIDE;
54 53
55 void AdjustBufferAllocation(); 54 void AdjustBufferAllocation();
56 void UnrefIOSurface(); 55 void UnrefIOSurface();
57 void CreateIOSurface(); 56 void CreateIOSurface();
58 57
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 extensions += extensions.empty() ? "" : " "; 227 extensions += extensions.empty() ? "" : " ";
229 extensions += "GL_CHROMIUM_front_buffer_cached "; 228 extensions += "GL_CHROMIUM_front_buffer_cached ";
230 extensions += "GL_CHROMIUM_post_sub_buffer"; 229 extensions += "GL_CHROMIUM_post_sub_buffer";
231 return extensions; 230 return extensions;
232 } 231 }
233 232
234 gfx::Size IOSurfaceImageTransportSurface::GetSize() { 233 gfx::Size IOSurfaceImageTransportSurface::GetSize() {
235 return size_; 234 return size_;
236 } 235 }
237 236
238 void IOSurfaceImageTransportSurface::OnBuffersSwappedACK() { 237 void IOSurfaceImageTransportSurface::OnBufferPresented() {
239 helper_->SetScheduled(true); 238 helper_->SetScheduled(true);
240 } 239 }
241 240
242 void IOSurfaceImageTransportSurface::OnPostSubBufferACK() {
243 helper_->SetScheduled(true);
244 }
245
246 void IOSurfaceImageTransportSurface::OnNewSurfaceACK( 241 void IOSurfaceImageTransportSurface::OnNewSurfaceACK(
247 uint64 surface_handle, 242 uint64 surface_handle,
248 TransportDIB::Handle /* shm_handle */) { 243 TransportDIB::Handle /* shm_handle */) {
249 NOTREACHED(); 244 NOTREACHED();
250 } 245 }
251 246
252 void IOSurfaceImageTransportSurface::OnResizeViewACK() { 247 void IOSurfaceImageTransportSurface::OnResizeViewACK() {
253 NOTREACHED(); 248 NOTREACHED();
254 } 249 }
255 250
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 NOTREACHED(); 375 NOTREACHED();
381 return NULL; 376 return NULL;
382 } 377 }
383 if (surface->Initialize()) 378 if (surface->Initialize())
384 return surface; 379 return surface;
385 else 380 else
386 return NULL; 381 return NULL;
387 } 382 }
388 383
389 #endif // defined(USE_GPU) 384 #endif // defined(USE_GPU)
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface_linux.cc ('k') | content/common/gpu/image_transport_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698