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

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

Issue 12567020: [android] Resize the android_webview if it's 0x0 initially. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser_view_renderer_impl.h" 5 #include "android_webview/browser/browser_view_renderer_impl.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "android_webview/common/renderer_picture_map.h" 9 #include "android_webview/common/renderer_picture_map.h"
10 #include "android_webview/public/browser/draw_gl.h" 10 #include "android_webview/public/browser/draw_gl.h"
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // TODO(leandrogracia): this can be made unconditional once software rendering 469 // TODO(leandrogracia): this can be made unconditional once software rendering
470 // uses Ubercompositor. Until then this path is required for SW invalidations. 470 // uses Ubercompositor. Until then this path is required for SW invalidations.
471 if (on_new_picture_mode_ == kOnNewPictureEnabled) 471 if (on_new_picture_mode_ == kOnNewPictureEnabled)
472 client_->OnNewPicture(CapturePicture()); 472 client_->OnNewPicture(CapturePicture());
473 473
474 // TODO(leandrogracia): delete when sw rendering uses Ubercompositor. 474 // TODO(leandrogracia): delete when sw rendering uses Ubercompositor.
475 // Invalidation should be provided by the compositor only. 475 // Invalidation should be provided by the compositor only.
476 Invalidate(); 476 Invalidate();
477 } 477 }
478 478
479 void BrowserViewRendererImpl::OnPageScaleFactorChanged(
480 int process_id,
481 int render_view_id,
482 float page_scale_factor) {
483 CHECK_EQ(web_contents_->GetRenderProcessHost()->GetID(), process_id);
484 if (render_view_id != web_contents_->GetRoutingID())
485 return;
486
487 client_->OnPageScaleFactorChanged(page_scale_factor);
488 }
489
479 void BrowserViewRendererImpl::SetCompositorVisibility(bool visible) { 490 void BrowserViewRendererImpl::SetCompositorVisibility(bool visible) {
480 if (compositor_visible_ != visible) { 491 if (compositor_visible_ != visible) {
481 compositor_visible_ = visible; 492 compositor_visible_ = visible;
482 compositor_->SetVisible(compositor_visible_); 493 compositor_->SetVisible(compositor_visible_);
483 } 494 }
484 } 495 }
485 496
486 void BrowserViewRendererImpl::ResetCompositor() { 497 void BrowserViewRendererImpl::ResetCompositor() {
487 compositor_.reset(content::Compositor::Create(this)); 498 compositor_.reset(content::Compositor::Create(this));
488 compositor_->SetRootLayer(scissor_clip_layer_); 499 compositor_->SetRootLayer(scissor_clip_layer_);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 538
528 void BrowserViewRendererImpl::OnFrameInfoUpdated( 539 void BrowserViewRendererImpl::OnFrameInfoUpdated(
529 const gfx::SizeF& content_size, 540 const gfx::SizeF& content_size,
530 const gfx::Vector2dF& scroll_offset, 541 const gfx::Vector2dF& scroll_offset,
531 float page_scale_factor) { 542 float page_scale_factor) {
532 page_scale_ = page_scale_factor; 543 page_scale_ = page_scale_factor;
533 content_size_css_ = content_size; 544 content_size_css_ = content_size;
534 } 545 }
535 546
536 } // namespace android_webview 547 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer_impl.h ('k') | android_webview/browser/renderer_host/view_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698