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

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

Issue 2028303002: Modify ImageTransportSurfaceOverlayMac to allow pipelining (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GL API scoping Created 4 years, 6 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>
11 11
12 #import "base/mac/scoped_nsobject.h" 12 #import "base/mac/scoped_nsobject.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "gpu/ipc/service/gpu_command_buffer_stub.h" 14 #include "gpu/ipc/service/gpu_command_buffer_stub.h"
15 #include "gpu/ipc/service/image_transport_surface.h" 15 #include "gpu/ipc/service/image_transport_surface.h"
16 #include "ui/base/cocoa/remote_layer_api.h" 16 #include "ui/base/cocoa/remote_layer_api.h"
17 #include "ui/events/latency_info.h" 17 #include "ui/events/latency_info.h"
18 #include "ui/gl/gl_surface.h" 18 #include "ui/gl/gl_surface.h"
19 #include "ui/gl/gpu_switching_observer.h" 19 #include "ui/gl/gpu_switching_observer.h"
20 20
21 @class CAContext; 21 @class CAContext;
22 @class CALayer; 22 @class CALayer;
23 23
24 namespace ui { 24 namespace ui {
25 class CALayerTreeCoordinator; 25 class CALayerTreeCoordinator;
26 } 26 }
27 27
28 namespace gl {
29 class GLFence;
30 }
31
28 namespace gpu { 32 namespace gpu {
29 33
30 class ImageTransportSurfaceOverlayMac : public gl::GLSurface, 34 class ImageTransportSurfaceOverlayMac : public gl::GLSurface,
31 public ui::GpuSwitchingObserver { 35 public ui::GpuSwitchingObserver {
32 public: 36 public:
33 ImageTransportSurfaceOverlayMac(GpuCommandBufferStub* stub, 37 ImageTransportSurfaceOverlayMac(GpuCommandBufferStub* stub,
34 SurfaceHandle handle); 38 SurfaceHandle handle);
35 39
36 // GLSurface implementation 40 // GLSurface implementation
37 bool Initialize(gl::GLSurface::Format format) override; 41 bool Initialize(gl::GLSurface::Format format) override;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 std::vector<ui::LatencyInfo> latency_info_; 91 std::vector<ui::LatencyInfo> latency_info_;
88 92
89 bool use_remote_layer_api_; 93 bool use_remote_layer_api_;
90 base::scoped_nsobject<CAContext> ca_context_; 94 base::scoped_nsobject<CAContext> ca_context_;
91 base::scoped_nsobject<CAContext> fullscreen_low_power_ca_context_; 95 base::scoped_nsobject<CAContext> fullscreen_low_power_ca_context_;
92 std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_; 96 std::unique_ptr<ui::CALayerTreeCoordinator> ca_layer_tree_coordinator_;
93 97
94 gfx::Size pixel_size_; 98 gfx::Size pixel_size_;
95 float scale_factor_; 99 float scale_factor_;
96 100
101 // A GLFence marking the end of the previous frame. Must only be accessed
102 // while in a ScopedSetGLToRealGLApi, and while the associated
103 // |previous_frame_context_| is bound.
104 std::unique_ptr<gl::GLFence> previous_frame_fence_;
105 base::ScopedTypeRef<CGLContextObj> fence_context_obj_;
106
97 // The renderer ID that all contexts made current to this surface should be 107 // The renderer ID that all contexts made current to this surface should be
98 // targeting. 108 // targeting.
99 GLint gl_renderer_id_; 109 GLint gl_renderer_id_;
100 }; 110 };
101 111
102 } // namespace gpu 112 } // namespace gpu
103 113
104 #endif // GPU_IPC_SERVICE_IMAGE_TRANSPORT_SURFACE_OVERLAY_MAC_H_ 114 #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