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

Issue 262543002: android: add ThumbnailCache (Closed)

Created:
6 years, 7 months ago by powei
Modified:
6 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, no sievers
Base URL:
https://chromium.googlesource.com/chromium/src.git@codec
Visibility:
Public.

Description

android: add ThumbnailCache The purpose of the thumbnail cache is to save resources and use static image instead of live pages when contents of a tab are needed for the browser UI. There are three forms of caching: - High-res - Low-res - On-disk If a high-res thumbnail is not available, then a low-res thumbnail is used while the on-disk version (always high-res) is being read. Eviction from the high/low-res caches is determined by a priority-ordered list of tab ids that is updated by the user. Compression of the thumbnail bitmaps are supported through third_party/android_opengl/etc1. The raw bitmaps are discarded once a compressed version is available. Compressed bitmaps are written to disk and uploaded as UIResource. Once both of tasks are complete, the compressed bitmap is also discarded. depends on: https://codereview.chromium.org/287593002/ android= https://chrome-internal-review.googlesource.com/#/c/160907/ BUG=341406, 357740 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284861

Patch Set 1 #

Patch Set 2 : upstreamed #

Patch Set 3 : remove ntp and pinned #

Patch Set 4 : removed stacked reads #

Patch Set 5 : renamed ThumbnailCacheCore to ThumbnailCache #

Total comments: 2

Patch Set 6 : separate into multiple files #

Total comments: 34

Patch Set 7 : addressed some of dtrainor's comments #

Patch Set 8 : addressed comments #

Total comments: 47

Patch Set 9 : addressed comments #

Patch Set 10 : addressed more comments #

Patch Set 11 : nits #

Patch Set 12 : rename ThumbnailCache to ThumbnailStore to avoid downstream conflict #

