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

Side by Side Diff: gpu/ipc/service/image_transport_surface_overlay_mac.h

Issue 2102883003: [Merge to 2774] Don't check IOSurfaceIsInUse for IOSurfaces wrapped in a CVPixelBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2774
Patch Set: Created 4 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
« no previous file with comments | « no previous file | gpu/ipc/service/image_transport_surface_overlay_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 5 #ifndef GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
6 #define GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 6 #define GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 std::vector<ui::LatencyInfo> latency_info_; 93 std::vector<ui::LatencyInfo> latency_info_;
94 94
95 bool use_remote_layer_api_; 95 bool use_remote_layer_api_;
96 base::scoped_nsobject<CAContext> ca_context_; 96 base::scoped_nsobject<CAContext> ca_context_;
97 base::scoped_nsobject<CAContext> fullscreen_low_power_ca_context_; 97 base::scoped_nsobject<CAContext> fullscreen_low_power_ca_context_;
98 std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_; 98 std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_;
99 99
100 gfx::Size pixel_size_; 100 gfx::Size pixel_size_;
101 float scale_factor_; 101 float scale_factor_;
102 102
103 struct IOSurfaceInUseQuery { 103 std::vector<CALayerInUseQuery> ca_layer_in_use_queries_;
104 IOSurfaceInUseQuery();
105 explicit IOSurfaceInUseQuery(const IOSurfaceInUseQuery&);
106 explicit IOSurfaceInUseQuery(IOSurfaceInUseQuery&&);
107 ~IOSurfaceInUseQuery();
108
109 // It's possible that the client will have destroyed the texture before
110 // SwapBuffersInternal is called. It's important that |texture| is only used
111 // as an opaque identifier, since it may no longer point to the same
112 // texture.
113 unsigned texture = 0;
114 base::ScopedCFTypeRef<IOSurfaceRef> io_surface;
115 };
116 std::vector<IOSurfaceInUseQuery> io_surface_in_use_queries_;
117 104
118 // A GLFence marking the end of the previous frame. Must only be accessed 105 // A GLFence marking the end of the previous frame. Must only be accessed
119 // while in a ScopedSetGLToRealGLApi, and while the associated 106 // while in a ScopedSetGLToRealGLApi, and while the associated
120 // |previous_frame_context_| is bound. 107 // |previous_frame_context_| is bound.
121 std::unique_ptr<gl::GLFence> previous_frame_fence_; 108 std::unique_ptr<gl::GLFence> previous_frame_fence_;
122 base::ScopedTypeRef<CGLContextObj> fence_context_obj_; 109 base::ScopedTypeRef<CGLContextObj> fence_context_obj_;
123 110
124 // The renderer ID that all contexts made current to this surface should be 111 // The renderer ID that all contexts made current to this surface should be
125 // targeting. 112 // targeting.
126 GLint gl_renderer_id_; 113 GLint gl_renderer_id_;
127 }; 114 };
128 115
129 } // namespace gpu 116 } // namespace gpu
130 117
131 #endif // GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 118 #endif // GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/ipc/service/image_transport_surface_overlay_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698