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

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

Issue 1150423003: webview: Initialize synchronous compositor after first activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix broken tests Created 5 years, 6 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
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/child_frame.h" 8 #include "android_webview/browser/child_frame.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 DCHECK(compositor); 443 DCHECK(compositor);
444 DCHECK(!compositor_); 444 DCHECK(!compositor_);
445 compositor_ = compositor; 445 compositor_ = compositor;
446 UpdateCompositorIsActive(); 446 UpdateCompositorIsActive();
447 } 447 }
448 448
449 void BrowserViewRenderer::DidDestroyCompositor( 449 void BrowserViewRenderer::DidDestroyCompositor(
450 content::SynchronousCompositor* compositor) { 450 content::SynchronousCompositor* compositor) {
451 TRACE_EVENT0("android_webview", "BrowserViewRenderer::DidDestroyCompositor"); 451 TRACE_EVENT0("android_webview", "BrowserViewRenderer::DidDestroyCompositor");
452 DCHECK(compositor_); 452 DCHECK(compositor_);
453 compositor_->SetIsActive(false);
453 compositor_ = NULL; 454 compositor_ = NULL;
454 } 455 }
455 456
456 void BrowserViewRenderer::SetDipScale(float dip_scale) { 457 void BrowserViewRenderer::SetDipScale(float dip_scale) {
457 dip_scale_ = dip_scale; 458 dip_scale_ = dip_scale;
458 CHECK_GT(dip_scale_, 0.f); 459 CHECK_GT(dip_scale_, 0.f);
459 } 460 }
460 461
461 gfx::Vector2d BrowserViewRenderer::max_scroll_offset() const { 462 gfx::Vector2d BrowserViewRenderer::max_scroll_offset() const {
462 DCHECK_GT(dip_scale_, 0.f); 463 DCHECK_GT(dip_scale_, 0.f);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 base::StringAppendF(&str, 727 base::StringAppendF(&str,
727 "overscroll_rounding_error_: %s ", 728 "overscroll_rounding_error_: %s ",
728 overscroll_rounding_error_.ToString().c_str()); 729 overscroll_rounding_error_.ToString().c_str());
729 base::StringAppendF( 730 base::StringAppendF(
730 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 731 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
731 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 732 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
732 return str; 733 return str;
733 } 734 }
734 735
735 } // namespace android_webview 736 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698