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

Unified Diff: android_webview/browser/in_process_renderer/in_process_view_renderer.cc

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Dedup and refactor code Created 7 years, 7 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 | « no previous file | cc/output/output_surface_client.h » ('j') | cc/output/output_surface_client.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/in_process_renderer/in_process_view_renderer.cc
diff --git a/android_webview/browser/in_process_renderer/in_process_view_renderer.cc b/android_webview/browser/in_process_renderer/in_process_view_renderer.cc
index 98344619498f7d626d9e1b3f9e448b1dee43a697..7eaf5aed4ef1b52bfebe0c4b4a9b2558b2dcbd90 100644
--- a/android_webview/browser/in_process_renderer/in_process_view_renderer.cc
+++ b/android_webview/browser/in_process_renderer/in_process_view_renderer.cc
@@ -182,8 +182,7 @@ void InProcessViewRenderer::WebContentsGone() {
bool InProcessViewRenderer::PrepareDrawGL(int x, int y) {
// No harm in updating |hw_rendering_scroll_| even if we return false.
hw_rendering_scroll_ = gfx::Point(x, y);
- return attached_to_window_ && compositor_ && compositor_->IsHwReady() &&
- !hardware_failed_;
+ return attached_to_window_ && compositor_ && !hardware_failed_;
}
void InProcessViewRenderer::DrawGL(AwDrawGLInfo* draw_info) {
@@ -198,9 +197,12 @@ void InProcessViewRenderer::DrawGL(AwDrawGLInfo* draw_info) {
}
if (attached_to_window_ && compositor_ && !hardware_initialized_) {
- // TODO(boliu): Actually initialize the compositor GL path.
+ hardware_failed_ = !compositor_->InitializeHwDraw();
hardware_initialized_ = true;
joth 2013/05/21 02:08:00 lets rename these two memebers: hardware_initializ
egl_context_at_init_ = current_context;
+
+ if (hardware_failed_)
+ return;
}
joth 2013/05/21 02:08:00 guess we could DCHECK(!hardware_failed_) here
if (draw_info->mode == AwDrawGLInfo::kModeProcess)
« no previous file with comments | « no previous file | cc/output/output_surface_client.h » ('j') | cc/output/output_surface_client.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698