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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 139383006: Pass allow_delayed_resize in CompositorFrameMetadata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass allow_delayed_resize in CompositorFrameMetadata Created 6 years, 11 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 | « content/browser/android/content_view_core_impl.cc ('k') | content/common/cc_messages.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 SkCanvas canvas(bitmap); 907 SkCanvas canvas(bitmap);
908 canvas.scale( 908 canvas.scale(
909 (float)dst_size_in_pixel.width() / (float)src_subrect_in_pixel.width(), 909 (float)dst_size_in_pixel.width() / (float)src_subrect_in_pixel.width(),
910 (float)dst_size_in_pixel.height() / (float)src_subrect_in_pixel.height()); 910 (float)dst_size_in_pixel.height() / (float)src_subrect_in_pixel.height());
911 compositor->DemandDrawSw(&canvas); 911 compositor->DemandDrawSw(&canvas);
912 callback.Run(true, bitmap); 912 callback.Run(true, bitmap);
913 } 913 }
914 914
915 void RenderWidgetHostViewAndroid::UpdateContentViewCoreFrameMetadata( 915 void RenderWidgetHostViewAndroid::UpdateContentViewCoreFrameMetadata(
916 const cc::CompositorFrameMetadata& frame_metadata) { 916 const cc::CompositorFrameMetadata& frame_metadata) {
917 if (content_view_core_) { 917 if (content_view_core_)
918 // All offsets and sizes are in CSS pixels. 918 content_view_core_->UpdateFrameInfo(frame_metadata);
919 content_view_core_->UpdateFrameInfo(
920 frame_metadata.root_scroll_offset,
921 frame_metadata.page_scale_factor,
922 gfx::Vector2dF(frame_metadata.min_page_scale_factor,
923 frame_metadata.max_page_scale_factor),
924 frame_metadata.root_layer_size,
925 frame_metadata.viewport_size,
926 frame_metadata.location_bar_offset,
927 frame_metadata.location_bar_content_translation,
928 frame_metadata.overdraw_bottom_height);
929 }
930 } 919 }
931 920
932 void RenderWidgetHostViewAndroid::AcceleratedSurfaceInitialized(int host_id, 921 void RenderWidgetHostViewAndroid::AcceleratedSurfaceInitialized(int host_id,
933 int route_id) { 922 int route_id) {
934 accelerated_surface_route_id_ = route_id; 923 accelerated_surface_route_id_ = route_id;
935 } 924 }
936 925
937 void RenderWidgetHostViewAndroid::AcceleratedSurfaceBuffersSwapped( 926 void RenderWidgetHostViewAndroid::AcceleratedSurfaceBuffersSwapped(
938 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params, 927 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
939 int gpu_host_id) { 928 int gpu_host_id) {
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 // RenderWidgetHostView, public: 1469 // RenderWidgetHostView, public:
1481 1470
1482 // static 1471 // static
1483 RenderWidgetHostView* 1472 RenderWidgetHostView*
1484 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1473 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1485 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1474 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1486 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1475 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1487 } 1476 }
1488 1477
1489 } // namespace content 1478 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698