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 WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 public: | 164 public: |
165 virtual ~PlatformContext3D() {} | 165 virtual ~PlatformContext3D() {} |
166 | 166 |
167 // Initialize the context. | 167 // Initialize the context. |
168 virtual bool Init(const int32* attrib_list) = 0; | 168 virtual bool Init(const int32* attrib_list) = 0; |
169 | 169 |
170 // If the plugin instance is backed by an OpenGL, return its ID in the | 170 // If the plugin instance is backed by an OpenGL, return its ID in the |
171 // compositors namespace. Otherwise return 0. Returns 0 by default. | 171 // compositors namespace. Otherwise return 0. Returns 0 by default. |
172 virtual unsigned GetBackingTextureId() = 0; | 172 virtual unsigned GetBackingTextureId() = 0; |
173 | 173 |
| 174 // Returns true if the backing texture is always opaque. |
| 175 virtual bool IsOpaque() = 0; |
| 176 |
174 // This call will return the address of the command buffer for this context | 177 // This call will return the address of the command buffer for this context |
175 // that is constructed in Initialize() and is valid until this context is | 178 // that is constructed in Initialize() and is valid until this context is |
176 // destroyed. | 179 // destroyed. |
177 virtual ::gpu::CommandBuffer* GetCommandBuffer() = 0; | 180 virtual ::gpu::CommandBuffer* GetCommandBuffer() = 0; |
178 | 181 |
179 // If the command buffer is routed in the GPU channel, return the route id. | 182 // If the command buffer is routed in the GPU channel, return the route id. |
180 // Otherwise return 0. | 183 // Otherwise return 0. |
181 virtual int GetCommandBufferRouteId() = 0; | 184 virtual int GetCommandBufferRouteId() = 0; |
182 | 185 |
183 // Set an optional callback that will be invoked when the context is lost | 186 // Set an optional callback that will be invoked when the context is lost |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 const EnumerateDevicesCallback& callback) = 0; | 582 const EnumerateDevicesCallback& callback) = 0; |
580 // Create a ClipboardClient for writing to the clipboard. The caller will own | 583 // Create a ClipboardClient for writing to the clipboard. The caller will own |
581 // the pointer to this. | 584 // the pointer to this. |
582 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; | 585 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; |
583 }; | 586 }; |
584 | 587 |
585 } // namespace ppapi | 588 } // namespace ppapi |
586 } // namespace webkit | 589 } // namespace webkit |
587 | 590 |
588 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 591 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |