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

Side by Side Diff: content/renderer/render_widget.h

Issue 9353012: Add a switch to invert web contents (non-accel only). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing, now that skia change is in Created 8 years, 10 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 | « content/public/common/content_switches.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_WIDGET_H_ 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <vector> 10 #include <vector>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 int selection_end); 226 int selection_end);
227 virtual void OnImeConfirmComposition( 227 virtual void OnImeConfirmComposition(
228 const string16& text, const ui::Range& replacement_range); 228 const string16& text, const ui::Range& replacement_range);
229 void OnMsgPaintAtSize(const TransportDIB::Handle& dib_id, 229 void OnMsgPaintAtSize(const TransportDIB::Handle& dib_id,
230 int tag, 230 int tag,
231 const gfx::Size& page_size, 231 const gfx::Size& page_size,
232 const gfx::Size& desired_size); 232 const gfx::Size& desired_size);
233 void OnMsgRepaint(const gfx::Size& size_to_paint); 233 void OnMsgRepaint(const gfx::Size& size_to_paint);
234 void OnSetTextDirection(WebKit::WebTextDirection direction); 234 void OnSetTextDirection(WebKit::WebTextDirection direction);
235 void OnGetFPS(); 235 void OnGetFPS();
236 void OnInvertWebContent(bool invert);
236 237
237 // Override points to notify derived classes that a paint has happened. 238 // Override points to notify derived classes that a paint has happened.
238 // WillInitiatePaint happens when we're about to generate a new bitmap and 239 // WillInitiatePaint happens when we're about to generate a new bitmap and
239 // send it to the browser. DidInitiatePaint happens when that has completed, 240 // send it to the browser. DidInitiatePaint happens when that has completed,
240 // and subsequent rendering won't affect the painted content. DidFlushPaint 241 // and subsequent rendering won't affect the painted content. DidFlushPaint
241 // happens once we've received the ACK that the screen has been updated. 242 // happens once we've received the ACK that the screen has been updated.
242 // For a given paint operation, these overrides will always be called in the 243 // For a given paint operation, these overrides will always be called in the
243 // order WillInitiatePaint, DidInitiatePaint, DidFlushPaint. 244 // order WillInitiatePaint, DidInitiatePaint, DidFlushPaint.
244 virtual void WillInitiatePaint() {} 245 virtual void WillInitiatePaint() {}
245 virtual void DidInitiatePaint() {} 246 virtual void DidInitiatePaint() {}
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 // pass state between DoDeferredUpdate and OnSwapBuffersPosted. 489 // pass state between DoDeferredUpdate and OnSwapBuffersPosted.
489 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_; 490 scoped_ptr<ViewHostMsg_UpdateRect_Params> pending_update_params_;
490 491
491 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to 492 // Queue of UpdateRect messages corresponding to a SwapBuffers. We want to
492 // delay sending of UpdateRect until the corresponding SwapBuffers has been 493 // delay sending of UpdateRect until the corresponding SwapBuffers has been
493 // executed. Since we can have several in flight, we need to keep them in a 494 // executed. Since we can have several in flight, we need to keep them in a
494 // queue. Note: some SwapBuffers may not correspond to an update, in which 495 // queue. Note: some SwapBuffers may not correspond to an update, in which
495 // case NULL is added to the queue. 496 // case NULL is added to the queue.
496 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_; 497 std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_;
497 498
499 // Set to true if we should invert all pixels.
500 bool invert_;
501
502 // The Skia paint object for inverting.
503 scoped_ptr<SkPaint> invert_paint_;
504
498 DISALLOW_COPY_AND_ASSIGN(RenderWidget); 505 DISALLOW_COPY_AND_ASSIGN(RenderWidget);
499 }; 506 };
500 507
501 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ 508 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698