Patch Set 13 : added DEPS file #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1298 lines, -5 lines) Patch
A chrome/browser/android/thumbnail/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/android/thumbnail/scoped_ptr_expiring_cache.h View 1 2 3 4 5 6 7 8 1 chunk +72 lines, -0 lines 0 comments Download
A chrome/browser/android/thumbnail/scoped_ptr_expiring_cache_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +165 lines, -0 lines 0 comments Download
A chrome/browser/android/thumbnail/thumbnail.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +93 lines, -0 lines 0 comments Download
A chrome/browser/android/thumbnail/thumbnail.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +105 lines, -0 lines 0 comments Download
A chrome/browser/android/thumbnail/thumbnail_store.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +159 lines, -0 lines 0 comments Download
A chrome/browser/android/thumbnail/thumbnail_store.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +687 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/content_readback_handler.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/android/content_view_core.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 26 (0 generated)
powei
PTAL. tedchoc@ for tab_android changes aelias@ and dtrainor@ for thumbnail_cache Sorry for the humongous patch. ...
6 years, 7 months ago (2014-05-16 01:11:39 UTC) #1
David Trainor- moved to gerrit
High level comments on implementation. It looks like mostly a Java -> C++ rewrite. Since ...
6 years, 6 months ago (2014-05-27 17:56:20 UTC) #2
powei
PTAL again. Thanks! Simplified and separated the core file into multiple files. TODOs include a ...
6 years, 6 months ago (2014-06-10 20:40:27 UTC) #3
David Trainor- moved to gerrit
https://chromiumcodereview.appspot.com/262543002/diff/100001/chrome/browser/android/tab_thumbnail_provider.h File chrome/browser/android/tab_thumbnail_provider.h (right): https://chromiumcodereview.appspot.com/262543002/diff/100001/chrome/browser/android/tab_thumbnail_provider.h#newcode14 chrome/browser/android/tab_thumbnail_provider.h:14: class TabThumbnailProvider { We might not need this interface ...
6 years, 6 months ago (2014-06-17 08:12:11 UTC) #4
powei
https://codereview.chromium.org/262543002/diff/100001/chrome/browser/android/tab_thumbnail_provider.h File chrome/browser/android/tab_thumbnail_provider.h (right): https://codereview.chromium.org/262543002/diff/100001/chrome/browser/android/tab_thumbnail_provider.h#newcode14 chrome/browser/android/tab_thumbnail_provider.h:14: class TabThumbnailProvider { On 2014/06/17 08:12:10, David Trainor wrote: ...
6 years, 6 months ago (2014-06-19 23:05:59 UTC) #5
David Trainor- moved to gerrit
https://chromiumcodereview.appspot.com/262543002/diff/140001/chrome/browser/android/thumbnail/thumbnail_cache.cc File chrome/browser/android/thumbnail/thumbnail_cache.cc (right): https://chromiumcodereview.appspot.com/262543002/diff/140001/chrome/browser/android/thumbnail/thumbnail_cache.cc#newcode358 chrome/browser/android/thumbnail/thumbnail_cache.cc:358: void ThumbnailCache::WriteNextThumbnail() { On 2014/06/19 23:05:59, powei wrote: > ...
6 years, 5 months ago (2014-06-25 07:40:16 UTC) #6
powei
more comments addressed. Offline discussion led to using raw data instead of the wrapper class ...
6 years, 5 months ago (2014-07-07 17:24:51 UTC) #7
David Trainor- moved to gerrit
https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc File chrome/browser/android/thumbnail/thumbnail.cc (right): https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc#newcode93 chrome/browser/android/thumbnail/thumbnail.cc:93: bitmap_ = cc::UIResourceBitmap(kSmallHolderBitmap); Not sure if this is a ...
6 years, 5 months ago (2014-07-14 20:30:46 UTC) #8
powei
https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc File chrome/browser/android/thumbnail/thumbnail.cc (right): https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc#newcode93 chrome/browser/android/thumbnail/thumbnail.cc:93: bitmap_ = cc::UIResourceBitmap(kSmallHolderBitmap); On 2014/07/14 20:30:45, David Trainor wrote: ...
6 years, 5 months ago (2014-07-14 23:56:25 UTC) #9
powei
https://codereview.chromium.org/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.h File chrome/browser/android/thumbnail/thumbnail.h (right): https://codereview.chromium.org/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.h#newcode31 chrome/browser/android/thumbnail/thumbnail.h:31: class ThumbnailManager { On 2014/07/14 20:30:45, David Trainor wrote: ...
6 years, 5 months ago (2014-07-15 20:06:09 UTC) #10
David Trainor- moved to gerrit
lgtm https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc File chrome/browser/android/thumbnail/thumbnail.cc (right): https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc#newcode93 chrome/browser/android/thumbnail/thumbnail.cc:93: bitmap_ = cc::UIResourceBitmap(kSmallHolderBitmap); On 2014/07/14 23:56:25, powei wrote: ...
6 years, 5 months ago (2014-07-15 20:08:24 UTC) #11
David Trainor- moved to gerrit
On 2014/07/15 20:08:24, David Trainor wrote: > lgtm > > https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc > File chrome/browser/android/thumbnail/thumbnail.cc (right): ...
6 years, 5 months ago (2014-07-15 20:08:56 UTC) #12
powei
https://codereview.chromium.org/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc File chrome/browser/android/thumbnail/thumbnail.cc (right): https://codereview.chromium.org/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail.cc#newcode93 chrome/browser/android/thumbnail/thumbnail.cc:93: bitmap_ = cc::UIResourceBitmap(kSmallHolderBitmap); On 2014/07/15 20:08:23, David Trainor wrote: ...
6 years, 5 months ago (2014-07-18 00:51:50 UTC) #13
David Trainor- moved to gerrit
Aaaah lgtm. https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail_cache.cc File chrome/browser/android/thumbnail/thumbnail_cache.cc (right): https://chromiumcodereview.appspot.com/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail_cache.cc#newcode282 chrome/browser/android/thumbnail/thumbnail_cache.cc:282: if (write_tasks_count_ >= write_queue_max_size_) On 2014/07/18 00:51:49, ...
6 years, 5 months ago (2014-07-18 17:03:59 UTC) #14
powei
ping tedchoc@: Owner review for content/browser/android, content/public/browser, chrome/chrome_browser.gypi, and chrome/chrome_tests_unit.gypi Thanks! https://codereview.chromium.org/262543002/diff/210001/chrome/browser/android/thumbnail/thumbnail_cache.cc File chrome/browser/android/thumbnail/thumbnail_cache.cc (right): ...
6 years, 5 months ago (2014-07-22 18:16:19 UTC) #15
Ted C
On 2014/07/22 18:16:19, powei wrote: > ping tedchoc@: Owner review for content/browser/android, content/public/browser, > chrome/chrome_browser.gypi, ...
6 years, 5 months ago (2014-07-22 21:54:42 UTC) #16
powei
The CQ bit was checked by powei@chromium.org
6 years, 5 months ago (2014-07-22 23:06:35 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/powei@chromium.org/262543002/330001
6 years, 5 months ago (2014-07-22 23:08:11 UTC) #18
powei
ping aelias@ for chrome/browser/android/DEPS. chromium_presubmit needs an OWNER of cc/resources for the DEPS change. Thanks.
6 years, 5 months ago (2014-07-22 23:30:20 UTC) #19
aelias_OOO_until_Jul13
Seems OK at a high level, but could you add a DEPS files to thumbnail/ ...
6 years, 5 months ago (2014-07-22 23:50:35 UTC) #20
powei
On 2014/07/22 23:50:35, aelias wrote: > Seems OK at a high level, but could you ...
6 years, 5 months ago (2014-07-23 00:18:10 UTC) #21
aelias_OOO_until_Jul13
DEPS lgtm
6 years, 5 months ago (2014-07-23 00:20:13 UTC) #22
powei
The CQ bit was checked by powei@chromium.org
6 years, 5 months ago (2014-07-23 00:20:34 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/powei@chromium.org/262543002/390001
6 years, 5 months ago (2014-07-23 00:21:51 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-23 02:24:21 UTC) #25
commit-bot: I haz the power
6 years, 5 months ago (2014-07-23 06:28:10 UTC) #26
Message was sent while issue was closed.
Change committed as 284861

Powered by Google App Engine
This is Rietveld 408576698