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

Side by Side Diff: components/mus/surfaces/surfaces_context_provider.h

Issue 1893853002: Use unique_ptr in more parts of mus code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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 COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ 5 #ifndef COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
6 #define COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ 6 #define COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory>
11
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
13 #include "base/threading/non_thread_safe.h" 14 #include "base/threading/non_thread_safe.h"
14 #include "cc/output/context_provider.h" 15 #include "cc/output/context_provider.h"
15 #include "components/mus/gles2/command_buffer_local_client.h" 16 #include "components/mus/gles2/command_buffer_local_client.h"
16 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
17 #include "ui/gl/gl_surface.h" 18 #include "ui/gl/gl_surface.h"
18 19
19 namespace gpu { 20 namespace gpu {
20 21
21 class TransferBuffer; 22 class TransferBuffer;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 friend class base::RefCountedThreadSafe<SurfacesContextProvider>; 66 friend class base::RefCountedThreadSafe<SurfacesContextProvider>;
66 ~SurfacesContextProvider() override; 67 ~SurfacesContextProvider() override;
67 68
68 private: 69 private:
69 // CommandBufferLocalClient: 70 // CommandBufferLocalClient:
70 void UpdateVSyncParameters(int64_t timebase, int64_t interval) override; 71 void UpdateVSyncParameters(int64_t timebase, int64_t interval) override;
71 void GpuCompletedSwapBuffers(gfx::SwapResult result) override; 72 void GpuCompletedSwapBuffers(gfx::SwapResult result) override;
72 73
73 // From GLES2Context: 74 // From GLES2Context:
74 // Initialized in BindToCurrentThread. 75 // Initialized in BindToCurrentThread.
75 scoped_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_; 76 std::unique_ptr<gpu::gles2::GLES2CmdHelper> gles2_helper_;
76 scoped_ptr<gpu::TransferBuffer> transfer_buffer_; 77 std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
77 scoped_ptr<gpu::gles2::GLES2Implementation> implementation_; 78 std::unique_ptr<gpu::gles2::GLES2Implementation> implementation_;
78 79
79 cc::ContextProvider::Capabilities capabilities_; 80 cc::ContextProvider::Capabilities capabilities_;
80 LostContextCallback lost_context_callback_; 81 LostContextCallback lost_context_callback_;
81 82
82 SurfacesContextProviderDelegate* delegate_; 83 SurfacesContextProviderDelegate* delegate_;
83 gfx::AcceleratedWidget widget_; 84 gfx::AcceleratedWidget widget_;
84 CommandBufferLocal* command_buffer_local_; 85 CommandBufferLocal* command_buffer_local_;
85 86
86 gfx::GLSurface::SwapCompletionCallback swap_buffers_completion_callback_; 87 gfx::GLSurface::SwapCompletionCallback swap_buffers_completion_callback_;
87 88
88 base::Lock context_lock_; 89 base::Lock context_lock_;
89 90
90 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider); 91 DISALLOW_COPY_AND_ASSIGN(SurfacesContextProvider);
91 }; 92 };
92 93
93 } // namespace mus 94 } // namespace mus
94 95
95 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_ 96 #endif // COMPONENTS_MUS_SURFACES_SURFACES_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/mus/surfaces/direct_output_surface.h ('k') | components/mus/surfaces/surfaces_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698