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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 12 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
13 #include "webkit/plugins/ppapi/plugin_delegate.h" | 13 #include "webkit/plugins/ppapi/plugin_delegate.h" |
14 | 14 |
15 #ifdef ENABLE_GPU | 15 #ifdef ENABLE_GPU |
16 | 16 |
17 namespace gpu { | 17 namespace gpu { |
18 | 18 |
19 class CommandBuffer; | 19 class CommandBuffer; |
20 | 20 |
21 } // namespace gpu | 21 } // namespace gpu |
22 | 22 |
23 class CommandBufferProxy; | 23 class CommandBufferProxy; |
24 class GpuChannelHost; | 24 class GpuChannelHost; |
| 25 class ContentGLContext; |
| 26 |
| 27 namespace content { |
| 28 |
25 class PepperParentContextProvider; | 29 class PepperParentContextProvider; |
26 class ContentGLContext; | |
27 | 30 |
28 class PlatformContext3DImpl | 31 class PlatformContext3DImpl |
29 : public webkit::ppapi::PluginDelegate::PlatformContext3D { | 32 : public webkit::ppapi::PluginDelegate::PlatformContext3D { |
30 public: | 33 public: |
31 explicit PlatformContext3DImpl( | 34 explicit PlatformContext3DImpl( |
32 PepperParentContextProvider* parent_context_provider); | 35 PepperParentContextProvider* parent_context_provider); |
33 virtual ~PlatformContext3DImpl(); | 36 virtual ~PlatformContext3DImpl(); |
34 | 37 |
35 virtual bool Init(const int32* attrib_list) OVERRIDE; | 38 virtual bool Init(const int32* attrib_list) OVERRIDE; |
36 virtual unsigned GetBackingTextureId() OVERRIDE; | 39 virtual unsigned GetBackingTextureId() OVERRIDE; |
(...skipping 15 matching lines...) Expand all Loading... |
52 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> parent_context_; | 55 base::WeakPtr<WebGraphicsContext3DCommandBufferImpl> parent_context_; |
53 scoped_refptr<GpuChannelHost> channel_; | 56 scoped_refptr<GpuChannelHost> channel_; |
54 unsigned int parent_texture_id_; | 57 unsigned int parent_texture_id_; |
55 bool has_alpha_; | 58 bool has_alpha_; |
56 CommandBufferProxy* command_buffer_; | 59 CommandBufferProxy* command_buffer_; |
57 base::Closure context_lost_callback_; | 60 base::Closure context_lost_callback_; |
58 ConsoleMessageCallback console_message_callback_; | 61 ConsoleMessageCallback console_message_callback_; |
59 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; | 62 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; |
60 }; | 63 }; |
61 | 64 |
| 65 } // namespace content |
| 66 |
62 #endif // ENABLE_GPU | 67 #endif // ENABLE_GPU |
63 | 68 |
64 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 69 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
OLD | NEW |