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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.cpp

Issue 2815103003: Disables software to accelerated canvas update on Linux AMD GPUs (Closed)
Patch Set: merge Created 3 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "platform/graphics/gpu/SharedGpuContext.h" 5 #include "platform/graphics/gpu/SharedGpuContext.h"
6 6
7 #include "gpu/command_buffer/client/gles2_interface.h" 7 #include "gpu/command_buffer/client/gles2_interface.h"
8 #include "gpu/command_buffer/common/capabilities.h"
8 #include "platform/CrossThreadFunctional.h" 9 #include "platform/CrossThreadFunctional.h"
9 #include "platform/WaitableEvent.h" 10 #include "platform/WaitableEvent.h"
10 #include "platform/WebTaskRunner.h" 11 #include "platform/WebTaskRunner.h"
11 #include "public/platform/Platform.h" 12 #include "public/platform/Platform.h"
12 #include "public/platform/WebGraphicsContext3DProvider.h" 13 #include "public/platform/WebGraphicsContext3DProvider.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 SharedGpuContext* SharedGpuContext::GetInstanceForCurrentThread() { 17 SharedGpuContext* SharedGpuContext::GetInstanceForCurrentThread() {
17 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<SharedGpuContext>, 18 DEFINE_THREAD_SAFE_STATIC_LOCAL(ThreadSpecific<SharedGpuContext>,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 121 }
121 122
122 bool SharedGpuContext::IsValidWithoutRestoring() { 123 bool SharedGpuContext::IsValidWithoutRestoring() {
123 SharedGpuContext* this_ptr = GetInstanceForCurrentThread(); 124 SharedGpuContext* this_ptr = GetInstanceForCurrentThread();
124 if (!this_ptr->context_provider_) 125 if (!this_ptr->context_provider_)
125 return false; 126 return false;
126 return this_ptr->context_provider_->ContextGL() 127 return this_ptr->context_provider_->ContextGL()
127 ->GetGraphicsResetStatusKHR() == GL_NO_ERROR; 128 ->GetGraphicsResetStatusKHR() == GL_NO_ERROR;
128 } 129 }
129 130
131 bool SharedGpuContext::AllowSoftwareToAcceleratedCanvasUpgrade() {
132 if (!IsValid())
133 return kNoSharedContext;
134 SharedGpuContext* this_ptr = GetInstanceForCurrentThread();
135 return this_ptr->context_provider_->GetCapabilities()
136 .software_to_accelerated_canvas_upgrade;
137 }
138
130 } // blink 139 } // blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698