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

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

Issue 1001643004: Remove android webview rendering cruft (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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 "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 view_visible_(false), 91 view_visible_(false),
92 window_visible_(false), 92 window_visible_(false),
93 attached_to_window_(false), 93 attached_to_window_(false),
94 hardware_enabled_(false), 94 hardware_enabled_(false),
95 dip_scale_(0.0), 95 dip_scale_(0.0),
96 page_scale_factor_(1.0), 96 page_scale_factor_(1.0),
97 on_new_picture_enable_(false), 97 on_new_picture_enable_(false),
98 clear_view_(false), 98 clear_view_(false),
99 offscreen_pre_raster_(false), 99 offscreen_pre_raster_(false),
100 compositor_needs_continuous_invalidate_(false), 100 compositor_needs_continuous_invalidate_(false),
101 invalidate_after_composite_(false),
102 block_invalidates_(false), 101 block_invalidates_(false),
103 fallback_tick_pending_(false) { 102 fallback_tick_pending_(false) {
104 } 103 }
105 104
106 BrowserViewRenderer::~BrowserViewRenderer() { 105 BrowserViewRenderer::~BrowserViewRenderer() {
107 } 106 }
108 107
109 void BrowserViewRenderer::RegisterWithWebContents( 108 void BrowserViewRenderer::RegisterWithWebContents(
110 content::WebContents* web_contents) { 109 content::WebContents* web_contents) {
111 web_contents->SetUserData(kBrowserViewRendererUserDataKey, 110 web_contents->SetUserData(kBrowserViewRendererUserDataKey,
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 if (!hardware_enabled_) { 208 if (!hardware_enabled_) {
210 TRACE_EVENT0("android_webview", "InitializeHwDraw"); 209 TRACE_EVENT0("android_webview", "InitializeHwDraw");
211 hardware_enabled_ = compositor_->InitializeHwDraw(); 210 hardware_enabled_ = compositor_->InitializeHwDraw();
212 } 211 }
213 if (!hardware_enabled_) { 212 if (!hardware_enabled_) {
214 TRACE_EVENT_INSTANT0("android_webview", "EarlyOut_HardwareNotEnabled", 213 TRACE_EVENT_INSTANT0("android_webview", "EarlyOut_HardwareNotEnabled",
215 TRACE_EVENT_SCOPE_THREAD); 214 TRACE_EVENT_SCOPE_THREAD);
216 return false; 215 return false;
217 } 216 }
218 217
219 ReturnResourceFromParent(); 218 return CompositeHw();
220 if (shared_renderer_state_.HasCompositorFrameOnUI()) {
221 TRACE_EVENT_INSTANT0("android_webview",
222 "EarlyOut_PreviousFrameUnconsumed",
223 TRACE_EVENT_SCOPE_THREAD);
224 DidSkipCompositeInDraw();
225 return true;
226 }
227
228 scoped_ptr<cc::CompositorFrame> frame = CompositeHw();
229 if (!frame.get()) {
230 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame",
231 TRACE_EVENT_SCOPE_THREAD);
232 return false;
233 }
234
235 shared_renderer_state_.SetCompositorFrameOnUI(frame.Pass(), false);
236 return true;
237 } 219 }
238 220
239 scoped_ptr<cc::CompositorFrame> BrowserViewRenderer::CompositeHw() { 221 bool BrowserViewRenderer::CompositeHw() {
222 ReturnResourceFromParent();
240 compositor_->SetMemoryPolicy(CalculateDesiredMemoryPolicy()); 223 compositor_->SetMemoryPolicy(CalculateDesiredMemoryPolicy());
241 224
242 parent_draw_constraints_ = 225 parent_draw_constraints_ =
243 shared_renderer_state_.GetParentDrawConstraintsOnUI(); 226 shared_renderer_state_.GetParentDrawConstraintsOnUI();
244 gfx::Size surface_size(size_); 227 gfx::Size surface_size(size_);
245 gfx::Rect viewport(surface_size); 228 gfx::Rect viewport(surface_size);
246 gfx::Rect clip = viewport; 229 gfx::Rect clip = viewport;
247 gfx::Transform transform_for_tile_priority = 230 gfx::Transform transform_for_tile_priority =
248 parent_draw_constraints_.transform; 231 parent_draw_constraints_.transform;
249 232
250 // If the WebView is on a layer, WebView does not know what transform is 233 // If the WebView is on a layer, WebView does not know what transform is
251 // applied onto the layer so global visible rect does not make sense here. 234 // applied onto the layer so global visible rect does not make sense here.
252 // In this case, just use the surface rect for tiling. 235 // In this case, just use the surface rect for tiling.
253 gfx::Rect viewport_rect_for_tile_priority; 236 gfx::Rect viewport_rect_for_tile_priority;
254 237
255 // Leave viewport_rect_for_tile_priority empty if offscreen_pre_raster_ is on. 238 // Leave viewport_rect_for_tile_priority empty if offscreen_pre_raster_ is on.
256 if (!offscreen_pre_raster_) { 239 if (!offscreen_pre_raster_) {
257 if (parent_draw_constraints_.is_layer || 240 if (parent_draw_constraints_.is_layer) {
258 last_on_draw_global_visible_rect_.IsEmpty()) {
259 viewport_rect_for_tile_priority = parent_draw_constraints_.surface_rect; 241 viewport_rect_for_tile_priority = parent_draw_constraints_.surface_rect;
260 } else { 242 } else {
261 viewport_rect_for_tile_priority = last_on_draw_global_visible_rect_; 243 viewport_rect_for_tile_priority = last_on_draw_global_visible_rect_;
262 } 244 }
263 } 245 }
264 246
265 scoped_ptr<cc::CompositorFrame> frame = 247 scoped_ptr<cc::CompositorFrame> frame =
266 compositor_->DemandDrawHw(surface_size, 248 compositor_->DemandDrawHw(surface_size,
267 gfx::Transform(), 249 gfx::Transform(),
268 viewport, 250 viewport,
269 clip, 251 clip,
270 viewport_rect_for_tile_priority, 252 viewport_rect_for_tile_priority,
271 transform_for_tile_priority); 253 transform_for_tile_priority);
272 if (frame.get()) 254 if (!frame.get()) {
273 DidComposite(); 255 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame",
274 return frame.Pass(); 256 TRACE_EVENT_SCOPE_THREAD);
257 return false;
258 }
259
260 DidComposite();
261 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI());
hush (inactive) 2015/03/13 18:45:17 so this is the case where the kModeDraw does not c
boliu 2015/03/18 02:02:22 This is copied from fallback tick run. So if there
262 shared_renderer_state_.SetCompositorFrameOnUI(frame.Pass());
263 return true;
275 } 264 }
276 265
277 void BrowserViewRenderer::UpdateParentDrawConstraints() { 266 void BrowserViewRenderer::UpdateParentDrawConstraints() {
278 // Post an invalidate if the parent draw constraints are stale and there is 267 if (!parent_draw_constraints_.Equals(
279 // no pending invalidate.
280 bool needs_force_invalidate =
281 shared_renderer_state_.NeedsForceInvalidateOnNextDrawGLOnUI();
282 if (needs_force_invalidate ||
283 !parent_draw_constraints_.Equals(
284 shared_renderer_state_.GetParentDrawConstraintsOnUI())) { 268 shared_renderer_state_.GetParentDrawConstraintsOnUI())) {
285 shared_renderer_state_.SetForceInvalidateOnNextDrawGLOnUI(false); 269 EnsureContinuousInvalidation(true);
286 EnsureContinuousInvalidation(true, needs_force_invalidate);
287 } 270 }
288 } 271 }
289 272
290 void BrowserViewRenderer::ReturnUnusedResource( 273 void BrowserViewRenderer::ReturnUnusedResource(
291 scoped_ptr<cc::CompositorFrame> frame) { 274 scoped_ptr<cc::CompositorFrame> frame) {
292 if (!frame.get()) 275 if (!frame.get())
293 return; 276 return;
294 277
295 cc::CompositorFrameAck frame_ack; 278 cc::CompositorFrameAck frame_ack;
296 cc::TransferableResource::ReturnResources( 279 cc::TransferableResource::ReturnResources(
297 frame->delegated_frame_data->resource_list, &frame_ack.resources); 280 frame->delegated_frame_data->resource_list, &frame_ack.resources);
298 if (compositor_ && !frame_ack.resources.empty()) 281 if (compositor_ && !frame_ack.resources.empty())
299 compositor_->ReturnResources(frame_ack); 282 compositor_->ReturnResources(frame_ack);
300 } 283 }
301 284
302 void BrowserViewRenderer::ReturnResourceFromParent() { 285 void BrowserViewRenderer::ReturnResourceFromParent() {
303 cc::CompositorFrameAck frame_ack; 286 cc::CompositorFrameAck frame_ack;
304 shared_renderer_state_.SwapReturnedResourcesOnUI(&frame_ack.resources); 287 shared_renderer_state_.SwapReturnedResourcesOnUI(&frame_ack.resources);
305 if (compositor_ && !frame_ack.resources.empty()) { 288 if (compositor_ && !frame_ack.resources.empty()) {
306 compositor_->ReturnResources(frame_ack); 289 compositor_->ReturnResources(frame_ack);
307 } 290 }
308 } 291 }
309 292
310 void BrowserViewRenderer::DidSkipCommitFrame() {
311 // Treat it the same way as skipping onDraw.
312 DidSkipCompositeInDraw();
313 }
314
315 void BrowserViewRenderer::DetachFunctorFromView() { 293 void BrowserViewRenderer::DetachFunctorFromView() {
316 client_->DetachFunctorFromView(); 294 client_->DetachFunctorFromView();
317 } 295 }
318 296
319 bool BrowserViewRenderer::OnDrawSoftware(SkCanvas* canvas) { 297 bool BrowserViewRenderer::OnDrawSoftware(SkCanvas* canvas) {
320 return CanOnDraw() && CompositeSW(canvas); 298 return CanOnDraw() && CompositeSW(canvas);
321 } 299 }
322 300
323 skia::RefPtr<SkPicture> BrowserViewRenderer::CapturePicture(int width, 301 skia::RefPtr<SkPicture> BrowserViewRenderer::CapturePicture(int width,
324 int height) { 302 int height) {
(...skipping 24 matching lines...) Expand all
349 327
350 void BrowserViewRenderer::ClearView() { 328 void BrowserViewRenderer::ClearView() {
351 TRACE_EVENT_INSTANT0("android_webview", 329 TRACE_EVENT_INSTANT0("android_webview",
352 "BrowserViewRenderer::ClearView", 330 "BrowserViewRenderer::ClearView",
353 TRACE_EVENT_SCOPE_THREAD); 331 TRACE_EVENT_SCOPE_THREAD);
354 if (clear_view_) 332 if (clear_view_)
355 return; 333 return;
356 334
357 clear_view_ = true; 335 clear_view_ = true;
358 // Always invalidate ignoring the compositor to actually clear the webview. 336 // Always invalidate ignoring the compositor to actually clear the webview.
359 EnsureContinuousInvalidation(true, false); 337 EnsureContinuousInvalidation(true);
360 } 338 }
361 339
362 void BrowserViewRenderer::SetOffscreenPreRaster(bool enable) { 340 void BrowserViewRenderer::SetOffscreenPreRaster(bool enable) {
363 // TODO(hush): anything to do when the setting is toggled? 341 // TODO(hush): anything to do when the setting is toggled?
364 offscreen_pre_raster_ = enable; 342 offscreen_pre_raster_ = enable;
365 } 343 }
366 344
367 void BrowserViewRenderer::SetIsPaused(bool paused) { 345 void BrowserViewRenderer::SetIsPaused(bool paused) {
368 TRACE_EVENT_INSTANT1("android_webview", 346 TRACE_EVENT_INSTANT1("android_webview",
369 "BrowserViewRenderer::SetIsPaused", 347 "BrowserViewRenderer::SetIsPaused",
370 TRACE_EVENT_SCOPE_THREAD, 348 TRACE_EVENT_SCOPE_THREAD,
371 "paused", 349 "paused",
372 paused); 350 paused);
373 is_paused_ = paused; 351 is_paused_ = paused;
374 EnsureContinuousInvalidation(false, false); 352 EnsureContinuousInvalidation(false);
375 } 353 }
376 354
377 void BrowserViewRenderer::SetViewVisibility(bool view_visible) { 355 void BrowserViewRenderer::SetViewVisibility(bool view_visible) {
378 TRACE_EVENT_INSTANT1("android_webview", 356 TRACE_EVENT_INSTANT1("android_webview",
379 "BrowserViewRenderer::SetViewVisibility", 357 "BrowserViewRenderer::SetViewVisibility",
380 TRACE_EVENT_SCOPE_THREAD, 358 TRACE_EVENT_SCOPE_THREAD,
381 "view_visible", 359 "view_visible",
382 view_visible); 360 view_visible);
383 view_visible_ = view_visible; 361 view_visible_ = view_visible;
384 } 362 }
385 363
386 void BrowserViewRenderer::SetWindowVisibility(bool window_visible) { 364 void BrowserViewRenderer::SetWindowVisibility(bool window_visible) {
387 TRACE_EVENT_INSTANT1("android_webview", 365 TRACE_EVENT_INSTANT1("android_webview",
388 "BrowserViewRenderer::SetWindowVisibility", 366 "BrowserViewRenderer::SetWindowVisibility",
389 TRACE_EVENT_SCOPE_THREAD, 367 TRACE_EVENT_SCOPE_THREAD,
390 "window_visible", 368 "window_visible",
391 window_visible); 369 window_visible);
392 window_visible_ = window_visible; 370 window_visible_ = window_visible;
393 EnsureContinuousInvalidation(false, false); 371 EnsureContinuousInvalidation(false);
394 } 372 }
395 373
396 void BrowserViewRenderer::OnSizeChanged(int width, int height) { 374 void BrowserViewRenderer::OnSizeChanged(int width, int height) {
397 TRACE_EVENT_INSTANT2("android_webview", 375 TRACE_EVENT_INSTANT2("android_webview",
398 "BrowserViewRenderer::OnSizeChanged", 376 "BrowserViewRenderer::OnSizeChanged",
399 TRACE_EVENT_SCOPE_THREAD, 377 TRACE_EVENT_SCOPE_THREAD,
400 "width", 378 "width",
401 width, 379 width,
402 "height", 380 "height",
403 height); 381 height);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 if (compositor_needs_continuous_invalidate_ == invalidate) 442 if (compositor_needs_continuous_invalidate_ == invalidate)
465 return; 443 return;
466 444
467 TRACE_EVENT_INSTANT1("android_webview", 445 TRACE_EVENT_INSTANT1("android_webview",
468 "BrowserViewRenderer::SetContinuousInvalidate", 446 "BrowserViewRenderer::SetContinuousInvalidate",
469 TRACE_EVENT_SCOPE_THREAD, 447 TRACE_EVENT_SCOPE_THREAD,
470 "invalidate", 448 "invalidate",
471 invalidate); 449 invalidate);
472 compositor_needs_continuous_invalidate_ = invalidate; 450 compositor_needs_continuous_invalidate_ = invalidate;
473 451
474 EnsureContinuousInvalidation(false, false); 452 EnsureContinuousInvalidation(false);
475 } 453 }
476 454
477 void BrowserViewRenderer::SetDipScale(float dip_scale) { 455 void BrowserViewRenderer::SetDipScale(float dip_scale) {
478 dip_scale_ = dip_scale; 456 dip_scale_ = dip_scale;
479 CHECK_GT(dip_scale_, 0.f); 457 CHECK_GT(dip_scale_, 0.f);
480 } 458 }
481 459
482 gfx::Vector2d BrowserViewRenderer::max_scroll_offset() const { 460 gfx::Vector2d BrowserViewRenderer::max_scroll_offset() const {
483 DCHECK_GT(dip_scale_, 0.f); 461 DCHECK_GT(dip_scale_, 0.f);
484 return gfx::ToCeiledVector2d(gfx::ScaleVector2d( 462 return gfx::ToCeiledVector2d(gfx::ScaleVector2d(
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 gfx::Vector2dF scaled_overscroll_delta = 613 gfx::Vector2dF scaled_overscroll_delta =
636 gfx::ScaleVector2d(latest_overscroll_delta, physical_pixel_scale); 614 gfx::ScaleVector2d(latest_overscroll_delta, physical_pixel_scale);
637 gfx::Vector2d rounded_overscroll_delta = gfx::ToRoundedVector2d( 615 gfx::Vector2d rounded_overscroll_delta = gfx::ToRoundedVector2d(
638 scaled_overscroll_delta + overscroll_rounding_error_); 616 scaled_overscroll_delta + overscroll_rounding_error_);
639 overscroll_rounding_error_ = 617 overscroll_rounding_error_ =
640 scaled_overscroll_delta - rounded_overscroll_delta; 618 scaled_overscroll_delta - rounded_overscroll_delta;
641 client_->DidOverscroll(rounded_overscroll_delta); 619 client_->DidOverscroll(rounded_overscroll_delta);
642 } 620 }
643 621
644 void BrowserViewRenderer::EnsureContinuousInvalidation( 622 void BrowserViewRenderer::EnsureContinuousInvalidation(
645 bool force_invalidate, 623 bool force_invalidate) {
646 bool skip_reschedule_tick) {
647 if (force_invalidate)
648 invalidate_after_composite_ = true;
649
650 // This method should be called again when any of these conditions change. 624 // This method should be called again when any of these conditions change.
651 bool need_invalidate = 625 bool need_invalidate =
652 compositor_needs_continuous_invalidate_ || invalidate_after_composite_; 626 compositor_needs_continuous_invalidate_ || force_invalidate;
653 if (!need_invalidate || block_invalidates_) 627 if (!need_invalidate || block_invalidates_)
654 return; 628 return;
655 629
656 if (!compositor_needs_continuous_invalidate_ && invalidate_after_composite_)
657 invalidate_after_composite_ = false;
658
659 // Always call view invalidate. We rely the Android framework to ignore the 630 // Always call view invalidate. We rely the Android framework to ignore the
660 // invalidate when it's not needed such as when view is not visible. 631 // invalidate when it's not needed such as when view is not visible.
661 client_->PostInvalidate(); 632 client_->PostInvalidate();
662 633
663 // Stop fallback ticks when one of these is true. 634 // Stop fallback ticks when one of these is true.
664 // 1) Webview is paused. Also need to check we are not in clear view since 635 // 1) Webview is paused. Also need to check we are not in clear view since
665 // paused, offscreen still expect clear view to recover. 636 // paused, offscreen still expect clear view to recover.
666 // 2) If we are attached to window and the window is not visible (eg when 637 // 2) If we are attached to window and the window is not visible (eg when
667 // app is in the background). We are sure in this case the webview is used 638 // app is in the background). We are sure in this case the webview is used
668 // "on-screen" but that updates are not needed when in the background. 639 // "on-screen" but that updates are not needed when in the background.
669 bool throttle_fallback_tick = 640 bool throttle_fallback_tick =
670 (is_paused_ && !clear_view_) || (attached_to_window_ && !window_visible_); 641 (is_paused_ && !clear_view_) || (attached_to_window_ && !window_visible_);
671 if (throttle_fallback_tick) 642 if (throttle_fallback_tick)
672 return; 643 return;
673 644
674 block_invalidates_ = compositor_needs_continuous_invalidate_; 645 block_invalidates_ = compositor_needs_continuous_invalidate_;
675 if (skip_reschedule_tick && fallback_tick_pending_) 646 if (fallback_tick_pending_)
676 return; 647 return;
677 648
678 // Unretained here is safe because the callbacks are cancelled when 649 // Unretained here is safe because the callbacks are cancelled when
679 // they are destroyed. 650 // they are destroyed.
680 post_fallback_tick_.Reset(base::Bind(&BrowserViewRenderer::PostFallbackTick, 651 post_fallback_tick_.Reset(base::Bind(&BrowserViewRenderer::PostFallbackTick,
681 base::Unretained(this))); 652 base::Unretained(this)));
682 fallback_tick_fired_.Cancel(); 653 fallback_tick_fired_.Cancel();
683 fallback_tick_pending_ = false; 654 fallback_tick_pending_ = false;
684 655
685 // No need to reschedule fallback tick if compositor does not need to be 656 // No need to reschedule fallback tick if compositor does not need to be
(...skipping 25 matching lines...) Expand all
711 "BrowserViewRenderer::FallbackTickFired", 682 "BrowserViewRenderer::FallbackTickFired",
712 "compositor_needs_continuous_invalidate_", 683 "compositor_needs_continuous_invalidate_",
713 compositor_needs_continuous_invalidate_); 684 compositor_needs_continuous_invalidate_);
714 685
715 // This should only be called if OnDraw or DrawGL did not come in time, which 686 // This should only be called if OnDraw or DrawGL did not come in time, which
716 // means block_invalidates_ must still be true. 687 // means block_invalidates_ must still be true.
717 DCHECK(block_invalidates_); 688 DCHECK(block_invalidates_);
718 fallback_tick_pending_ = false; 689 fallback_tick_pending_ = false;
719 if (compositor_needs_continuous_invalidate_ && compositor_) { 690 if (compositor_needs_continuous_invalidate_ && compositor_) {
720 if (hardware_enabled_) { 691 if (hardware_enabled_) {
721 ReturnResourceFromParent(); 692 CompositeHw();
722 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI());
723 scoped_ptr<cc::CompositorFrame> frame = CompositeHw();
724 if (frame.get()) {
725 shared_renderer_state_.SetCompositorFrameOnUI(frame.Pass(), true);
726 }
727 } else { 693 } else {
728 ForceFakeCompositeSW(); 694 ForceFakeCompositeSW();
729 } 695 }
730 } else { 696 } else {
731 // Pretend we just composited to unblock further invalidates. 697 // Pretend we just composited to unblock further invalidates.
732 DidComposite(); 698 DidComposite();
733 } 699 }
734 } 700 }
735 701
736 void BrowserViewRenderer::ForceFakeCompositeSW() { 702 void BrowserViewRenderer::ForceFakeCompositeSW() {
(...skipping 11 matching lines...) Expand all
748 bool result = compositor_->DemandDrawSw(canvas); 714 bool result = compositor_->DemandDrawSw(canvas);
749 DidComposite(); 715 DidComposite();
750 return result; 716 return result;
751 } 717 }
752 718
753 void BrowserViewRenderer::DidComposite() { 719 void BrowserViewRenderer::DidComposite() {
754 block_invalidates_ = false; 720 block_invalidates_ = false;
755 post_fallback_tick_.Cancel(); 721 post_fallback_tick_.Cancel();
756 fallback_tick_fired_.Cancel(); 722 fallback_tick_fired_.Cancel();
757 fallback_tick_pending_ = false; 723 fallback_tick_pending_ = false;
758 EnsureContinuousInvalidation(false, false); 724 EnsureContinuousInvalidation(false);
759 }
760
761 void BrowserViewRenderer::DidSkipCompositeInDraw() {
762 block_invalidates_ = false;
763 EnsureContinuousInvalidation(true, true);
764 } 725 }
765 726
766 std::string BrowserViewRenderer::ToString() const { 727 std::string BrowserViewRenderer::ToString() const {
767 std::string str; 728 std::string str;
768 base::StringAppendF(&str, "is_paused: %d ", is_paused_); 729 base::StringAppendF(&str, "is_paused: %d ", is_paused_);
769 base::StringAppendF(&str, "view_visible: %d ", view_visible_); 730 base::StringAppendF(&str, "view_visible: %d ", view_visible_);
770 base::StringAppendF(&str, "window_visible: %d ", window_visible_); 731 base::StringAppendF(&str, "window_visible: %d ", window_visible_);
771 base::StringAppendF(&str, "dip_scale: %f ", dip_scale_); 732 base::StringAppendF(&str, "dip_scale: %f ", dip_scale_);
772 base::StringAppendF(&str, "page_scale_factor: %f ", page_scale_factor_); 733 base::StringAppendF(&str, "page_scale_factor: %f ", page_scale_factor_);
773 base::StringAppendF(&str, 734 base::StringAppendF(&str,
(...skipping 10 matching lines...) Expand all
784 base::StringAppendF(&str, 745 base::StringAppendF(&str,
785 "overscroll_rounding_error_: %s ", 746 "overscroll_rounding_error_: %s ",
786 overscroll_rounding_error_.ToString().c_str()); 747 overscroll_rounding_error_.ToString().c_str());
787 base::StringAppendF( 748 base::StringAppendF(
788 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 749 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
789 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 750 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
790 return str; 751 return str;
791 } 752 }
792 753
793 } // namespace android_webview 754 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698