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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view.h

Issue 506013: Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_
7 7
8 #include "app/gfx/native_widget_types.h" 8 #include "app/gfx/native_widget_types.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "third_party/skia/include/core/SkBitmap.h" 10 #include "third_party/skia/include/core/SkBitmap.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // a paint ack after this returns, so if the view only ever invalidates in 103 // a paint ack after this returns, so if the view only ever invalidates in
104 // response to this, then on Windows, where WM_PAINT has lower priority than 104 // response to this, then on Windows, where WM_PAINT has lower priority than
105 // events which can cause renderer resizes/paint rect updates, e.g. 105 // events which can cause renderer resizes/paint rect updates, e.g.
106 // drag-resizing can starve painting; this function thus provides the view its 106 // drag-resizing can starve painting; this function thus provides the view its
107 // main chance to ensure it stays painted and not just invalidated. On the 107 // main chance to ensure it stays painted and not just invalidated. On the
108 // other hand, if this always blindly paints, then if we're already in the 108 // other hand, if this always blindly paints, then if we're already in the
109 // midst of a paint on the callstack, we can double-paint unnecessarily. 109 // midst of a paint on the callstack, we can double-paint unnecessarily.
110 // (Worse, we might recursively call RenderWidgetHost::GetBackingStore().) 110 // (Worse, we might recursively call RenderWidgetHost::GetBackingStore().)
111 // Thus implementers should generally paint as much of |rect| as possible 111 // Thus implementers should generally paint as much of |rect| as possible
112 // synchronously with as little overpainting as possible. 112 // synchronously with as little overpainting as possible.
113 virtual void DidPaintRect(const gfx::Rect& rect) = 0; 113 virtual void DidPaintBackingStoreRects(
114 const std::vector<gfx::Rect>& rects) = 0;
114 115
115 // Informs the view that a portion of the widget's backing store was scrolled 116 // Informs the view that a portion of the widget's backing store was scrolled
116 // by dx pixels horizontally and dy pixels vertically. The view should copy 117 // by dx pixels horizontally and dy pixels vertically. The view should copy
117 // the exposed pixels from the backing store of the render widget (which has 118 // the exposed pixels from the backing store of the render widget (which has
118 // already been scrolled) onto the screen. 119 // already been scrolled) onto the screen.
119 virtual void DidScrollRect( 120 virtual void DidScrollBackingStoreRect(
120 const gfx::Rect& rect, int dx, int dy) = 0; 121 const gfx::Rect& rect, int dx, int dy) = 0;
121 122
122 // Notifies the View that the renderer has ceased to exist. 123 // Notifies the View that the renderer has ceased to exist.
123 virtual void RenderViewGone() = 0; 124 virtual void RenderViewGone() = 0;
124 125
125 // Notifies the View that the renderer will be delete soon. 126 // Notifies the View that the renderer will be delete soon.
126 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) = 0; 127 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) = 0;
127 128
128 // Tells the View to destroy itself. 129 // Tells the View to destroy itself.
129 virtual void Destroy() = 0; 130 virtual void Destroy() = 0;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 187
187 // A custom background to paint behind the web content. This will be tiled 188 // A custom background to paint behind the web content. This will be tiled
188 // horizontally. Can be null, in which case we fall back to painting white. 189 // horizontally. Can be null, in which case we fall back to painting white.
189 SkBitmap background_; 190 SkBitmap background_;
190 191
191 private: 192 private:
192 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); 193 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView);
193 }; 194 };
194 195
195 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ 196 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698