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 <windows.h> | 8 #include <windows.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "cc/output/software_output_device.h" | 15 #include "cc/output/software_output_device.h" |
| 16 #include "third_party/skia/include/core/SkCanvas.h" |
| 17 #include "third_party/skia/include/core/SkRefCnt.h" |
16 | 18 |
17 namespace base { | 19 namespace base { |
18 class SharedMemory; | 20 class SharedMemory; |
19 } | 21 } |
20 | 22 |
21 namespace ui { | 23 namespace ui { |
22 class Compositor; | 24 class Compositor; |
23 } | 25 } |
24 | 26 |
25 namespace content { | 27 namespace content { |
(...skipping 28 matching lines...) Expand all Loading... |
54 void Resize(const gfx::Size& viewport_pixel_size, | 56 void Resize(const gfx::Size& viewport_pixel_size, |
55 float scale_factor) override; | 57 float scale_factor) override; |
56 SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override; | 58 SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override; |
57 void EndPaint() override; | 59 void EndPaint() override; |
58 | 60 |
59 gfx::Size viewport_pixel_size() const { return viewport_pixel_size_; } | 61 gfx::Size viewport_pixel_size() const { return viewport_pixel_size_; } |
60 void ReleaseContents(); | 62 void ReleaseContents(); |
61 | 63 |
62 private: | 64 private: |
63 HWND hwnd_; | 65 HWND hwnd_; |
64 skia::RefPtr<SkCanvas> contents_; | 66 sk_sp<SkCanvas> contents_; |
65 bool is_hwnd_composited_; | 67 bool is_hwnd_composited_; |
66 OutputDeviceBacking* backing_; | 68 OutputDeviceBacking* backing_; |
67 bool in_paint_; | 69 bool in_paint_; |
68 | 70 |
69 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceWin); | 71 DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceWin); |
70 }; | 72 }; |
71 | 73 |
72 } // namespace content | 74 } // namespace content |
73 | 75 |
74 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ | 76 #endif // CONTENT_BROWSER_COMPOSITOR_SOFTWARE_OUTPUT_DEVICE_WIN_H_ |
OLD | NEW |