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

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

Issue 349653004: Merge 279934 "aw: Fix hardware teardown race" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 5 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 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 hardware_enabled_ = false; 439 hardware_enabled_ = false;
440 } 440 }
441 SynchronousCompositorMemoryPolicy zero_policy; 441 SynchronousCompositorMemoryPolicy zero_policy;
442 RequestMemoryPolicy(zero_policy); 442 RequestMemoryPolicy(zero_policy);
443 GlobalTileManager::GetInstance()->Remove(tile_manager_key_); 443 GlobalTileManager::GetInstance()->Remove(tile_manager_key_);
444 // The hardware resources are released in the destructor of hardware renderer, 444 // The hardware resources are released in the destructor of hardware renderer,
445 // so we don't need to do it here. 445 // so we don't need to do it here.
446 // See AwContents::ReleaseHardwareDrawOnRenderThread(JNIEnv*, jobject). 446 // See AwContents::ReleaseHardwareDrawOnRenderThread(JNIEnv*, jobject).
447 } 447 }
448 448
449 bool BrowserViewRenderer::IsAttachedToWindow() const {
450 return attached_to_window_;
451 }
452
453 bool BrowserViewRenderer::IsVisible() const { 449 bool BrowserViewRenderer::IsVisible() const {
454 // Ignore |window_visible_| if |attached_to_window_| is false. 450 // Ignore |window_visible_| if |attached_to_window_| is false.
455 return view_visible_ && (!attached_to_window_ || window_visible_); 451 return view_visible_ && (!attached_to_window_ || window_visible_);
456 } 452 }
457 453
458 gfx::Rect BrowserViewRenderer::GetScreenRect() const { 454 gfx::Rect BrowserViewRenderer::GetScreenRect() const {
459 return gfx::Rect(client_->GetLocationOnScreen(), gfx::Size(width_, height_)); 455 return gfx::Rect(client_->GetLocationOnScreen(), gfx::Size(width_, height_));
460 } 456 }
461 457
462 void BrowserViewRenderer::DidInitializeCompositor( 458 void BrowserViewRenderer::DidInitializeCompositor(
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 base::StringAppendF(&str, 759 base::StringAppendF(&str,
764 "surface width height: [%d %d] ", 760 "surface width height: [%d %d] ",
765 draw_info->width, 761 draw_info->width,
766 draw_info->height); 762 draw_info->height);
767 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer); 763 base::StringAppendF(&str, "is_layer: %d ", draw_info->is_layer);
768 } 764 }
769 return str; 765 return str;
770 } 766 }
771 767
772 } // namespace android_webview 768 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.h ('k') | android_webview/browser/shared_renderer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698