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

Side by Side Diff: content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_SUR FACE_H_
7 7
8 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h" 8 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
9 9
10 namespace gpu { 10 namespace gpu {
11 class GpuMemoryBufferManager; 11 class GpuMemoryBufferManager;
12 } 12 }
13 13
14 namespace content { 14 namespace content {
15 15
16 class BufferQueue; 16 class BufferQueue;
17 class GLHelper; 17 class GLHelper;
18 18
19 class GpuSurfacelessBrowserCompositorOutputSurface 19 class GpuSurfacelessBrowserCompositorOutputSurface
20 : public GpuBrowserCompositorOutputSurface { 20 : public GpuBrowserCompositorOutputSurface {
21 public: 21 public:
22 GpuSurfacelessBrowserCompositorOutputSurface( 22 GpuSurfacelessBrowserCompositorOutputSurface(
23 const scoped_refptr<ContextProviderCommandBuffer>& context, 23 const scoped_refptr<ContextProviderCommandBuffer>& context,
24 const scoped_refptr<ContextProviderCommandBuffer>& worker_context, 24 const scoped_refptr<ContextProviderCommandBuffer>& worker_context,
25 int surface_id, 25 int surface_id,
26 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, 26 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
27 scoped_ptr<BrowserCompositorOverlayCandidateValidator> 27 std::unique_ptr<BrowserCompositorOverlayCandidateValidator>
28 overlay_candidate_validator, 28 overlay_candidate_validator,
29 unsigned int target, 29 unsigned int target,
30 unsigned int internalformat, 30 unsigned int internalformat,
31 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); 31 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
32 ~GpuSurfacelessBrowserCompositorOutputSurface() override; 32 ~GpuSurfacelessBrowserCompositorOutputSurface() override;
33 33
34 private: 34 private:
35 // cc::OutputSurface implementation. 35 // cc::OutputSurface implementation.
36 void SwapBuffers(cc::CompositorFrame* frame) override; 36 void SwapBuffers(cc::CompositorFrame* frame) override;
37 void OnSwapBuffersComplete() override; 37 void OnSwapBuffersComplete() override;
38 void BindFramebuffer() override; 38 void BindFramebuffer() override;
39 void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override; 39 void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override;
40 bool IsDisplayedAsOverlayPlane() const override; 40 bool IsDisplayedAsOverlayPlane() const override;
41 unsigned GetOverlayTextureId() const override; 41 unsigned GetOverlayTextureId() const override;
42 42
43 // BrowserCompositorOutputSurface implementation. 43 // BrowserCompositorOutputSurface implementation.
44 void OnGpuSwapBuffersCompleted( 44 void OnGpuSwapBuffersCompleted(
45 const std::vector<ui::LatencyInfo>& latency_info, 45 const std::vector<ui::LatencyInfo>& latency_info,
46 gfx::SwapResult result) override; 46 gfx::SwapResult result) override;
47 47
48 unsigned int internalformat_; 48 unsigned int internalformat_;
49 scoped_ptr<GLHelper> gl_helper_; 49 std::unique_ptr<GLHelper> gl_helper_;
50 scoped_ptr<BufferQueue> output_surface_; 50 std::unique_ptr<BufferQueue> output_surface_;
51 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 51 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
52 }; 52 };
53 53
54 } // namespace content 54 } // namespace content
55 55
56 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_ SURFACE_H_ 56 #endif // CONTENT_BROWSER_COMPOSITOR_GPU_SURFACELESS_BROWSER_COMPOSITOR_OUTPUT_ SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698