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

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

Issue 199443004: gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: checkmem: benchmark Created 6 years, 8 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
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 "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "webkit/common/gpu/context_provider_web_context.h" 12 #include "webkit/common/gpu/context_provider_web_context.h"
13 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl. h" 13 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl. h"
14 #include "webkit/common/gpu/webkit_gpu_export.h" 14 #include "webkit/common/gpu/webkit_gpu_export.h"
15 15
16 namespace blink { class WebGraphicsContext3D; } 16 namespace blink { class WebGraphicsContext3D; }
17 17
18 namespace webkit { 18 namespace webkit {
19 namespace gpu { 19 namespace gpu {
20 class GrContextForWebGraphicsContext3D; 20 class GrContextForWebGraphicsContext3D;
21 21
22 class WEBKIT_GPU_EXPORT ContextProviderInProcess 22 class WEBKIT_GPU_EXPORT ContextProviderInProcess
23 : NON_EXPORTED_BASE(public ContextProviderWebContext) { 23 : NON_EXPORTED_BASE(public ContextProviderWebContext) {
24 public: 24 public:
25 static scoped_refptr<ContextProviderInProcess> Create( 25 static scoped_refptr<ContextProviderInProcess> Create(
26 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d, 26 scoped_ptr<WebGraphicsContext3DInProcessCommandBufferImpl> context3d,
27 const std::string& debug_name); 27 const std::string& debug_name);
28 28
29 // Calls Create() with a default factory method for creating an offscreen 29 // Uses default attributes for creating an offscreen context.
30 // context. 30 static scoped_refptr<ContextProviderInProcess> CreateOffscreen(
31 static scoped_refptr<ContextProviderInProcess> CreateOffscreen(); 31 bool lose_context_when_out_of_memory);
32 32
33 virtual blink::WebGraphicsContext3D* WebContext3D() OVERRIDE; 33 virtual blink::WebGraphicsContext3D* WebContext3D() OVERRIDE;
34 34
35 virtual bool BindToCurrentThread() OVERRIDE; 35 virtual bool BindToCurrentThread() OVERRIDE;
36 virtual Capabilities ContextCapabilities() OVERRIDE; 36 virtual Capabilities ContextCapabilities() OVERRIDE;
37 virtual ::gpu::gles2::GLES2Interface* ContextGL() OVERRIDE; 37 virtual ::gpu::gles2::GLES2Interface* ContextGL() OVERRIDE;
38 virtual ::gpu::ContextSupport* ContextSupport() OVERRIDE; 38 virtual ::gpu::ContextSupport* ContextSupport() OVERRIDE;
39 virtual class GrContext* GrContext() OVERRIDE; 39 virtual class GrContext* GrContext() OVERRIDE;
40 virtual bool IsContextLost() OVERRIDE; 40 virtual bool IsContextLost() OVERRIDE;
41 virtual void VerifyContexts() OVERRIDE; 41 virtual void VerifyContexts() OVERRIDE;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 cc::ContextProvider::Capabilities capabilities_; 76 cc::ContextProvider::Capabilities capabilities_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(ContextProviderInProcess); 78 DISALLOW_COPY_AND_ASSIGN(ContextProviderInProcess);
79 }; 79 };
80 80
81 } // namespace gpu 81 } // namespace gpu
82 } // namespace webkit 82 } // namespace webkit
83 83
84 #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_ 84 #endif // WEBKIT_COMMON_GPU_CONTEXT_PROVIDER_IN_PROCESS_H_
OLDNEW
« no previous file with comments | « ui/compositor/test/in_process_context_factory.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