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

Side by Side Diff: content/browser/compositor/gl_helper.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 (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 CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_
6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_
7 7
8 #include <memory>
9
8 #include "base/atomicops.h" 10 #include "base/atomicops.h"
9 #include "base/callback.h" 11 #include "base/callback.h"
10 #include "base/macros.h" 12 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 #include "gpu/command_buffer/client/gles2_interface.h" 14 #include "gpu/command_buffer/client/gles2_interface.h"
14 #include "gpu/command_buffer/common/mailbox_holder.h" 15 #include "gpu/command_buffer/common/mailbox_holder.h"
15 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
16 17
17 namespace gfx { 18 namespace gfx {
18 class Point; 19 class Point;
19 class Rect; 20 class Rect;
20 class Size; 21 class Size;
21 } 22 }
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 336
336 // Creates |copy_texture_to_impl_| if NULL. 337 // Creates |copy_texture_to_impl_| if NULL.
337 void InitCopyTextToImpl(); 338 void InitCopyTextToImpl();
338 // Creates |scaler_impl_| if NULL. 339 // Creates |scaler_impl_| if NULL.
339 void InitScalerImpl(); 340 void InitScalerImpl();
340 341
341 enum ReadbackSwizzle { kSwizzleNone = 0, kSwizzleBGRA }; 342 enum ReadbackSwizzle { kSwizzleNone = 0, kSwizzleBGRA };
342 343
343 gpu::gles2::GLES2Interface* gl_; 344 gpu::gles2::GLES2Interface* gl_;
344 gpu::ContextSupport* context_support_; 345 gpu::ContextSupport* context_support_;
345 scoped_ptr<CopyTextureToImpl> copy_texture_to_impl_; 346 std::unique_ptr<CopyTextureToImpl> copy_texture_to_impl_;
346 scoped_ptr<GLHelperScaling> scaler_impl_; 347 std::unique_ptr<GLHelperScaling> scaler_impl_;
347 scoped_ptr<GLHelperReadbackSupport> readback_support_; 348 std::unique_ptr<GLHelperReadbackSupport> readback_support_;
348 349
349 DISALLOW_COPY_AND_ASSIGN(GLHelper); 350 DISALLOW_COPY_AND_ASSIGN(GLHelper);
350 }; 351 };
351 352
352 // Similar to a ScalerInterface, a yuv readback pipeline will 353 // Similar to a ScalerInterface, a yuv readback pipeline will
353 // cache a scaler and all intermediate textures and frame buffers 354 // cache a scaler and all intermediate textures and frame buffers
354 // needed to scale, crop, letterbox and read back a texture from 355 // needed to scale, crop, letterbox and read back a texture from
355 // the GPU into CPU-accessible RAM. A single readback pipeline 356 // the GPU into CPU-accessible RAM. A single readback pipeline
356 // can handle multiple outstanding readbacks at the same time, but 357 // can handle multiple outstanding readbacks at the same time, but
357 // if the source or destination sizes change, you'll need to create 358 // if the source or destination sizes change, you'll need to create
(...skipping 12 matching lines...) Expand all
370 const gpu::SyncToken& sync_token, 371 const gpu::SyncToken& sync_token,
371 const scoped_refptr<media::VideoFrame>& target, 372 const scoped_refptr<media::VideoFrame>& target,
372 const gfx::Point& paste_location, 373 const gfx::Point& paste_location,
373 const base::Callback<void(bool)>& callback) = 0; 374 const base::Callback<void(bool)>& callback) = 0;
374 virtual GLHelper::ScalerInterface* scaler() = 0; 375 virtual GLHelper::ScalerInterface* scaler() = 0;
375 }; 376 };
376 377
377 } // namespace content 378 } // namespace content
378 379
379 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_ 380 #endif // CONTENT_BROWSER_COMPOSITOR_GL_HELPER_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/buffer_queue_unittest.cc ('k') | content/browser/compositor/gl_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698