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

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

Issue 10052018: Drop frontbuffers with ui-use-gpu-process, synchronized with browser, decoupled from backbuffer dro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming messages. Updated the other platforms. Created 8 years, 7 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 28 matching lines...) Expand all
39 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; 39 virtual unsigned int GetBackingFrameBufferObject() OVERRIDE;
40 virtual void SetBufferAllocation(BufferAllocationState state) OVERRIDE; 40 virtual void SetBufferAllocation(BufferAllocationState state) OVERRIDE;
41 41
42 protected: 42 protected:
43 // ImageTransportSurface implementation 43 // ImageTransportSurface implementation
44 virtual void OnNewSurfaceACK(uint64 surface_handle, 44 virtual void OnNewSurfaceACK(uint64 surface_handle,
45 TransportDIB::Handle shm_handle) OVERRIDE; 45 TransportDIB::Handle shm_handle) OVERRIDE;
46 virtual void OnBuffersSwappedACK() OVERRIDE; 46 virtual void OnBuffersSwappedACK() OVERRIDE;
47 virtual void OnPostSubBufferACK() OVERRIDE; 47 virtual void OnPostSubBufferACK() OVERRIDE;
48 virtual void OnResizeViewACK() OVERRIDE; 48 virtual void OnResizeViewACK() OVERRIDE;
49 virtual void OnDiscardSurface(uint64 surface_id) OVERRIDE;
49 virtual void OnResize(gfx::Size size) OVERRIDE; 50 virtual void OnResize(gfx::Size size) OVERRIDE;
50 51
51 private: 52 private:
52 virtual ~IOSurfaceImageTransportSurface() OVERRIDE; 53 virtual ~IOSurfaceImageTransportSurface() OVERRIDE;
53 54
54 void UnrefIOSurface(); 55 void UnrefIOSurface();
55 void CreateIOSurface(); 56 void CreateIOSurface();
56 57
57 BufferAllocationState buffer_allocation_state_; 58 BufferAllocationState buffer_allocation_state_;
58 59
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void IOSurfaceImageTransportSurface::OnNewSurfaceACK( 233 void IOSurfaceImageTransportSurface::OnNewSurfaceACK(
233 uint64 surface_handle, 234 uint64 surface_handle,
234 TransportDIB::Handle /* shm_handle */) { 235 TransportDIB::Handle /* shm_handle */) {
235 NOTREACHED(); 236 NOTREACHED();
236 } 237 }
237 238
238 void IOSurfaceImageTransportSurface::OnResizeViewACK() { 239 void IOSurfaceImageTransportSurface::OnResizeViewACK() {
239 NOTREACHED(); 240 NOTREACHED();
240 } 241 }
241 242
243 void IOSurfaceImageTransportSurface::OnDiscardSurface(uint64 surface_id) {
244 }
245
242 void IOSurfaceImageTransportSurface::OnResize(gfx::Size size) { 246 void IOSurfaceImageTransportSurface::OnResize(gfx::Size size) {
243 // Caching |context_| from OnMakeCurrent. It should still be current. 247 // Caching |context_| from OnMakeCurrent. It should still be current.
244 DCHECK(context_->IsCurrent(this)); 248 DCHECK(context_->IsCurrent(this));
245 249
246 size_ = size; 250 size_ = size;
247 251
248 CreateIOSurface(); 252 CreateIOSurface();
249 } 253 }
250 254
251 void IOSurfaceImageTransportSurface::UnrefIOSurface() { 255 void IOSurfaceImageTransportSurface::UnrefIOSurface() {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 NOTREACHED(); 370 NOTREACHED();
367 return NULL; 371 return NULL;
368 } 372 }
369 if (surface->Initialize()) 373 if (surface->Initialize())
370 return surface; 374 return surface;
371 else 375 else
372 return NULL; 376 return NULL;
373 } 377 }
374 378
375 #endif // defined(USE_GPU) 379 #endif // defined(USE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698