| 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 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 5 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
| 6 | 6 |
| 7 #include <string.h> // For memset. | 7 #include <string.h> // For memset. |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void PaintImageData(PP_Resource image_data, | 42 void PaintImageData(PP_Resource image_data, |
| 43 const PP_Point* top_left, | 43 const PP_Point* top_left, |
| 44 const PP_Rect* src_rect); | 44 const PP_Rect* src_rect); |
| 45 void Scroll(const PP_Rect* clip_rect, | 45 void Scroll(const PP_Rect* clip_rect, |
| 46 const PP_Point* amount); | 46 const PP_Point* amount); |
| 47 void ReplaceContents(PP_Resource image_data); | 47 void ReplaceContents(PP_Resource image_data); |
| 48 bool SetScale(float scale); | 48 bool SetScale(float scale); |
| 49 float GetScale(); | 49 float GetScale(); |
| 50 int32_t Flush(scoped_refptr<TrackedCallback> callback, | 50 int32_t Flush(scoped_refptr<TrackedCallback> callback, |
| 51 PP_Resource* old_image_data); | 51 PP_Resource* old_image_data); |
| 52 // Test only |
| 53 bool ReadImageData(PP_Resource image, const PP_Point* top_left) { |
| 54 return false; |
| 55 } |
| 52 | 56 |
| 53 // Notification that the host has sent an ACK for a pending Flush. | 57 // Notification that the host has sent an ACK for a pending Flush. |
| 54 void FlushACK(int32_t result_code); | 58 void FlushACK(int32_t result_code); |
| 55 | 59 |
| 56 private: | 60 private: |
| 57 PluginDispatcher* GetDispatcher() const { | 61 PluginDispatcher* GetDispatcher() const { |
| 58 return PluginDispatcher::GetForResource(this); | 62 return PluginDispatcher::GetForResource(this); |
| 59 } | 63 } |
| 60 | 64 |
| 61 static const ApiID kApiID = API_ID_PPB_GRAPHICS_2D; | 65 static const ApiID kApiID = API_ID_PPB_GRAPHICS_2D; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 | 304 |
| 301 void PPB_Graphics2D_Proxy::SendFlushACKToPlugin( | 305 void PPB_Graphics2D_Proxy::SendFlushACKToPlugin( |
| 302 int32_t result, | 306 int32_t result, |
| 303 const HostResource& graphics_2d) { | 307 const HostResource& graphics_2d) { |
| 304 dispatcher()->Send(new PpapiMsg_PPBGraphics2D_FlushACK(kApiID, graphics_2d, | 308 dispatcher()->Send(new PpapiMsg_PPBGraphics2D_FlushACK(kApiID, graphics_2d, |
| 305 result)); | 309 result)); |
| 306 } | 310 } |
| 307 | 311 |
| 308 } // namespace proxy | 312 } // namespace proxy |
| 309 } // namespace ppapi | 313 } // namespace ppapi |
| OLD | NEW |