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

Unified Diff: android_webview/browser/hardware_renderer.cc

Issue 217813004: Make ShaderTranslatorCache thread safe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/browser/hardware_renderer.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/hardware_renderer.cc
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index 8042d9d4fff60e94578bca99b34161592a3f8e04..59356dbe7aea8656256a2fcba77c99ddf9e09d4d 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -14,6 +14,7 @@
#include "base/strings/string_number_conversions.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_switches.h"
+#include "gpu/command_buffer/service/shader_translator_cache.h"
#include "ui/gfx/transform.h"
using content::BrowserThread;
@@ -252,6 +253,13 @@ void DeferredGpuCommandService::ScheduleIdleWork(
bool DeferredGpuCommandService::UseVirtualizedGLContexts() { return true; }
+scoped_refptr<gpu::gles2::ShaderTranslatorCache>
+DeferredGpuCommandService::shader_translator_cache() {
+ if (!shader_translator_cache_.get())
+ shader_translator_cache_ = new gpu::gles2::ShaderTranslatorCache;
+ return shader_translator_cache_;
+}
+
void DeferredGpuCommandService::RunTasks() {
bool has_more_tasks;
{
« no previous file with comments | « android_webview/browser/hardware_renderer.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698