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

Side by Side Diff: content/browser/renderer_host/compositing_iosurface_layer_mac.h

Issue 316103004: Mac ÜC: Enable GPU back-pressure from the browser to the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dip
Patch Set: Simplify Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 13
14 namespace content { 14 namespace content {
15 class CompositingIOSurfaceMac; 15 class CompositingIOSurfaceMac;
16 class CompositingIOSurfaceContext; 16 class CompositingIOSurfaceContext;
17 class CompositingIOSurfaceLayerHelper; 17 class CompositingIOSurfaceLayerHelper;
18 18
19 class CompositingIOSurfaceLayerClient { 19 class CompositingIOSurfaceLayerClient {
20 public: 20 public:
21 virtual void AcceleratedLayerDidDrawFrame(bool succeeded) = 0; 21 virtual void AcceleratedLayerDidDrawFrame(bool succeeded) = 0;
22 }; 22 };
23 23
24 } 24 } // namespace content
25 25
26 // The CoreAnimation layer for drawing accelerated content. 26 // The CoreAnimation layer for drawing accelerated content.
27 @interface CompositingIOSurfaceLayer : CAOpenGLLayer { 27 @interface CompositingIOSurfaceLayer : CAOpenGLLayer {
28 @private 28 @private
29 content::CompositingIOSurfaceLayerClient* client_; 29 content::CompositingIOSurfaceLayerClient* client_;
30 scoped_refptr<content::CompositingIOSurfaceMac> iosurface_; 30 scoped_refptr<content::CompositingIOSurfaceMac> iosurface_;
31 scoped_refptr<content::CompositingIOSurfaceContext> context_; 31 scoped_refptr<content::CompositingIOSurfaceContext> context_;
32 32
33 // The browser places back-pressure on the GPU by not acknowledging swap 33 // The browser places back-pressure on the GPU by not acknowledging swap
34 // calls until they appear on the screen. This can lead to hangs if the 34 // calls until they appear on the screen. This can lead to hangs if the
(...skipping 25 matching lines...) Expand all
60 60
61 // Mark that the client is no longer valid and cannot be called back into. 61 // Mark that the client is no longer valid and cannot be called back into.
62 - (void)resetClient; 62 - (void)resetClient;
63 63
64 // Called when a new frame is received. 64 // Called when a new frame is received.
65 - (void)gotNewFrame; 65 - (void)gotNewFrame;
66 66
67 @end 67 @end
68 68
69 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_ 69 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITING_IOSURFACE_LAYER_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698