| 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_THUNK_PPB_GRAPHICS_2D_API_H_ |
| 6 #define PPAPI_THUNK_PPB_GRAPHICS_2D_API_H_ |
| 7 |
| 5 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 6 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
| 7 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| 8 #include "ppapi/c/pp_point.h" | 11 #include "ppapi/c/pp_point.h" |
| 9 #include "ppapi/c/pp_rect.h" | 12 #include "ppapi/c/pp_rect.h" |
| 10 #include "ppapi/c/pp_resource.h" | 13 #include "ppapi/c/pp_resource.h" |
| 11 #include "ppapi/c/pp_size.h" | 14 #include "ppapi/c/pp_size.h" |
| 12 | 15 |
| 13 namespace ppapi { | 16 namespace ppapi { |
| 14 | 17 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 34 // contents (which leaves the "old" ImageData unowned), the resource ID of | 37 // contents (which leaves the "old" ImageData unowned), the resource ID of |
| 35 // the old image data will be placed into |*old_image_data| synchronously | 38 // the old image data will be placed into |*old_image_data| synchronously |
| 36 // (not when the flush callback completes). | 39 // (not when the flush callback completes). |
| 37 // | 40 // |
| 38 // When this happens, a reference to this resource will be transferred to the | 41 // When this happens, a reference to this resource will be transferred to the |
| 39 // caller. If there is no replace contents operation, old_image_data will be | 42 // caller. If there is no replace contents operation, old_image_data will be |
| 40 // ignored. If |*old_image_data| is null, then the old image data will be | 43 // ignored. If |*old_image_data| is null, then the old image data will be |
| 41 // destroyed if there was one. | 44 // destroyed if there was one. |
| 42 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback, | 45 virtual int32_t Flush(scoped_refptr<TrackedCallback> callback, |
| 43 PP_Resource* old_image_data) = 0; | 46 PP_Resource* old_image_data) = 0; |
| 47 |
| 48 // Test only |
| 49 virtual bool ReadImageData(PP_Resource image, const PP_Point* top_left) = 0; |
| 44 }; | 50 }; |
| 45 | 51 |
| 46 } // namespace thunk | 52 } // namespace thunk |
| 47 } // namespace ppapi | 53 } // namespace ppapi |
| 54 |
| 55 #endif // PPAPI_THUNK_PPB_GRAPHICS_2D_API_H_ |
| OLD | NEW |