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" |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 class PlatformContext3DImpl | 27 class PlatformContext3DImpl |
28 : public webkit::ppapi::PluginDelegate::PlatformContext3D { | 28 : public webkit::ppapi::PluginDelegate::PlatformContext3D { |
29 public: | 29 public: |
30 explicit PlatformContext3DImpl( | 30 explicit PlatformContext3DImpl( |
31 PepperParentContextProvider* parent_context_provider); | 31 PepperParentContextProvider* parent_context_provider); |
32 virtual ~PlatformContext3DImpl(); | 32 virtual ~PlatformContext3DImpl(); |
33 | 33 |
34 virtual bool Init(const int32* attrib_list) OVERRIDE; | 34 virtual bool Init(const int32* attrib_list) OVERRIDE; |
35 virtual unsigned GetBackingTextureId() OVERRIDE; | 35 virtual unsigned GetBackingTextureId() OVERRIDE; |
| 36 virtual bool IsOpaque() OVERRIDE; |
36 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; | 37 virtual gpu::CommandBuffer* GetCommandBuffer() OVERRIDE; |
37 virtual int GetCommandBufferRouteId() OVERRIDE; | 38 virtual int GetCommandBufferRouteId() OVERRIDE; |
38 virtual void SetContextLostCallback(const base::Closure& callback) OVERRIDE; | 39 virtual void SetContextLostCallback(const base::Closure& callback) OVERRIDE; |
39 virtual bool Echo(const base::Closure& task) OVERRIDE; | 40 virtual bool Echo(const base::Closure& task) OVERRIDE; |
40 | 41 |
41 private: | 42 private: |
42 bool InitRaw(); | 43 bool InitRaw(); |
43 void OnContextLost(); | 44 void OnContextLost(); |
44 | 45 |
45 // Implicitly weak pointer; must outlive this instance. | 46 // Implicitly weak pointer; must outlive this instance. |
46 PepperParentContextProvider* parent_context_provider_; | 47 PepperParentContextProvider* parent_context_provider_; |
47 base::WeakPtr<ContentGLContext> parent_context_; | 48 base::WeakPtr<ContentGLContext> parent_context_; |
48 scoped_refptr<GpuChannelHost> channel_; | 49 scoped_refptr<GpuChannelHost> channel_; |
49 unsigned int parent_texture_id_; | 50 unsigned int parent_texture_id_; |
| 51 bool has_alpha_; |
50 CommandBufferProxy* command_buffer_; | 52 CommandBufferProxy* command_buffer_; |
51 base::Closure context_lost_callback_; | 53 base::Closure context_lost_callback_; |
52 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; | 54 base::WeakPtrFactory<PlatformContext3DImpl> weak_ptr_factory_; |
53 }; | 55 }; |
54 | 56 |
55 #endif // ENABLE_GPU | 57 #endif // ENABLE_GPU |
56 | 58 |
57 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 59 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
OLD | NEW |