summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 21:41:00 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-04 21:41:00 +0000
commit4fb668468ccbf3c79ea359beea537ab183c36086 (patch)
tree2e1dfc30a295d65e41de52bbedfddaa067b6e842 /chrome/common
parentb967dad2957a86bd0aed778932b63d89c9795a0f (diff)
downloadchromium_src-4fb668468ccbf3c79ea359beea537ab183c36086.zip
chromium_src-4fb668468ccbf3c79ea359beea537ab183c36086.tar.gz
chromium_src-4fb668468ccbf3c79ea359beea537ab183c36086.tar.bz2
Preserve optimized scrolling in the presence of multiple animating rects.
Change PlatformCanvas so that it only fills with "sea foam green" when bitmap data is not externally supplied. Modifying the interface to make this an option bloated the CL too much. I may do this as a follow-up. Adds a new --show-paint-rects command line flag that will render a border around paint rects to help debug and study WebKit painting issues. R=brettw BUG=25905 TEST=none Review URL: http://codereview.chromium.org/414016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/common/render_messages.h10
3 files changed, 14 insertions, 1 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index 0b5dd5a..3160bd8 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -525,6 +525,10 @@ const char kShowIcons[] = "show-icons";
// Show extensions on top with toolbar.
const char kShowExtensionsOnTop[] = "show-extensions-on-top";
+// Visibly render a border around paint rects in the web page to help debug
+// and study painting behavior.
+const char kShowPaintRects[] = "show-paint-rects";
+
// Change the DCHECKS to dump memory and continue instead of displaying error
// dialog. This is valid only in Release mode when --enable-dcheck is
// specified.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index c0222e2..5d97788 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -151,6 +151,7 @@ extern const char kSdchFilter[];
extern const char kSearchInOmniboxHint[];
extern const char kShowExtensionsOnTop[];
extern const char kShowIcons[];
+extern const char kShowPaintRects[];
extern const char kSilentDumpOnDCHECK[];
extern const char kSimpleDataSource[];
extern const char kSingleProcess[];
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 100f224..b757ee2 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -197,12 +197,16 @@ struct ViewHostMsg_PaintRect_Flags {
};
struct ViewHostMsg_PaintRect_Params {
- // The bitmap to be painted into the rect given by bitmap_rect.
+ // The bitmap to be painted into the view at the locations specified by
+ // update_rects.
TransportDIB::Id bitmap;
// The position and size of the bitmap.
gfx::Rect bitmap_rect;
+ // The regions of the bitmap (in view coords) that contain updated pixels.
+ std::vector<gfx::Rect> update_rects;
+
// The size of the RenderView when this message was generated. This is
// included so the host knows how large the view is from the perspective of
// the renderer process. This is necessary in case a resize operation is in
@@ -980,6 +984,7 @@ struct ParamTraits<ViewHostMsg_PaintRect_Params> {
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.bitmap);
WriteParam(m, p.bitmap_rect);
+ WriteParam(m, p.update_rects);
WriteParam(m, p.view_size);
WriteParam(m, p.plugin_window_moves);
WriteParam(m, p.flags);
@@ -988,6 +993,7 @@ struct ParamTraits<ViewHostMsg_PaintRect_Params> {
return
ReadParam(m, iter, &p->bitmap) &&
ReadParam(m, iter, &p->bitmap_rect) &&
+ ReadParam(m, iter, &p->update_rects) &&
ReadParam(m, iter, &p->view_size) &&
ReadParam(m, iter, &p->plugin_window_moves) &&
ReadParam(m, iter, &p->flags);
@@ -998,6 +1004,8 @@ struct ParamTraits<ViewHostMsg_PaintRect_Params> {
l->append(L", ");
LogParam(p.bitmap_rect, l);
l->append(L", ");
+ LogParam(p.update_rects, l);
+ l->append(L", ");
LogParam(p.view_size, l);
l->append(L", ");
LogParam(p.plugin_window_moves, l);