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

Unified Diff: cc/test/fake_scrollbar_layer.cc

Issue 21555004: Scrollbar Layer revert (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_scrollbar_layer.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_scrollbar_layer.cc
===================================================================
--- cc/test/fake_scrollbar_layer.cc (revision 215030)
+++ cc/test/fake_scrollbar_layer.cc (working copy)
@@ -18,7 +18,9 @@
new FakeScrollbar(paint_during_update, has_thumb, false)).Pass(),
scrolling_layer_id),
update_count_(0),
- push_properties_count_(0) {
+ push_properties_count_(0),
+ last_update_full_upload_size_(0),
+ last_update_partial_upload_size_(0) {
SetAnchorPoint(gfx::PointF(0.f, 0.f));
SetBounds(gfx::Size(1, 1));
SetIsDrawable(true);
@@ -28,8 +30,12 @@
bool FakeScrollbarLayer::Update(ResourceUpdateQueue* queue,
const OcclusionTracker* occlusion) {
+ size_t full = queue->FullUploadSize();
+ size_t partial = queue->PartialUploadSize();
bool updated = ScrollbarLayer::Update(queue, occlusion);
- ++update_count_;
+ update_count_++;
+ last_update_full_upload_size_ = queue->FullUploadSize() - full;
+ last_update_partial_upload_size_ = queue->PartialUploadSize() - partial;
return updated;
}
« no previous file with comments | « cc/test/fake_scrollbar_layer.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698