| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   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. | 
|   67   uint64 GetNativeMemoryHandle(uint32* byte_count) const; |   67   int GetSharedMemoryHandle(uint32* byte_count) const; | 
|   68  |   68  | 
|   69   // The mapped bitmap and canvas will be NULL if the image is not mapped. |   69   // The mapped bitmap and canvas will be NULL if the image is not mapped. | 
|   70   skia::PlatformCanvas* mapped_canvas() const { return mapped_canvas_.get(); } |   70   skia::PlatformCanvas* mapped_canvas() const { return mapped_canvas_.get(); } | 
|   71   const SkBitmap* GetMappedBitmap() const; |   71   const SkBitmap* GetMappedBitmap() const; | 
|   72  |   72  | 
|   73   // Swaps the guts of this image data with another. |   73   // Swaps the guts of this image data with another. | 
|   74   void Swap(ImageData* other); |   74   void Swap(ImageData* other); | 
|   75  |   75  | 
|   76  private: |   76  private: | 
|   77   // This will be NULL before initialization, and if this ImageData is |   77   // This will be NULL before initialization, and if this ImageData is | 
| (...skipping 44 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 |