Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: webkit/plugins/ppapi/ppb_image_data_impl.h

Issue 10823378: Cache image data objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/ppb_graphics_2d_impl.cc ('k') | webkit/plugins/ppapi/ppb_image_data_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698