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