| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // In the plugin, this is the current callback set for Flushes. When the | 61 // In the plugin, this is the current callback set for Flushes. When the |
| 62 // pointer is non-NULL, we're waiting for a flush ACK. | 62 // pointer is non-NULL, we're waiting for a flush ACK. |
| 63 scoped_refptr<TrackedCallback> current_flush_callback_; | 63 scoped_refptr<TrackedCallback> current_flush_callback_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(Graphics2D); | 65 DISALLOW_COPY_AND_ASSIGN(Graphics2D); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 Graphics2D::Graphics2D(const HostResource& host_resource, | 68 Graphics2D::Graphics2D(const HostResource& host_resource, |
| 69 const PP_Size& size, | 69 const PP_Size& size, |
| 70 PP_Bool is_always_opaque) | 70 PP_Bool is_always_opaque) |
| 71 : Resource(host_resource), | 71 : Resource(OBJECT_IS_PROXY, host_resource), |
| 72 size_(size), | 72 size_(size), |
| 73 is_always_opaque_(is_always_opaque) { | 73 is_always_opaque_(is_always_opaque) { |
| 74 } | 74 } |
| 75 | 75 |
| 76 Graphics2D::~Graphics2D() { | 76 Graphics2D::~Graphics2D() { |
| 77 } | 77 } |
| 78 | 78 |
| 79 PPB_Graphics2D_API* Graphics2D::AsPPB_Graphics2D_API() { | 79 PPB_Graphics2D_API* Graphics2D::AsPPB_Graphics2D_API() { |
| 80 return this; | 80 return this; |
| 81 } | 81 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 void PPB_Graphics2D_Proxy::SendFlushACKToPlugin( | 255 void PPB_Graphics2D_Proxy::SendFlushACKToPlugin( |
| 256 int32_t result, | 256 int32_t result, |
| 257 const HostResource& graphics_2d) { | 257 const HostResource& graphics_2d) { |
| 258 dispatcher()->Send(new PpapiMsg_PPBGraphics2D_FlushACK(kApiID, graphics_2d, | 258 dispatcher()->Send(new PpapiMsg_PPBGraphics2D_FlushACK(kApiID, graphics_2d, |
| 259 result)); | 259 result)); |
| 260 } | 260 } |
| 261 | 261 |
| 262 } // namespace proxy | 262 } // namespace proxy |
| 263 } // namespace ppapi | 263 } // namespace ppapi |
| OLD | NEW |