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

Side by Side Diff: content/common/gpu/image_transport_surface_fbo_mac.h

Issue 505053002: Fix assorted issues with remote CoreAnimation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean_up_accel_layers
Patch Set: Clean up timer logic Created 6 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_FBO_MAC_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_FBO_MAC_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_FBO_MAC_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_FBO_MAC_H_
7 7
8 #include "base/mac/scoped_cftyperef.h" 8 #include "base/mac/scoped_cftyperef.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/gpu/gpu_command_buffer_stub.h" 10 #include "content/common/gpu/gpu_command_buffer_stub.h"
(...skipping 23 matching lines...) Expand all
34 // Allocate the storage for the color buffer. The specified context is 34 // Allocate the storage for the color buffer. The specified context is
35 // current, and there is a texture bound to GL_TEXTURE_RECTANGLE_ARB. 35 // current, and there is a texture bound to GL_TEXTURE_RECTANGLE_ARB.
36 virtual bool AllocateColorBufferStorage( 36 virtual bool AllocateColorBufferStorage(
37 CGLContextObj context, GLuint texture, 37 CGLContextObj context, GLuint texture,
38 gfx::Size size, float scale_factor) = 0; 38 gfx::Size size, float scale_factor) = 0;
39 39
40 // Free the storage allocated in the AllocateColorBufferStorage call. The 40 // Free the storage allocated in the AllocateColorBufferStorage call. The
41 // GL texture that was bound has already been deleted by the caller. 41 // GL texture that was bound has already been deleted by the caller.
42 virtual void FreeColorBufferStorage() = 0; 42 virtual void FreeColorBufferStorage() = 0;
43 43
44 // Retrieve the handle for the surface to send to the browser process to 44 // Indicate that the backbuffer has been discarded and should not be seen
45 // display. 45 // again.
46 virtual uint64 GetSurfaceHandle() const = 0; 46 virtual void DiscardBackbuffer() = 0;
47 47
48 // Called when a new frame has been rendered into the texture, and the 48 // Swap buffers and return the handle for the surface to send to the browser
49 // browser is about to be sent the surface to display. 49 // process to display.
50 virtual void WillSwapBuffers() = 0; 50 virtual uint64 SwapBuffersAndGetSurfaceHandle() = 0;
51 51
52 // Called once for every WillSwapBuffers call when the buffer that was sent 52 // Called once for every WillSwapBuffers call when the buffer that was sent
53 // to the browser may be released by the GPU process (this may be because 53 // to the browser may be released by the GPU process (this may be because
54 // the browser is holding a reference, in which case this will come 54 // the browser is holding a reference, in which case this will come
55 // quickly, or it may be because the browser is done with the surface, in 55 // quickly, or it may be because the browser is done with the surface, in
56 // which case it will come much later). 56 // which case it will come much later).
57 virtual void CanFreeSwappedBuffer() = 0; 57 virtual void CanFreeSwappedBuffer() = 0;
58 }; 58 };
59 59
60 ImageTransportSurfaceFBO(GpuChannelManager* manager, 60 ImageTransportSurfaceFBO(GpuChannelManager* manager,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 std::vector<ui::LatencyInfo> latency_info_; 129 std::vector<ui::LatencyInfo> latency_info_;
130 130
131 scoped_ptr<ImageTransportHelper> helper_; 131 scoped_ptr<ImageTransportHelper> helper_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(ImageTransportSurfaceFBO); 133 DISALLOW_COPY_AND_ASSIGN(ImageTransportSurfaceFBO);
134 }; 134 };
135 135
136 } // namespace content 136 } // namespace content
137 137
138 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_MAC_H_ 138 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_MAC_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface_calayer_mac.mm ('k') | content/common/gpu/image_transport_surface_fbo_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698