summaryrefslogtreecommitdiffstats
path: root/chrome/views/root_view.cc
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 22:37:38 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-12 22:37:38 +0000
commit2dd50820df6d5c39fbb3f1fc1f1b8a29c30b9d72 (patch)
treea7e06fb3fd773206ef652d3b12972b321f00f2f6 /chrome/views/root_view.cc
parent2141858324fd45ece7d3e96c60145a71e493fbe0 (diff)
downloadchromium_src-2dd50820df6d5c39fbb3f1fc1f1b8a29c30b9d72.zip
chromium_src-2dd50820df6d5c39fbb3f1fc1f1b8a29c30b9d72.tar.gz
chromium_src-2dd50820df6d5c39fbb3f1fc1f1b8a29c30b9d72.tar.bz2
Minor cleanup of RootView. Removes unused double_buffered field from
RootView, as well as renaming RootView::ProcessPendingPaint to PaintNow. BUG=1255929 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@750 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/root_view.cc')
-rw-r--r--chrome/views/root_view.cc29
1 files changed, 12 insertions, 17 deletions
diff --git a/chrome/views/root_view.cc b/chrome/views/root_view.cc
index f0ad017..8145d16 100644
--- a/chrome/views/root_view.cc
+++ b/chrome/views/root_view.cc
@@ -63,7 +63,7 @@ class PaintTask : public Task {
void Run() {
if (root_view_)
- root_view_->ProcessPendingPaint();
+ root_view_->PaintNow();
}
private:
// The target root view.
@@ -80,9 +80,8 @@ const char RootView::kViewClassName[] = "chrome/views/RootView";
//
/////////////////////////////////////////////////////////////////////////////
-RootView::RootView(ViewContainer* view_container, bool double_buffer)
- : double_buffer_(double_buffer),
- view_container_(view_container),
+RootView::RootView(ViewContainer* view_container)
+ : view_container_(view_container),
invalid_rect_(0,0,0,0),
mouse_pressed_handler_(NULL),
mouse_move_handler_(NULL),
@@ -149,18 +148,6 @@ void RootView::SchedulePaint(int x, int y, int w, int h) {
View::SchedulePaint();
}
-void RootView::ProcessPendingPaint() {
- if (pending_paint_task_) {
- pending_paint_task_->Cancel();
- pending_paint_task_ = NULL;
- }
- if (!paint_task_needed_)
- return;
- ViewContainer* vc = GetViewContainer();
- if (vc)
- vc->PaintNow(invalid_rect_);
-}
-
#ifndef NDEBUG
// Sets the value of RootView's |is_processing_paint_| member to true as long
// as ProcessPaint is being called. Sets it to |false| when it returns.
@@ -214,7 +201,15 @@ void RootView::ProcessPaint(ChromeCanvas* canvas) {
}
void RootView::PaintNow() {
- GetViewContainer()->PaintNow(invalid_rect_);
+ if (pending_paint_task_) {
+ pending_paint_task_->Cancel();
+ pending_paint_task_ = NULL;
+ }
+ if (!paint_task_needed_)
+ return;
+ ViewContainer* vc = GetViewContainer();
+ if (vc)
+ vc->PaintNow(invalid_rect_);
}
bool RootView::NeedsPainting(bool urgent) {