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

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: implementation 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/public/browser/draw_gl.h" 11 #include "android_webview/public/browser/draw_gl.h"
11 #include "android_webview/public/browser/draw_sw.h" 12 #include "android_webview/public/browser/draw_sw.h"
12 #include "base/android/jni_android.h" 13 #include "base/android/jni_android.h"
13 #include "base/auto_reset.h" 14 #include "base/auto_reset.h"
14 #include "base/command_line.h" 15 #include "base/command_line.h"
15 #include "base/debug/trace_event.h" 16 #include "base/debug/trace_event.h"
16 #include "base/lazy_instance.h" 17 #include "base/lazy_instance.h"
17 #include "base/logging.h" 18 #include "base/logging.h"
18 #include "base/strings/stringprintf.h" 19 #include "base/strings/stringprintf.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void BrowserViewRenderer::SetAwDrawSWFunctionTable( 178 void BrowserViewRenderer::SetAwDrawSWFunctionTable(
178 AwDrawSWFunctionTable* table) { 179 AwDrawSWFunctionTable* table) {
179 g_sw_draw_functions = table; 180 g_sw_draw_functions = table;
180 g_is_skia_version_compatible = 181 g_is_skia_version_compatible =
181 g_sw_draw_functions->is_skia_version_compatible(&SkGraphics::GetVersion); 182 g_sw_draw_functions->is_skia_version_compatible(&SkGraphics::GetVersion);
182 LOG_IF(WARNING, !g_is_skia_version_compatible) 183 LOG_IF(WARNING, !g_is_skia_version_compatible)
183 << "Skia versions are not compatible, rendering performance will suffer."; 184 << "Skia versions are not compatible, rendering performance will suffer.";
184 185
185 gpu::InProcessCommandBuffer::SetScheduleCallback( 186 gpu::InProcessCommandBuffer::SetScheduleCallback(
186 base::Bind(&ScheduleGpuWork)); 187 base::Bind(&ScheduleGpuWork));
188 GLSurfaceFactory::Install();
187 } 189 }
188 190
189 // static 191 // static
190 AwDrawSWFunctionTable* BrowserViewRenderer::GetAwDrawSWFunctionTable() { 192 AwDrawSWFunctionTable* BrowserViewRenderer::GetAwDrawSWFunctionTable() {
191 return g_sw_draw_functions; 193 return g_sw_draw_functions;
192 } 194 }
193 195
194 // static 196 // static
195 bool BrowserViewRenderer::IsSkiaVersionCompatible() { 197 bool BrowserViewRenderer::IsSkiaVersionCompatible() {
196 DCHECK(g_sw_draw_functions); 198 DCHECK(g_sw_draw_functions);
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 base::StringAppendF(&str, 776 base::StringAppendF(&str,
775 "surface width height: [%d %d] ", 777 "surface width height: [%d %d] ",
776 draw_info->width, 778 draw_info->width,
777 draw_info->height); 779 draw_info->height);
778 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer); 780 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer);
779 } 781 }
780 return str; 782 return str;
781 } 783 }
782 784
783 } // namespace android_webview 785 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698