OLD | NEW |
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 PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 5 #ifndef PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
6 #define PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 6 #define PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void Unmap() override; | 97 void Unmap() override; |
98 SkCanvas* GetPlatformCanvas() override; | 98 SkCanvas* GetPlatformCanvas() override; |
99 SkCanvas* GetCanvas() override; | 99 SkCanvas* GetCanvas() override; |
100 | 100 |
101 static ImageHandle NullHandle(); | 101 static ImageHandle NullHandle(); |
102 | 102 |
103 private: | 103 private: |
104 std::unique_ptr<TransportDIB> transport_dib_; | 104 std::unique_ptr<TransportDIB> transport_dib_; |
105 | 105 |
106 // Null when the image isn't mapped. | 106 // Null when the image isn't mapped. |
107 sk_sp<SkCanvas> mapped_canvas_; | 107 std::unique_ptr<SkCanvas> mapped_canvas_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(PlatformImageData); | 109 DISALLOW_COPY_AND_ASSIGN(PlatformImageData); |
110 }; | 110 }; |
111 #endif // !defined(OS_NACL) | 111 #endif // !defined(OS_NACL) |
112 | 112 |
113 // SimpleImageData is a simple, platform-independent image data resource which | 113 // SimpleImageData is a simple, platform-independent image data resource which |
114 // can be used by NaCl. It can also be used by trusted apps when access to the | 114 // can be used by NaCl. It can also be used by trusted apps when access to the |
115 // platform canvas isn't needed. | 115 // platform canvas isn't needed. |
116 class PPAPI_PROXY_EXPORT SimpleImageData : public ImageData { | 116 class PPAPI_PROXY_EXPORT SimpleImageData : public ImageData { |
117 public: | 117 public: |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 // Host->Plugin message handlers. | 191 // Host->Plugin message handlers. |
192 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); | 192 void OnPluginMsgNotifyUnusedImageData(const HostResource& old_image_data); |
193 | 193 |
194 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); | 194 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Proxy); |
195 }; | 195 }; |
196 | 196 |
197 } // namespace proxy | 197 } // namespace proxy |
198 } // namespace ppapi | 198 } // namespace ppapi |
199 | 199 |
200 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ | 200 #endif // PPAPI_PPB_IMAGE_DATA_PROXY_H_ |
OLD | NEW |