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

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

Issue 671663002: Standardize usage of virtual/override/final in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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_CALAYER_MAC_H_ 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_ 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_CALAYER_MAC_H_
7 7
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "content/common/gpu/image_transport_surface_fbo_mac.h" 9 #include "content/common/gpu/image_transport_surface_fbo_mac.h"
10 #include "ui/base/cocoa/remote_layer_api.h" 10 #include "ui/base/cocoa/remote_layer_api.h"
11 #include "ui/gl/gl_bindings.h" 11 #include "ui/gl/gl_bindings.h"
12 #include "ui/gl/scoped_cgl.h" 12 #include "ui/gl/scoped_cgl.h"
13 13
14 @class ImageTransportLayer; 14 @class ImageTransportLayer;
15 15
16 namespace content { 16 namespace content {
17 17
18 // Allocate CAOpenGLLayer-backed storage for an FBO image transport surface. 18 // Allocate CAOpenGLLayer-backed storage for an FBO image transport surface.
19 class CALayerStorageProvider 19 class CALayerStorageProvider
20 : public ImageTransportSurfaceFBO::StorageProvider { 20 : public ImageTransportSurfaceFBO::StorageProvider {
21 public: 21 public:
22 CALayerStorageProvider(ImageTransportSurfaceFBO* transport_surface); 22 CALayerStorageProvider(ImageTransportSurfaceFBO* transport_surface);
23 virtual ~CALayerStorageProvider(); 23 ~CALayerStorageProvider() override;
24 24
25 // ImageTransportSurfaceFBO::StorageProvider implementation: 25 // ImageTransportSurfaceFBO::StorageProvider implementation:
26 virtual gfx::Size GetRoundedSize(gfx::Size size) override; 26 gfx::Size GetRoundedSize(gfx::Size size) override;
27 virtual bool AllocateColorBufferStorage( 27 bool AllocateColorBufferStorage(CGLContextObj context,
28 CGLContextObj context, GLuint texture, 28 GLuint texture,
29 gfx::Size pixel_size, float scale_factor) override; 29 gfx::Size pixel_size,
30 virtual void FreeColorBufferStorage() override; 30 float scale_factor) override;
31 virtual void SwapBuffers(const gfx::Size& size, float scale_factor) override; 31 void FreeColorBufferStorage() override;
32 virtual void WillWriteToBackbuffer() override; 32 void SwapBuffers(const gfx::Size& size, float scale_factor) override;
33 virtual void DiscardBackbuffer() override; 33 void WillWriteToBackbuffer() override;
34 virtual void SwapBuffersAckedByBrowser(bool disable_throttling) override; 34 void DiscardBackbuffer() override;
35 void SwapBuffersAckedByBrowser(bool disable_throttling) override;
35 36
36 // Interface to ImageTransportLayer: 37 // Interface to ImageTransportLayer:
37 CGLContextObj LayerShareGroupContext(); 38 CGLContextObj LayerShareGroupContext();
38 bool LayerCanDraw(); 39 bool LayerCanDraw();
39 void LayerDoDraw(); 40 void LayerDoDraw();
40 void LayerResetStorageProvider(); 41 void LayerResetStorageProvider();
41 42
42 private: 43 private:
43 void DrawImmediatelyAndUnblockBrowser(); 44 void DrawImmediatelyAndUnblockBrowser();
44 45
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 // Weak factory against which a timeout task for forcing a draw is created. 79 // Weak factory against which a timeout task for forcing a draw is created.
79 base::WeakPtrFactory<CALayerStorageProvider> pending_draw_weak_factory_; 80 base::WeakPtrFactory<CALayerStorageProvider> pending_draw_weak_factory_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(CALayerStorageProvider); 82 DISALLOW_COPY_AND_ASSIGN(CALayerStorageProvider);
82 }; 83 };
83 84
84 } // namespace content 85 } // namespace content
85 86
86 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_CALAYER_MAC_H_ 87 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_CALAYER_MAC_H_
OLDNEW
« no previous file with comments | « content/common/gpu/image_transport_surface.h ('k') | content/common/gpu/image_transport_surface_fbo_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698