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

Unified Diff: content/common/gpu/image_transport_surface_iosurface_mac.h

Issue 454243002: Make GPU back-pressure work with remote CALayers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix flashes Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/image_transport_surface_iosurface_mac.h
diff --git a/content/common/gpu/image_transport_surface_iosurface_mac.h b/content/common/gpu/image_transport_surface_iosurface_mac.h
index 5470ce3a4d371f2d3b6f757404554adf6543fa45..df6954dea4ae71499ba24fbc567bfcbdd68dc44d 100644
--- a/content/common/gpu/image_transport_surface_iosurface_mac.h
+++ b/content/common/gpu/image_transport_surface_iosurface_mac.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_IOSURFACE_MAC_H_
#define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_IOSURFACE_MAC_H_
+#include <list>
+
#include "content/common/gpu/image_transport_surface_fbo_mac.h"
#include "ui/gl/gl_bindings.h"
@@ -17,7 +19,7 @@ namespace content {
class IOSurfaceStorageProvider
: public ImageTransportSurfaceFBO::StorageProvider {
public:
- IOSurfaceStorageProvider();
+ IOSurfaceStorageProvider(ImageTransportSurfaceFBO* transport_surface);
virtual ~IOSurfaceStorageProvider();
// ImageTransportSurfaceFBO::StorageProvider implementation:
@@ -28,10 +30,18 @@ class IOSurfaceStorageProvider
virtual void FreeColorBufferStorage() OVERRIDE;
virtual uint64 GetSurfaceHandle() const OVERRIDE;
virtual void WillSwapBuffers() OVERRIDE;
+ virtual void CanFreeSwappedBuffer() OVERRIDE;
private:
+ ImageTransportSurfaceFBO* transport_surface_;
+
base::ScopedCFTypeRef<IOSurfaceRef> io_surface_;
+ // The list of IOSurfaces that have been sent to the browser process but have
+ // not been opened in the browser process yet. This list should never have
+ // more than one entry.
+ std::list<base::ScopedCFTypeRef<IOSurfaceRef>> pending_swapped_surfaces_;
+
// The id of |io_surface_| or 0 if that's NULL.
IOSurfaceID io_surface_id_;
« no previous file with comments | « content/common/gpu/image_transport_surface_fbo_mac.mm ('k') | content/common/gpu/image_transport_surface_iosurface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698