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

Side by Side Diff: android_webview/browser/in_process_view_renderer.cc

Issue 22277004: Add gfx::SurfaceFactoryWebview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: static member var Created 7 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/in_process_view_renderer.h" 5 #include "android_webview/browser/in_process_view_renderer.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "android_webview/browser/gl_surface_factory.h"
9 #include "android_webview/browser/scoped_app_gl_state_restore.h" 10 #include "android_webview/browser/scoped_app_gl_state_restore.h"
10 #include "android_webview/common/aw_switches.h" 11 #include "android_webview/common/aw_switches.h"
11 #include "android_webview/public/browser/draw_gl.h" 12 #include "android_webview/public/browser/draw_gl.h"
12 #include "android_webview/public/browser/draw_sw.h" 13 #include "android_webview/public/browser/draw_sw.h"
13 #include "base/android/jni_android.h" 14 #include "base/android/jni_android.h"
14 #include "base/auto_reset.h" 15 #include "base/auto_reset.h"
15 #include "base/command_line.h" 16 #include "base/command_line.h"
16 #include "base/debug/trace_event.h" 17 #include "base/debug/trace_event.h"
17 #include "base/lazy_instance.h" 18 #include "base/lazy_instance.h"
18 #include "base/logging.h" 19 #include "base/logging.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void BrowserViewRenderer::SetAwDrawSWFunctionTable( 180 void BrowserViewRenderer::SetAwDrawSWFunctionTable(
180 AwDrawSWFunctionTable* table) { 181 AwDrawSWFunctionTable* table) {
181 g_sw_draw_functions = table; 182 g_sw_draw_functions = table;
182 g_is_skia_version_compatible = 183 g_is_skia_version_compatible =
183 g_sw_draw_functions->is_skia_version_compatible(&SkGraphics::GetVersion); 184 g_sw_draw_functions->is_skia_version_compatible(&SkGraphics::GetVersion);
184 LOG_IF(WARNING, !g_is_skia_version_compatible) 185 LOG_IF(WARNING, !g_is_skia_version_compatible)
185 << "Skia versions are not compatible, rendering performance will suffer."; 186 << "Skia versions are not compatible, rendering performance will suffer.";
186 187
187 gpu::InProcessCommandBuffer::SetScheduleCallback( 188 gpu::InProcessCommandBuffer::SetScheduleCallback(
188 base::Bind(&ScheduleGpuWork)); 189 base::Bind(&ScheduleGpuWork));
190 GLSurfaceFactory::Install();
189 } 191 }
190 192
191 // static 193 // static
192 AwDrawSWFunctionTable* BrowserViewRenderer::GetAwDrawSWFunctionTable() { 194 AwDrawSWFunctionTable* BrowserViewRenderer::GetAwDrawSWFunctionTable() {
193 return g_sw_draw_functions; 195 return g_sw_draw_functions;
194 } 196 }
195 197
196 // static 198 // static
197 bool BrowserViewRenderer::IsSkiaVersionCompatible() { 199 bool BrowserViewRenderer::IsSkiaVersionCompatible() {
198 DCHECK(g_sw_draw_functions); 200 DCHECK(g_sw_draw_functions);
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 base::StringAppendF(&str, 778 base::StringAppendF(&str,
777 "surface width height: [%d %d] ", 779 "surface width height: [%d %d] ",
778 draw_info->width, 780 draw_info->width,
779 draw_info->height); 781 draw_info->height);
780 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer); 782 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer);
781 } 783 }
782 return str; 784 return str;
783 } 785 }
784 786
785 } // namespace android_webview 787 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698