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

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

Issue 2244783005: Android: Don't evict thumbnails for last visible tab on stop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android: Don't evict thumbnails for last visible tab on stop Created 4 years, 3 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 | « chrome/browser/android/thumbnail/thumbnail_cache.cc ('k') | no next file » | 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 <utility> 9 #include <utility>
10 10
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 host_->SetBackgroundOpaque(GetBackgroundOpaque()); 812 host_->SetBackgroundOpaque(GetBackgroundOpaque());
813 UpdateBackgroundColor(color); 813 UpdateBackgroundColor(color);
814 } 814 }
815 815
816 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface( 816 void RenderWidgetHostViewAndroid::CopyFromCompositingSurface(
817 const gfx::Rect& src_subrect, 817 const gfx::Rect& src_subrect,
818 const gfx::Size& dst_size, 818 const gfx::Size& dst_size,
819 const ReadbackRequestCallback& callback, 819 const ReadbackRequestCallback& callback,
820 const SkColorType preferred_color_type) { 820 const SkColorType preferred_color_type) {
821 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface"); 821 TRACE_EVENT0("cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurface");
822 if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) { 822 if (!host_ || !IsSurfaceAvailableForCopy()) {
823 callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE); 823 callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE);
824 return; 824 return;
825 } 825 }
826 if (!content_view_core_ || !(content_view_core_->GetWindowAndroid())) { 826 if (!content_view_core_ || !(content_view_core_->GetWindowAndroid())) {
827 callback.Run(SkBitmap(), READBACK_FAILED); 827 callback.Run(SkBitmap(), READBACK_FAILED);
828 return; 828 return;
829 } 829 }
830 830
831 base::TimeTicks start_time = base::TimeTicks::Now(); 831 base::TimeTicks start_time = base::TimeTicks::Now();
832 const display::Display& display = 832 const display::Display& display =
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1862 case ui::MotionEvent::ACTION_UP: 1862 case ui::MotionEvent::ACTION_UP:
1863 case ui::MotionEvent::ACTION_POINTER_UP: 1863 case ui::MotionEvent::ACTION_POINTER_UP:
1864 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED", 1864 UMA_HISTOGRAM_CUSTOM_COUNTS("Event.Latency.OS.TOUCH_RELEASED",
1865 delta.InMicroseconds(), 1, 1000000, 50); 1865 delta.InMicroseconds(), 1, 1000000, 50);
1866 default: 1866 default:
1867 return; 1867 return;
1868 } 1868 }
1869 } 1869 }
1870 1870
1871 } // namespace content 1871 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/android/thumbnail/thumbnail_cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698