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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index 3b072e81edd3f86637a697913d7fc05dfdc8c17a..e52077283fd600cfaa5c9b4869e556ba268a672b 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -232,6 +232,7 @@ class CONTENT_EXPORT RenderWidget
void OnMsgRepaint(const gfx::Size& size_to_paint);
void OnSetTextDirection(WebKit::WebTextDirection direction);
void OnGetFPS();
+ void OnInvertWebContent(bool invert);
// Override points to notify derived classes that a paint has happened.
// WillInitiatePaint happens when we're about to generate a new bitmap and
@@ -493,6 +494,12 @@ class CONTENT_EXPORT RenderWidget
// case NULL is added to the queue.
std::deque<ViewHostMsg_UpdateRect*> updates_pending_swap_;
+ // Set to true if we should invert all pixels.
+ bool invert_;
+
+ // The Skia paint object for inverting.
+ scoped_ptr<SkPaint> invert_paint_;
+
DISALLOW_COPY_AND_ASSIGN(RenderWidget);
};

Powered by Google App Engine
This is Rietveld 408576698