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

Side by Side Diff: ui/gl/gl_context.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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
« no previous file with comments | « ui/gl/gl_api_unittest.cc ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_GL_GL_CONTEXT_H_ 5 #ifndef UI_GL_GL_CONTEXT_H_
6 #define UI_GL_GL_CONTEXT_H_ 6 #define UI_GL_GL_CONTEXT_H_
7 7
8 #include <memory>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/cancelable_callback.h" 12 #include "base/cancelable_callback.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "base/synchronization/cancellation_flag.h" 15 #include "base/synchronization/cancellation_flag.h"
16 #include "ui/gl/gl_share_group.h" 16 #include "ui/gl/gl_share_group.h"
17 #include "ui/gl/gl_state_restorer.h" 17 #include "ui/gl/gl_state_restorer.h"
18 #include "ui/gl/gpu_preference.h" 18 #include "ui/gl/gpu_preference.h"
19 19
20 namespace gpu { 20 namespace gpu {
21 class GLContextVirtual; 21 class GLContextVirtual;
22 } // namespace gpu 22 } // namespace gpu
23 23
24 namespace gfx { 24 namespace gfx {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 void SetStateWasDirtiedExternally(bool dirtied_externally); 168 void SetStateWasDirtiedExternally(bool dirtied_externally);
169 169
170 private: 170 private:
171 friend class base::RefCounted<GLContext>; 171 friend class base::RefCounted<GLContext>;
172 172
173 // For GetRealCurrent. 173 // For GetRealCurrent.
174 friend class VirtualGLApi; 174 friend class VirtualGLApi;
175 friend class gpu::GLContextVirtual; 175 friend class gpu::GLContextVirtual;
176 176
177 scoped_refptr<GLShareGroup> share_group_; 177 scoped_refptr<GLShareGroup> share_group_;
178 scoped_ptr<VirtualGLApi> virtual_gl_api_; 178 std::unique_ptr<VirtualGLApi> virtual_gl_api_;
179 bool state_dirtied_externally_; 179 bool state_dirtied_externally_;
180 scoped_ptr<GLStateRestorer> state_restorer_; 180 std::unique_ptr<GLStateRestorer> state_restorer_;
181 scoped_ptr<GLVersionInfo> version_info_; 181 std::unique_ptr<GLVersionInfo> version_info_;
182 182
183 int swap_interval_; 183 int swap_interval_;
184 bool force_swap_interval_zero_; 184 bool force_swap_interval_zero_;
185 185
186 base::CancelableCallback<void()> state_dirtied_callback_; 186 base::CancelableCallback<void()> state_dirtied_callback_;
187 187
188 DISALLOW_COPY_AND_ASSIGN(GLContext); 188 DISALLOW_COPY_AND_ASSIGN(GLContext);
189 }; 189 };
190 190
191 class GL_EXPORT GLContextReal : public GLContext { 191 class GL_EXPORT GLContextReal : public GLContext {
192 public: 192 public:
193 explicit GLContextReal(GLShareGroup* share_group); 193 explicit GLContextReal(GLShareGroup* share_group);
194 scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() override; 194 scoped_refptr<gfx::GPUTimingClient> CreateGPUTimingClient() override;
195 195
196 protected: 196 protected:
197 ~GLContextReal() override; 197 ~GLContextReal() override;
198 198
199 void SetCurrent(GLSurface* surface) override; 199 void SetCurrent(GLSurface* surface) override;
200 200
201 private: 201 private:
202 scoped_ptr<gfx::GPUTiming> gpu_timing_; 202 std::unique_ptr<gfx::GPUTiming> gpu_timing_;
203 DISALLOW_COPY_AND_ASSIGN(GLContextReal); 203 DISALLOW_COPY_AND_ASSIGN(GLContextReal);
204 }; 204 };
205 205
206 } // namespace gfx 206 } // namespace gfx
207 207
208 #endif // UI_GL_GL_CONTEXT_H_ 208 #endif // UI_GL_GL_CONTEXT_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_api_unittest.cc ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698