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 CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 class PepperParentContextProvider; | 30 class PepperParentContextProvider; |
31 | 31 |
32 class PlatformContext3DImpl | 32 class PlatformContext3DImpl |
33 : public webkit::ppapi::PluginDelegate::PlatformContext3D { | 33 : public webkit::ppapi::PluginDelegate::PlatformContext3D { |
34 public: | 34 public: |
35 explicit PlatformContext3DImpl( | 35 explicit PlatformContext3DImpl( |
36 PepperParentContextProvider* parent_context_provider); | 36 PepperParentContextProvider* parent_context_provider); |
37 virtual ~PlatformContext3DImpl(); | 37 virtual ~PlatformContext3DImpl(); |
38 | 38 |
39 virtual bool Init(const int32* attrib_list) OVERRIDE; | 39 virtual bool Init(const int32* attrib_list, |
| 40 PlatformContext3D* share_context) OVERRIDE; |
40 virtual unsigned GetBackingTextureId() OVERRIDE; | 41 virtual unsigned GetBackingTextureId() OVERRIDE; |
41 virtual bool IsOpaque() OVERRIDE; | 42 virtual bool IsOpaque() OVERRIDE; |
42 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; | 43 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; |
43 virtual int GetCommandBufferRouteId() OVERRIDE; | 44 virtual int GetCommandBufferRouteId() OVERRIDE; |
44 virtual void SetContextLostCallback(const base::Closure& callback) OVERRIDE; | 45 virtual void SetContextLostCallback(const base::Closure& callback) OVERRIDE; |
45 virtual void SetOnConsoleMessageCallback( | 46 virtual void SetOnConsoleMessageCallback( |
46 const ConsoleMessageCallback& callback) OVERRIDE; | 47 const ConsoleMessageCallback& callback) OVERRIDE; |
47 virtual bool Echo(const base::Closure& task) OVERRIDE; | 48 virtual bool Echo(const base::Closure& task) OVERRIDE; |
48 | 49 |
49 private: | 50 private: |
(...skipping 11 matching lines...) Expand all Loading... |
61 base::Closure context_lost_callback_; | 62 base::Closure context_lost_callback_; |
62 ConsoleMessageCallback console_message_callback_; | 63 ConsoleMessageCallback console_message_callback_; |
63 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; | 64 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; |
64 }; | 65 }; |
65 | 66 |
66 } // namespace content | 67 } // namespace content |
67 | 68 |
68 #endif // ENABLE_GPU | 69 #endif // ENABLE_GPU |
69 | 70 |
70 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 71 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
OLD | NEW |