| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "ppapi/c/ppb_image_data.h" | 10 #include "ppapi/c/ppb_image_data.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // Returns the image data format used by the browser. If the plugin uses the | 47 // Returns the image data format used by the browser. If the plugin uses the |
| 48 // same format, there is no conversion. Otherwise the browser will be in | 48 // same format, there is no conversion. Otherwise the browser will be in |
| 49 // charge of converting from a supported format to its native format. | 49 // charge of converting from a supported format to its native format. |
| 50 static PP_ImageDataFormat GetNativeImageDataFormat(); | 50 static PP_ImageDataFormat GetNativeImageDataFormat(); |
| 51 | 51 |
| 52 // Returns true if the format is supported by the browser. | 52 // Returns true if the format is supported by the browser. |
| 53 static bool IsImageDataFormatSupported(PP_ImageDataFormat format); | 53 static bool IsImageDataFormatSupported(PP_ImageDataFormat format); |
| 54 | 54 |
| 55 // Resource overrides. | 55 // Resource overrides. |
| 56 virtual ImageData* AsImageData() { return this; } | 56 virtual ImageData* AsImageData(); |
| 57 | 57 |
| 58 // PPB_ImageData implementation. | 58 // PPB_ImageData implementation. |
| 59 bool Init(PP_ImageDataFormat format, | 59 bool Init(PP_ImageDataFormat format, |
| 60 int width, int height, | 60 int width, int height, |
| 61 bool init_to_zero); | 61 bool init_to_zero); |
| 62 void Describe(PP_ImageDataDesc* desc) const; | 62 void Describe(PP_ImageDataDesc* desc) const; |
| 63 void* Map(); | 63 void* Map(); |
| 64 void Unmap(); | 64 void Unmap(); |
| 65 | 65 |
| 66 // PPB_ImageDataTrusted implementation. | 66 // PPB_ImageDataTrusted implementation. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 ImageData* image_data_; | 122 ImageData* image_data_; |
| 123 bool is_valid_; | 123 bool is_valid_; |
| 124 bool needs_unmap_; | 124 bool needs_unmap_; |
| 125 | 125 |
| 126 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper); | 126 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper); |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace pepper | 129 } // namespace pepper |
| 130 | 130 |
| 131 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_ | 131 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_ |
| OLD | NEW |