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

Side by Side Diff: content/browser/compositor/software_output_device_ozone.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_SOFTWARE_OUTPUT_DEVICE_OZONE_H_ 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_
6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_ 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/output/software_output_device.h" 11 #include "cc/output/software_output_device.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 14
14 namespace ui { 15 namespace ui {
15 class Compositor; 16 class Compositor;
16 class SurfaceOzoneCanvas; 17 class SurfaceOzoneCanvas;
17 } 18 }
18 19
19 namespace content { 20 namespace content {
20 21
21 // Ozone implementation which relies on software rendering. Ozone will present 22 // Ozone implementation which relies on software rendering. Ozone will present
22 // an accelerated widget as a SkCanvas. SoftwareOutputDevice will then use the 23 // an accelerated widget as a SkCanvas. SoftwareOutputDevice will then use the
23 // Ozone provided canvas to draw. 24 // Ozone provided canvas to draw.
24 class CONTENT_EXPORT SoftwareOutputDeviceOzone 25 class CONTENT_EXPORT SoftwareOutputDeviceOzone
25 : public cc::SoftwareOutputDevice { 26 : public cc::SoftwareOutputDevice {
26 public: 27 public:
27 static scoped_ptr<SoftwareOutputDeviceOzone> Create( 28 static std::unique_ptr<SoftwareOutputDeviceOzone> Create(
28 ui::Compositor* compositor); 29 ui::Compositor* compositor);
29 ~SoftwareOutputDeviceOzone() override; 30 ~SoftwareOutputDeviceOzone() override;
30 31
31 void Resize(const gfx::Size& viewport_pixel_size, 32 void Resize(const gfx::Size& viewport_pixel_size,
32 float scale_factor) override; 33 float scale_factor) override;
33 SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override; 34 SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override;
34 void EndPaint() override; 35 void EndPaint() override;
35 36
36 private: 37 private:
37 explicit SoftwareOutputDeviceOzone(ui::Compositor* compositor); 38 explicit SoftwareOutputDeviceOzone(ui::Compositor* compositor);
38 ui::Compositor* compositor_; 39 ui::Compositor* compositor_;
39 40
40 scoped_ptr<ui::SurfaceOzoneCanvas> surface_ozone_; 41 std::unique_ptr<ui::SurfaceOzoneCanvas> surface_ozone_;
41 42
42 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceOzone); 43 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceOzone);
43 }; 44 };
44 45
45 } // namespace content 46 } // namespace content
46 47
47 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_ 48 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_OZONE_H_
OLDNEW
« no previous file with comments | « content/browser/compositor/software_output_device_mus.cc ('k') | content/browser/compositor/software_output_device_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698