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

Side by Side Diff: content/renderer/webgraphicscontext3d_provider_impl.h

Issue 2267993002: Expose if we are using swiftshader via WebGraphicsContext3DProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: softwarerendering: . Created 4 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_
6 #define CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_ 6 #define CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h" 11 #include "third_party/WebKit/public/platform/WebGraphicsContext3DProvider.h"
12 12
13 namespace gpu { 13 namespace gpu {
14 namespace gles2 { 14 namespace gles2 {
15 class GLES2Interface; 15 class GLES2Interface;
16 } 16 }
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 class ContextProviderCommandBuffer; 20 class ContextProviderCommandBuffer;
21 21
22 class CONTENT_EXPORT WebGraphicsContext3DProviderImpl 22 class CONTENT_EXPORT WebGraphicsContext3DProviderImpl
23 : public NON_EXPORTED_BASE(blink::WebGraphicsContext3DProvider) { 23 : public NON_EXPORTED_BASE(blink::WebGraphicsContext3DProvider) {
24 public: 24 public:
25 explicit WebGraphicsContext3DProviderImpl( 25 explicit WebGraphicsContext3DProviderImpl(
26 scoped_refptr<ContextProviderCommandBuffer> provider); 26 scoped_refptr<ContextProviderCommandBuffer> provider,
27 bool software_rendering);
27 ~WebGraphicsContext3DProviderImpl() override; 28 ~WebGraphicsContext3DProviderImpl() override;
28 29
29 // WebGraphicsContext3DProvider implementation. 30 // WebGraphicsContext3DProvider implementation.
30 bool bindToCurrentThread() override; 31 bool bindToCurrentThread() override;
31 gpu::gles2::GLES2Interface* contextGL() override; 32 gpu::gles2::GLES2Interface* contextGL() override;
32 GrContext* grContext() override; 33 GrContext* grContext() override;
33 gpu::Capabilities getCapabilities() override; 34 gpu::Capabilities getCapabilities() override;
35 bool isSoftwareRendering() const override;
34 void setLostContextCallback(blink::WebClosure) override; 36 void setLostContextCallback(blink::WebClosure) override;
35 void setErrorMessageCallback( 37 void setErrorMessageCallback(
36 blink::WebFunction<void(const char*, int32_t)>) override; 38 blink::WebFunction<void(const char*, int32_t)>) override;
37 39
38 ContextProviderCommandBuffer* context_provider() const { 40 ContextProviderCommandBuffer* context_provider() const {
39 return provider_.get(); 41 return provider_.get();
40 } 42 }
41 43
42 private: 44 private:
43 scoped_refptr<ContextProviderCommandBuffer> provider_; 45 scoped_refptr<ContextProviderCommandBuffer> provider_;
46 const bool software_rendering_;
44 }; 47 };
45 48
46 } // namespace content 49 } // namespace content
47 50
48 #endif // CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_ 51 #endif // CONTENT_RENDERER_WEBGRAPHICSCONTEXT3D_PROVIDER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698