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

Unified Diff: cc/test/fake_scrollbar_layer.cc

Issue 11941010: Fix scrollbars missing after lost context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/fake_scrollbar_layer.h ('k') | cc/test/fake_web_graphics_context_3d.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_scrollbar_layer.cc
diff --git a/cc/test/fake_scrollbar_layer.cc b/cc/test/fake_scrollbar_layer.cc
index d6e5f0a1b43fb2995fd68b88b923fc9a80d3d877..96c9daff311b098ff76686a2f8dced570886c04a 100644
--- a/cc/test/fake_scrollbar_layer.cc
+++ b/cc/test/fake_scrollbar_layer.cc
@@ -4,6 +4,7 @@
#include "cc/test/fake_scrollbar_layer.h"
+#include "cc/resource_update_queue.h"
#include "cc/test/fake_scrollbar_theme_painter.h"
#include "cc/test/fake_web_scrollbar.h"
#include "cc/test/fake_web_scrollbar_theme_geometry.h"
@@ -19,7 +20,9 @@ FakeScrollbarLayer::FakeScrollbarLayer(
FakeWebScrollbarThemeGeometry::create(has_thumb)
.PassAs<WebKit::WebScrollbarThemeGeometry>(),
scrolling_layer_id),
- update_count_(0) {
+ update_count_(0),
+ last_update_full_upload_size_(0),
+ last_update_partial_upload_size_(0) {
setAnchorPoint(gfx::PointF(0, 0));
setBounds(gfx::Size(1, 1));
setIsDrawable(true);
@@ -31,8 +34,12 @@ void FakeScrollbarLayer::update(
ResourceUpdateQueue& queue,
const OcclusionTracker* occlusion,
RenderingStats& stats) {
+ size_t full = queue.fullUploadSize();
+ size_t partial = queue.partialUploadSize();
ScrollbarLayer::update(queue, occlusion, stats);
update_count_++;
+ last_update_full_upload_size_ = queue.fullUploadSize() - full;
+ last_update_partial_upload_size_ = queue.partialUploadSize() - partial;
}
} // namespace cc
« no previous file with comments | « cc/test/fake_scrollbar_layer.h ('k') | cc/test/fake_web_graphics_context_3d.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698