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

Unified Diff: android_webview/browser/gpu_memory_buffer_factory_impl.cc

Issue 413103002: Android WebView: Fall back to idle uploads if draw functor table not set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 6 years, 5 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
Index: android_webview/browser/gpu_memory_buffer_factory_impl.cc
diff --git a/android_webview/browser/gpu_memory_buffer_factory_impl.cc b/android_webview/browser/gpu_memory_buffer_factory_impl.cc
index 14d1ae47fc25bc0b77fb5d412d20f0d50e6e2b84..63771c682574c2bd8e39f2343e2aad74cf3e3d00 100644
--- a/android_webview/browser/gpu_memory_buffer_factory_impl.cc
+++ b/android_webview/browser/gpu_memory_buffer_factory_impl.cc
@@ -6,6 +6,7 @@
#include "android_webview/public/browser/draw_gl.h"
#include "base/logging.h"
+#include "gpu/command_buffer/service/in_process_command_buffer.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "ui/gfx/size.h"
#include "ui/gl/gl_bindings.h"
@@ -112,4 +113,12 @@ void GpuMemoryBufferFactoryImpl::SetAwDrawGLFunctionTable(
g_gl_draw_functions = table;
}
+bool GpuMemoryBufferFactoryImpl::Initialize() {
+ if (!g_gl_draw_functions)
+ return false;
+
+ gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory(this);
+ return true;
+}
+
} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698