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

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

Issue 23943006: [Android WebView] Remove some obsolete TODOs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/aw_gl_surface.h" 9 #include "android_webview/browser/aw_gl_surface.h"
10 #include "android_webview/browser/scoped_app_gl_state_restore.h" 10 #include "android_webview/browser/scoped_app_gl_state_restore.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 InProcessViewRenderer::~InProcessViewRenderer() { 245 InProcessViewRenderer::~InProcessViewRenderer() {
246 CHECK(web_contents_); 246 CHECK(web_contents_);
247 content::SynchronousCompositor::SetClientForWebContents(web_contents_, NULL); 247 content::SynchronousCompositor::SetClientForWebContents(web_contents_, NULL);
248 web_contents_->SetUserData(kUserDataKey, NULL); 248 web_contents_->SetUserData(kUserDataKey, NULL);
249 NoLongerExpectsDrawGL(); 249 NoLongerExpectsDrawGL();
250 DCHECK(web_contents_ == NULL); // WebContentsGone should have been called. 250 DCHECK(web_contents_ == NULL); // WebContentsGone should have been called.
251 } 251 }
252 252
253
254 // TODO(boliu): Should also call this when we know for sure we are no longer,
255 // for example, when visible rect becomes 0.
256 void InProcessViewRenderer::NoLongerExpectsDrawGL() { 253 void InProcessViewRenderer::NoLongerExpectsDrawGL() {
257 GLViewRendererManager& mru = g_view_renderer_manager.Get(); 254 GLViewRendererManager& mru = g_view_renderer_manager.Get();
258 if (manager_key_ != mru.NullKey()) { 255 if (manager_key_ != mru.NullKey()) {
259 mru.NoLongerExpectsDrawGL(manager_key_); 256 mru.NoLongerExpectsDrawGL(manager_key_);
260 manager_key_ = mru.NullKey(); 257 manager_key_ = mru.NullKey();
261
262 // TODO(boliu): If this is the first one and there are GL pending,
263 // requestDrawGL on next one.
264 // TODO(boliu): If this is the last one, lose all global contexts.
265 } 258 }
266 } 259 }
267 260
268 // static 261 // static
269 InProcessViewRenderer* InProcessViewRenderer::FromWebContents( 262 InProcessViewRenderer* InProcessViewRenderer::FromWebContents(
270 content::WebContents* contents) { 263 content::WebContents* contents) {
271 return UserData::GetInstance(contents); 264 return UserData::GetInstance(contents);
272 } 265 }
273 266
274 void InProcessViewRenderer::WebContentsGone() { 267 void InProcessViewRenderer::WebContentsGone() {
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 base::StringAppendF(&str, 886 base::StringAppendF(&str,
894 "surface width height: [%d %d] ", 887 "surface width height: [%d %d] ",
895 draw_info->width, 888 draw_info->width,
896 draw_info->height); 889 draw_info->height);
897 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer); 890 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer);
898 } 891 }
899 return str; 892 return str;
900 } 893 }
901 894
902 } // namespace android_webview 895 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698