| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 4 #ifndef CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
| 5 #define CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 5 #define CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/scoped_callback_factory.h" | 8 #include "base/scoped_callback_factory.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/weak_ptr.h" |
| 10 #include "webkit/plugins/ppapi/plugin_delegate.h" | 11 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 11 | 12 |
| 12 #ifdef ENABLE_GPU | 13 #ifdef ENABLE_GPU |
| 13 | 14 |
| 14 namespace gpu { | 15 namespace gpu { |
| 15 | 16 |
| 16 class CommandBuffer; | 17 class CommandBuffer; |
| 17 | 18 |
| 18 } // namespace gpu | 19 } // namespace gpu |
| 19 | 20 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 35 virtual bool Init(); | 36 virtual bool Init(); |
| 36 virtual void SetSwapBuffersCallback(Callback0::Type* callback); | 37 virtual void SetSwapBuffersCallback(Callback0::Type* callback); |
| 37 virtual unsigned GetBackingTextureId(); | 38 virtual unsigned GetBackingTextureId(); |
| 38 virtual gpu::CommandBuffer* GetCommandBuffer(); | 39 virtual gpu::CommandBuffer* GetCommandBuffer(); |
| 39 virtual void SetContextLostCallback(Callback0::Type* callback); | 40 virtual void SetContextLostCallback(Callback0::Type* callback); |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 bool InitRaw(); | 43 bool InitRaw(); |
| 43 void OnContextLost(); | 44 void OnContextLost(); |
| 44 | 45 |
| 45 ggl::Context* parent_context_; | 46 base::WeakPtr<ggl::Context> parent_context_; |
| 46 scoped_refptr<GpuChannelHost> channel_; | 47 scoped_refptr<GpuChannelHost> channel_; |
| 47 unsigned int parent_texture_id_; | 48 unsigned int parent_texture_id_; |
| 48 CommandBufferProxy* command_buffer_; | 49 CommandBufferProxy* command_buffer_; |
| 49 scoped_ptr<Callback0::Type> context_lost_callback_; | 50 scoped_ptr<Callback0::Type> context_lost_callback_; |
| 50 base::ScopedCallbackFactory<PlatformContext3DImpl> callback_factory_; | 51 base::ScopedCallbackFactory<PlatformContext3DImpl> callback_factory_; |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 #endif // ENABLE_GPU | 54 #endif // ENABLE_GPU |
| 54 | 55 |
| 55 #endif // CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ | 56 #endif // CHROME_RENDERER_PEPPER_PLATFORM_CONTEXT_3D_IMPL_H_ |
| OLD | NEW |