OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser_view_renderer.h" | 5 #include "android_webview/browser/browser_view_renderer.h" |
6 | 6 |
7 #include "android_webview/browser/browser_view_renderer_client.h" | 7 #include "android_webview/browser/browser_view_renderer_client.h" |
8 #include "android_webview/browser/shared_renderer_state.h" | 8 #include "android_webview/browser/shared_renderer_state.h" |
9 #include "android_webview/public/browser/draw_gl.h" | 9 #include "android_webview/public/browser/draw_gl.h" |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 draw_gl_input_.global_visible_rect = global_visible_rect; | 102 draw_gl_input_.global_visible_rect = global_visible_rect; |
103 draw_gl_input_.width = width_; | 103 draw_gl_input_.width = width_; |
104 draw_gl_input_.height = height_; | 104 draw_gl_input_.height = height_; |
105 if (clear_view_) | 105 if (clear_view_) |
106 return false; | 106 return false; |
107 if (is_hardware_canvas && attached_to_window_) { | 107 if (is_hardware_canvas && attached_to_window_) { |
108 shared_renderer_state_->SetDrawGLInput(draw_gl_input_); | 108 shared_renderer_state_->SetDrawGLInput(draw_gl_input_); |
109 // We should be performing a hardware draw here. If we don't have the | 109 // We should be performing a hardware draw here. If we don't have the |
110 // compositor yet or if RequestDrawGL fails, it means we failed this draw | 110 // compositor yet or if RequestDrawGL fails, it means we failed this draw |
111 // and thus return false here to clear to background color for this draw. | 111 // and thus return false here to clear to background color for this draw. |
112 return has_compositor_ && client_->RequestDrawGL(java_canvas); | 112 return has_compositor_ && client_->RequestDrawGL(java_canvas, false); |
113 } | 113 } |
114 // Perform a software draw | 114 // Perform a software draw |
115 return DrawSWInternal(java_canvas, clip); | 115 return DrawSWInternal(java_canvas, clip); |
116 } | 116 } |
117 | 117 |
118 void BrowserViewRenderer::DidDrawGL(const DrawGLResult& result) { | 118 void BrowserViewRenderer::DidDrawGL(const DrawGLResult& result) { |
119 DidComposite(!result.clip_contains_visible_rect); | 119 DidComposite(!result.clip_contains_visible_rect); |
120 } | 120 } |
121 | 121 |
122 bool BrowserViewRenderer::DrawSWInternal(jobject java_canvas, | 122 bool BrowserViewRenderer::DrawSWInternal(jobject java_canvas, |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 base::StringAppendF(&str, | 598 base::StringAppendF(&str, |
599 "surface width height: [%d %d] ", | 599 "surface width height: [%d %d] ", |
600 draw_info->width, | 600 draw_info->width, |
601 draw_info->height); | 601 draw_info->height); |
602 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer); | 602 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer); |
603 } | 603 } |
604 return str; | 604 return str; |
605 } | 605 } |
606 | 606 |
607 } // namespace android_webview | 607 } // namespace android_webview |
OLD | NEW |