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

Side by Side Diff: public/web/WebWidget.h

Issue 264713014: Remove the composited path from WebViewImpl::paint(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: paint-compositor: rebase Created 6 years, 7 months 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
« no previous file with comments | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual void animate(double monotonicFrameBeginTime) { } 91 virtual void animate(double monotonicFrameBeginTime) { }
92 92
93 // Called to layout the WebWidget. This MUST be called before Paint, 93 // Called to layout the WebWidget. This MUST be called before Paint,
94 // and it may result in calls to WebWidgetClient::didInvalidateRect. 94 // and it may result in calls to WebWidgetClient::didInvalidateRect.
95 virtual void layout() { } 95 virtual void layout() { }
96 96
97 // Called to toggle the WebWidget in or out of force compositing mode. This 97 // Called to toggle the WebWidget in or out of force compositing mode. This
98 // should be called before paint. 98 // should be called before paint.
99 virtual void enterForceCompositingMode(bool enter) { } 99 virtual void enterForceCompositingMode(bool enter) { }
100 100
101 enum PaintOptions {
102 // Attempt to fulfill the painting request by reading back from the
103 // compositor, assuming we're using a compositor to render.
104 ReadbackFromCompositorIfAvailable,
105
106 // Force the widget to rerender onto the canvas using software. This
107 // mode ignores 3d transforms and ignores GPU-resident content, such
108 // as video, canvas, and WebGL.
109 //
110 // Note: This option exists on OS(ANDROID) and will hopefully be
111 // removed once the link disambiguation feature renders using
112 // the compositor.
113 ForceSoftwareRenderingAndIgnoreGPUResidentContent,
114 };
115
116 // Called to paint the rectangular region within the WebWidget 101 // Called to paint the rectangular region within the WebWidget
117 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call 102 // onto the specified canvas at (viewPort.x,viewPort.y). You MUST call
118 // Layout before calling this method. It is okay to call paint 103 // Layout before calling this method. It is okay to call paint
119 // multiple times once layout has been called, assuming no other 104 // multiple times once layout has been called, assuming no other
120 // changes are made to the WebWidget (e.g., once events are 105 // changes are made to the WebWidget (e.g., once events are
121 // processed, it should be assumed that another call to layout is 106 // processed, it should be assumed that another call to layout is
122 // warranted before painting again). 107 // warranted before painting again).
123 virtual void paint(WebCanvas*, const WebRect& viewPort, PaintOptions = Readb ackFromCompositorIfAvailable) { } 108 virtual void paint(WebCanvas*, const WebRect& viewPort) { }
124 109
125 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) { } 110 virtual void paintCompositedDeprecated(WebCanvas*, const WebRect&) { }
126 111
127 // The caller is responsible for keeping the WebCompositeAndReadbackAsyncCal lback 112 // The caller is responsible for keeping the WebCompositeAndReadbackAsyncCal lback
128 // object alive until it is called. This should only be called when 113 // object alive until it is called. This should only be called when
129 // isAcceleratedCompositingActive() is true. 114 // isAcceleratedCompositingActive() is true.
130 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback* ) { } 115 virtual void compositeAndReadbackAsync(WebCompositeAndReadbackAsyncCallback* ) { }
131 116
132 // Returns true if we've started tracking repaint rectangles. 117 // Returns true if we've started tracking repaint rectangles.
133 virtual bool isTrackingRepaints() const { return false; } 118 virtual bool isTrackingRepaints() const { return false; }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // content. 247 // content.
263 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ } 248 virtual WebColor backgroundColor() const { return 0xFFFFFFFF; /* SK_ColorWHI TE */ }
264 249
265 protected: 250 protected:
266 ~WebWidget() { } 251 ~WebWidget() { }
267 }; 252 };
268 253
269 } // namespace blink 254 } // namespace blink
270 255
271 #endif 256 #endif
OLDNEW
« no previous file with comments | « Source/web/tests/WebViewTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698