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

Side by Side 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: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "android_webview/browser/gpu_memory_buffer_factory_impl.h" 5 #include "android_webview/browser/gpu_memory_buffer_factory_impl.h"
6 6
7 #include "android_webview/public/browser/draw_gl.h" 7 #include "android_webview/public/browser/draw_gl.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "gpu/command_buffer/service/in_process_command_buffer.h"
9 #include "ui/gfx/gpu_memory_buffer.h" 10 #include "ui/gfx/gpu_memory_buffer.h"
10 #include "ui/gfx/size.h" 11 #include "ui/gfx/size.h"
11 #include "ui/gl/gl_bindings.h" 12 #include "ui/gl/gl_bindings.h"
12 #include "ui/gl/gl_image_android_native_buffer.h" 13 #include "ui/gl/gl_image_android_native_buffer.h"
13 14
14 namespace android_webview { 15 namespace android_webview {
15 16
16 namespace { 17 namespace {
17 18
18 // Provides hardware rendering functions from the Android glue layer. 19 // Provides hardware rendering functions from the Android glue layer.
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 106
106 return image; 107 return image;
107 } 108 }
108 109
109 // static 110 // static
110 void GpuMemoryBufferFactoryImpl::SetAwDrawGLFunctionTable( 111 void GpuMemoryBufferFactoryImpl::SetAwDrawGLFunctionTable(
111 AwDrawGLFunctionTable* table) { 112 AwDrawGLFunctionTable* table) {
112 g_gl_draw_functions = table; 113 g_gl_draw_functions = table;
113 } 114 }
114 115
116 bool GpuMemoryBufferFactoryImpl::Initialize() {
117 if (!g_gl_draw_functions)
118 return false;
119
120 gpu::InProcessCommandBuffer::SetGpuMemoryBufferFactory(this);
121 return true;
122 }
123
115 } // namespace android_webview 124 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/gpu_memory_buffer_factory_impl.h ('k') | android_webview/lib/main/aw_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698