summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/paint_aggregator.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 00:41:02 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-18 00:41:02 +0000
commit921f159b85924d2098ec2c9682017e79fe0063e0 (patch)
tree769b91603d9266a6e911107d05ce7b206f7b0ceb /chrome/renderer/paint_aggregator.h
parent481cea494f9865ee3e62ca63ea29f92ba5392898 (diff)
downloadchromium_src-921f159b85924d2098ec2c9682017e79fe0063e0.zip
chromium_src-921f159b85924d2098ec2c9682017e79fe0063e0.tar.gz
chromium_src-921f159b85924d2098ec2c9682017e79fe0063e0.tar.bz2
Move a bunch more random files from chrome\renderer to content\renderer.
TBR=avi Review URL: http://codereview.chromium.org/6685072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78640 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/paint_aggregator.h')
-rw-r--r--chrome/renderer/paint_aggregator.h64
1 files changed, 0 insertions, 64 deletions
diff --git a/chrome/renderer/paint_aggregator.h b/chrome/renderer/paint_aggregator.h
deleted file mode 100644
index 2ceef57..0000000
--- a/chrome/renderer/paint_aggregator.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2009 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.
-
-#ifndef CHROME_RENDERER_PAINT_AGGREGATOR_H_
-#define CHROME_RENDERER_PAINT_AGGREGATOR_H_
-#pragma once
-
-#include <vector>
-
-#include "base/basictypes.h"
-#include "ui/gfx/rect.h"
-
-// This class is responsible for aggregating multiple invalidation and scroll
-// commands to produce a scroll and repaint sequence.
-class PaintAggregator {
- public:
- // This structure describes an aggregation of InvalidateRect and ScrollRect
- // calls. If |scroll_rect| is non-empty, then that rect should be scrolled
- // by the amount specified by |scroll_delta|. If |paint_rects| is non-empty,
- // then those rects should be repainted. If |scroll_rect| and |paint_rects|
- // are non-empty, then scrolling should be performed before repainting.
- // |scroll_delta| can only specify scrolling in one direction (i.e., the x
- // and y members cannot both be non-zero).
- struct PendingUpdate {
- PendingUpdate();
- ~PendingUpdate();
-
- // Returns the rect damaged by scrolling within |scroll_rect| by
- // |scroll_delta|. This rect must be repainted.
- gfx::Rect GetScrollDamage() const;
-
- // Returns the smallest rect containing all paint rects.
- gfx::Rect GetPaintBounds() const;
-
- gfx::Point scroll_delta;
- gfx::Rect scroll_rect;
- std::vector<gfx::Rect> paint_rects;
- };
-
- // There is a PendingUpdate if InvalidateRect or ScrollRect were called and
- // ClearPendingUpdate was not called.
- bool HasPendingUpdate() const;
- void ClearPendingUpdate();
-
- // Fills |update| and clears the pending update.
- void PopPendingUpdate(PendingUpdate* update);
-
- // The given rect should be repainted.
- void InvalidateRect(const gfx::Rect& rect);
-
- // The given rect should be scrolled by the given amounts.
- void ScrollRect(int dx, int dy, const gfx::Rect& clip_rect);
-
- private:
- gfx::Rect ScrollPaintRect(const gfx::Rect& paint_rect, int dx, int dy) const;
- bool ShouldInvalidateScrollRect(const gfx::Rect& rect) const;
- void InvalidateScrollRect();
- void CombinePaintRects();
-
- PendingUpdate update_;
-};
-
-#endif // CHROME_RENDERER_PAINT_AGGREGATOR_H_