OLD | NEW |
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_WIN_H_ | 5 #ifndef CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ |
6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ | 6 #define CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void Resize(const gfx::Size& viewport_pixel_size, | 56 void Resize(const gfx::Size& viewport_pixel_size, |
57 float scale_factor) override; | 57 float scale_factor) override; |
58 SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override; | 58 SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override; |
59 void EndPaint() override; | 59 void EndPaint() override; |
60 | 60 |
61 gfx::Size viewport_pixel_size() const { return viewport_pixel_size_; } | 61 gfx::Size viewport_pixel_size() const { return viewport_pixel_size_; } |
62 void ReleaseContents(); | 62 void ReleaseContents(); |
63 | 63 |
64 private: | 64 private: |
65 HWND hwnd_; | 65 HWND hwnd_; |
66 sk_sp<SkCanvas> contents_; | 66 std::unique_ptr<SkCanvas> contents_; |
67 bool is_hwnd_composited_; | 67 bool is_hwnd_composited_; |
68 OutputDeviceBacking* backing_; | 68 OutputDeviceBacking* backing_; |
69 bool in_paint_; | 69 bool in_paint_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceWin); | 71 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceWin); |
72 }; | 72 }; |
73 | 73 |
74 } // namespace content | 74 } // namespace content |
75 | 75 |
76 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ | 76 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ |
OLD | NEW |