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

Unified Diff: android_webview/browser/hardware_renderer.cc

Issue 251843006: aw: Add new DrawGL modes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move share state Created 6 years, 8 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 | android_webview/public/browser/draw_gl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/browser/hardware_renderer.cc
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index 6136aeab9af4aa988b0b410093a94130fa56e37f..c48e4c73ae74fa537708a93ff94d3df538ecddef 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -73,7 +73,6 @@ HardwareRenderer::~HardwareRenderer() {
bool HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info, DrawGLResult* result) {
TRACE_EVENT0("android_webview", "HardwareRenderer::DrawGL");
GLViewRendererManager::GetInstance()->DidDrawGL(manager_key_);
- const DrawGLInput input = shared_renderer_state_->GetDrawGLInput();
// We need to watch if the current Android context has changed and enforce
// a clean-up in the compositor.
@@ -90,9 +89,12 @@ bool HardwareRenderer::DrawGL(AwDrawGLInfo* draw_info, DrawGLResult* result) {
ScopedAppGLStateRestore state_restore(ScopedAppGLStateRestore::MODE_DRAW);
internal::ScopedAllowGL allow_gl;
- if (draw_info->mode == AwDrawGLInfo::kModeProcess)
+ if (draw_info->mode != AwDrawGLInfo::kModeDraw)
return false;
+ // Should only need to access SharedRendererState in kModeDraw and kModeSync.
+ const DrawGLInput input = shared_renderer_state_->GetDrawGLInput();
+
// Update memory budget. This will no-op in compositor if the policy has not
// changed since last draw.
content::SynchronousCompositorMemoryPolicy policy;
« no previous file with comments | « no previous file | android_webview/public/browser/draw_gl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698