Commit 1bb2be02 authored by Justin Novosad's avatar Justin Novosad Committed by Commit Bot

Remove dead code: WebGraphicsContext3DProvider::IsSoftwareRendering

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I24309dd123c90af3ca4ca94edd9bdedf932d22d4
Reviewed-on: https://chromium-review.googlesource.com/1090994Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565620}
parent 812664fa
...@@ -1022,8 +1022,6 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( ...@@ -1022,8 +1022,6 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
} }
Collect3DContextInformation(gl_info, gpu_channel_host->gpu_info()); Collect3DContextInformation(gl_info, gpu_channel_host->gpu_info());
bool is_software_rendering = gpu_channel_host->gpu_info().software_rendering;
// This is an offscreen context. Generally it won't use the default // This is an offscreen context. Generally it won't use the default
// frame buffer, in that case don't request any alpha, depth, stencil, // frame buffer, in that case don't request any alpha, depth, stencil,
// antialiasing. But we do need those attributes for the "own // antialiasing. But we do need those attributes for the "own
...@@ -1061,7 +1059,7 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( ...@@ -1061,7 +1059,7 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider(
gpu::SharedMemoryLimits(), attributes, gpu::SharedMemoryLimits(), attributes,
ui::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL)); ui::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL));
return std::make_unique<WebGraphicsContext3DProviderImpl>( return std::make_unique<WebGraphicsContext3DProviderImpl>(
std::move(provider), is_software_rendering); std::move(provider));
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -1080,15 +1078,12 @@ RendererBlinkPlatformImpl::CreateSharedOffscreenGraphicsContext3DProvider() { ...@@ -1080,15 +1078,12 @@ RendererBlinkPlatformImpl::CreateSharedOffscreenGraphicsContext3DProvider() {
// channel can become lost on the IO thread since then. It is important that // channel can become lost on the IO thread since then. It is important that
// this happens after getting |provider|. In the case that this GpuChannelHost // this happens after getting |provider|. In the case that this GpuChannelHost
// is not the same one backing |provider|, the context behind the |provider| // is not the same one backing |provider|, the context behind the |provider|
// will be already lost/dead on arrival, so the value we get for // will be already lost/dead on arrival.
// |is_software_rendering| will never be wrong.
if (!host) if (!host)
return nullptr; return nullptr;
bool is_software_rendering = host->gpu_info().software_rendering;
return std::make_unique<WebGraphicsContext3DProviderImpl>( return std::make_unique<WebGraphicsContext3DProviderImpl>(
std::move(provider), is_software_rendering); std::move(provider));
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -12,10 +12,8 @@ ...@@ -12,10 +12,8 @@
namespace content { namespace content {
WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl( WebGraphicsContext3DProviderImpl::WebGraphicsContext3DProviderImpl(
scoped_refptr<ui::ContextProviderCommandBuffer> provider, scoped_refptr<ui::ContextProviderCommandBuffer> provider)
bool software_rendering) : provider_(std::move(provider)) {}
: provider_(std::move(provider)), software_rendering_(software_rendering) {
}
WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() { WebGraphicsContext3DProviderImpl::~WebGraphicsContext3DProviderImpl() {
provider_->RemoveObserver(this); provider_->RemoveObserver(this);
...@@ -56,10 +54,6 @@ viz::GLHelper* WebGraphicsContext3DProviderImpl::GetGLHelper() { ...@@ -56,10 +54,6 @@ viz::GLHelper* WebGraphicsContext3DProviderImpl::GetGLHelper() {
return gl_helper_.get(); return gl_helper_.get();
} }
bool WebGraphicsContext3DProviderImpl::IsSoftwareRendering() const {
return software_rendering_;
}
void WebGraphicsContext3DProviderImpl::SetLostContextCallback( void WebGraphicsContext3DProviderImpl::SetLostContextCallback(
base::RepeatingClosure c) { base::RepeatingClosure c) {
context_lost_callback_ = std::move(c); context_lost_callback_ = std::move(c);
......
...@@ -36,8 +36,7 @@ class CONTENT_EXPORT WebGraphicsContext3DProviderImpl ...@@ -36,8 +36,7 @@ class CONTENT_EXPORT WebGraphicsContext3DProviderImpl
public viz::ContextLostObserver { public viz::ContextLostObserver {
public: public:
WebGraphicsContext3DProviderImpl( WebGraphicsContext3DProviderImpl(
scoped_refptr<ui::ContextProviderCommandBuffer> provider, scoped_refptr<ui::ContextProviderCommandBuffer> provider);
bool software_rendering);
~WebGraphicsContext3DProviderImpl() override; ~WebGraphicsContext3DProviderImpl() override;
// WebGraphicsContext3DProvider implementation. // WebGraphicsContext3DProvider implementation.
...@@ -47,7 +46,6 @@ class CONTENT_EXPORT WebGraphicsContext3DProviderImpl ...@@ -47,7 +46,6 @@ class CONTENT_EXPORT WebGraphicsContext3DProviderImpl
const gpu::Capabilities& GetCapabilities() const override; const gpu::Capabilities& GetCapabilities() const override;
const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const override; const gpu::GpuFeatureInfo& GetGpuFeatureInfo() const override;
viz::GLHelper* GetGLHelper() override; viz::GLHelper* GetGLHelper() override;
bool IsSoftwareRendering() const override;
void SetLostContextCallback(base::RepeatingClosure) override; void SetLostContextCallback(base::RepeatingClosure) override;
void SetErrorMessageCallback( void SetErrorMessageCallback(
base::RepeatingCallback<void(const char*, int32_t)>) override; base::RepeatingCallback<void(const char*, int32_t)>) override;
...@@ -63,7 +61,6 @@ class CONTENT_EXPORT WebGraphicsContext3DProviderImpl ...@@ -63,7 +61,6 @@ class CONTENT_EXPORT WebGraphicsContext3DProviderImpl
scoped_refptr<ui::ContextProviderCommandBuffer> provider_; scoped_refptr<ui::ContextProviderCommandBuffer> provider_;
std::unique_ptr<viz::GLHelper> gl_helper_; std::unique_ptr<viz::GLHelper> gl_helper_;
const bool software_rendering_;
base::RepeatingClosure context_lost_callback_; base::RepeatingClosure context_lost_callback_;
std::unique_ptr<cc::ImageDecodeCache> image_decode_cache_; std::unique_ptr<cc::ImageDecodeCache> image_decode_cache_;
......
...@@ -67,12 +67,6 @@ class WebGraphicsContext3DProvider { ...@@ -67,12 +67,6 @@ class WebGraphicsContext3DProvider {
// method cannot return null. // method cannot return null.
virtual viz::GLHelper* GetGLHelper() = 0; virtual viz::GLHelper* GetGLHelper() = 0;
// Returns true if the context is driven by software emulation of GL. In
// this scenario, the compositor would not be using GPU.
// TODO(danakj): Make this IsSoftwareCompositing() instead, based on the
// CompositingModeWatcher.
virtual bool IsSoftwareRendering() const = 0;
virtual void SetLostContextCallback(base::RepeatingClosure) = 0; virtual void SetLostContextCallback(base::RepeatingClosure) = 0;
virtual void SetErrorMessageCallback( virtual void SetErrorMessageCallback(
base::RepeatingCallback<void(const char* msg, int32_t id)>) = 0; base::RepeatingCallback<void(const char* msg, int32_t id)>) = 0;
......
...@@ -38,7 +38,6 @@ class WebGraphicsContext3DProviderForTests ...@@ -38,7 +38,6 @@ class WebGraphicsContext3DProviderForTests
: gl_(std::move(gl)) {} : gl_(std::move(gl)) {}
gpu::gles2::GLES2Interface* ContextGL() override { return gl_.get(); } gpu::gles2::GLES2Interface* ContextGL() override { return gl_.get(); }
bool IsSoftwareRendering() const override { return false; }
// Not used by WebGL code. // Not used by WebGL code.
GrContext* GetGrContext() override { return nullptr; } GrContext* GetGrContext() override { return nullptr; }
......
...@@ -40,8 +40,6 @@ class FakeWebGraphicsContext3DProvider : public WebGraphicsContext3DProvider { ...@@ -40,8 +40,6 @@ class FakeWebGraphicsContext3DProvider : public WebGraphicsContext3DProvider {
viz::GLHelper* GetGLHelper() override { return nullptr; } viz::GLHelper* GetGLHelper() override { return nullptr; }
bool IsSoftwareRendering() const override { return false; }
gpu::gles2::GLES2Interface* ContextGL() override { return gl_; } gpu::gles2::GLES2Interface* ContextGL() override { return gl_; }
bool BindToCurrentThread() override { return false; } bool BindToCurrentThread() override { return false; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment