| 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 WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "ppapi/c/ppb_image_data.h" | 10 #include "ppapi/c/ppb_image_data.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // PPB_ImageData_API implementation. | 90 // PPB_ImageData_API implementation. |
| 91 virtual PP_Bool Describe(PP_ImageDataDesc* desc) OVERRIDE; | 91 virtual PP_Bool Describe(PP_ImageDataDesc* desc) OVERRIDE; |
| 92 virtual void* Map() OVERRIDE; | 92 virtual void* Map() OVERRIDE; |
| 93 virtual void Unmap() OVERRIDE; | 93 virtual void Unmap() OVERRIDE; |
| 94 virtual int32_t GetSharedMemory(int* handle, uint32_t* byte_count) OVERRIDE; | 94 virtual int32_t GetSharedMemory(int* handle, uint32_t* byte_count) OVERRIDE; |
| 95 virtual skia::PlatformCanvas* GetPlatformCanvas() OVERRIDE; | 95 virtual skia::PlatformCanvas* GetPlatformCanvas() OVERRIDE; |
| 96 virtual SkCanvas* GetCanvas() OVERRIDE; | 96 virtual SkCanvas* GetCanvas() OVERRIDE; |
| 97 | 97 |
| 98 const SkBitmap* GetMappedBitmap() const; | 98 const SkBitmap* GetMappedBitmap() const; |
| 99 | 99 |
| 100 // Swaps the guts of this image data with another. | |
| 101 void Swap(PPB_ImageData_Impl* other); | |
| 102 | |
| 103 private: | 100 private: |
| 104 PP_ImageDataFormat format_; | 101 PP_ImageDataFormat format_; |
| 105 int width_; | 102 int width_; |
| 106 int height_; | 103 int height_; |
| 107 scoped_ptr<Backend> backend_; | 104 scoped_ptr<Backend> backend_; |
| 108 | 105 |
| 109 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Impl); | 106 DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Impl); |
| 110 }; | 107 }; |
| 111 | 108 |
| 112 class ImageDataPlatformBackend : public PPB_ImageData_Impl::Backend { | 109 class ImageDataPlatformBackend : public PPB_ImageData_Impl::Backend { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 bool is_valid_; | 197 bool is_valid_; |
| 201 bool needs_unmap_; | 198 bool needs_unmap_; |
| 202 | 199 |
| 203 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper); | 200 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper); |
| 204 }; | 201 }; |
| 205 | 202 |
| 206 } // namespace ppapi | 203 } // namespace ppapi |
| 207 } // namespace webkit | 204 } // namespace webkit |
| 208 | 205 |
| 209 #endif // WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ | 206 #endif // WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ |
| OLD | NEW |