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

Unified Diff: cc/test/fake_scrollbar_layer.cc

Issue 11464041: cc: Don't use partial updates for scrollbars when they are not allowed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 years 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') | no next file » | 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
new file mode 100644
index 0000000000000000000000000000000000000000..7d5d96865e4a82dd7b878689f9c0b1dadb9c3219
--- /dev/null
+++ b/cc/test/fake_scrollbar_layer.cc
@@ -0,0 +1,38 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/fake_scrollbar_layer.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"
+
+namespace cc {
+
+FakeScrollbarLayer::FakeScrollbarLayer(
+ bool paint_during_update, int scrolling_layer_id)
+ : ScrollbarLayer(
+ FakeWebScrollbar::create().PassAs<WebKit::WebScrollbar>(),
+ FakeScrollbarThemePainter::Create(paint_during_update)
+ .PassAs<ScrollbarThemePainter>(),
+ FakeWebScrollbarThemeGeometry::create()
+ .PassAs<WebKit::WebScrollbarThemeGeometry>(),
+ scrolling_layer_id),
+ update_count_(0) {
+ setAnchorPoint(gfx::PointF(0, 0));
+ setBounds(gfx::Size(1, 1));
+ setIsDrawable(true);
+}
+
+FakeScrollbarLayer::~FakeScrollbarLayer() {}
+
+void FakeScrollbarLayer::update(
+ ResourceUpdateQueue& queue,
+ const OcclusionTracker* occlusion,
+ RenderingStats& stats) {
+ ScrollbarLayer::update(queue, occlusion, stats);
+ update_count_++;
+}
+
+} // namespace cc
« no previous file with comments | « cc/test/fake_scrollbar_layer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698