Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(929)

Side by Side Diff: webkit/common/gpu/context_provider_in_process.h

Issue 17447007: Change WGC3DInProcessCBImpl factories to return a base class pointer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/compositor/compositor.cc ('k') | webkit/common/gpu/context_provider_in_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ 5 #ifndef WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
6 #define WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ 6 #define WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
11 #include "cc/output/context_provider.h" 11 #include "cc/output/context_provider.h"
12 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl. h"
13 #include "webkit/common/gpu/webkit_gpu_export.h" 12 #include "webkit/common/gpu/webkit_gpu_export.h"
14 13
14 namespace WebKit {
15 class WebGraphicsContext3D;
16 }
17
15 namespace webkit { 18 namespace webkit {
16 namespace gpu { 19 namespace gpu {
17 class GrContextForWebGraphicsContext3D; 20 class GrContextForWebGraphicsContext3D;
18 21
19 class WEBKIT_GPU_EXPORT ContextProviderInProcess 22 class WEBKIT_GPU_EXPORT ContextProviderInProcess
20 : NON_EXPORTED_BASE(public cc::ContextProvider) { 23 : NON_EXPORTED_BASE(public cc::ContextProvider) {
21 public: 24 public:
22 static scoped_refptr<ContextProviderInProcess> Create() { 25 static scoped_refptr<ContextProviderInProcess> Create() {
23 scoped_refptr<ContextProviderInProcess> provider = 26 scoped_refptr<ContextProviderInProcess> provider =
24 new ContextProviderInProcess; 27 new ContextProviderInProcess;
(...skipping 12 matching lines...) Expand all
37 ContextProviderInProcess(); 40 ContextProviderInProcess();
38 virtual ~ContextProviderInProcess(); 41 virtual ~ContextProviderInProcess();
39 42
40 bool InitializeOnMainThread(); 43 bool InitializeOnMainThread();
41 44
42 void OnLostContextInternal(); 45 void OnLostContextInternal();
43 virtual void OnLostContext() {} 46 virtual void OnLostContext() {}
44 virtual void OnMemoryAllocationChanged(bool nonzero_allocation); 47 virtual void OnMemoryAllocationChanged(bool nonzero_allocation);
45 48
46 private: 49 private:
47 scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl> 50 scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
48 context3d_;
49 scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_; 51 scoped_ptr<webkit::gpu::GrContextForWebGraphicsContext3D> gr_context_;
50 52
51 base::Lock destroyed_lock_; 53 base::Lock destroyed_lock_;
52 bool destroyed_; 54 bool destroyed_;
53 55
54 class LostContextCallbackProxy; 56 class LostContextCallbackProxy;
55 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_; 57 scoped_ptr<LostContextCallbackProxy> lost_context_callback_proxy_;
56 58
57 class MemoryAllocationCallbackProxy; 59 class MemoryAllocationCallbackProxy;
58 scoped_ptr<MemoryAllocationCallbackProxy> memory_allocation_callback_proxy_; 60 scoped_ptr<MemoryAllocationCallbackProxy> memory_allocation_callback_proxy_;
59 }; 61 };
60 62
61 } // namespace gpu 63 } // namespace gpu
62 } // namespace webkit 64 } // namespace webkit
63 65
64 #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ 66 #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | webkit/common/gpu/context_provider_in_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698