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

Unified Diff: webkit/plugins/webview_plugin.cc

Issue 10392018: remove WEBKIT_USING_CG (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/sad_plugin.cc ('k') | webkit/tools/test_shell/mock_webclipboard_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/webview_plugin.cc
diff --git a/webkit/plugins/webview_plugin.cc b/webkit/plugins/webview_plugin.cc
index 6ec6ddbd27f8f0085a0e9630b0ee85b8d5fea732..1b0bf8e0c0e9b6e7aa5619a545f3d9160f39e8ab 100644
--- a/webkit/plugins/webview_plugin.cc
+++ b/webkit/plugins/webview_plugin.cc
@@ -6,6 +6,7 @@
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
+#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
@@ -18,12 +19,6 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h"
-#if WEBKIT_USING_CG
-#include <CoreGraphics/CGContext.h>
-#elif WEBKIT_USING_SKIA
-#include "skia/ext/platform_canvas.h"
-#endif
-
using WebKit::WebCanvas;
using WebKit::WebCursorInfo;
using WebKit::WebDragData;
@@ -127,23 +122,13 @@ void WebViewPlugin::paint(WebCanvas* canvas, const WebRect& rect) {
paintRect.Offset(-rect_.x(), -rect_.y());
-#if WEBKIT_USING_CG
- CGContextRef context = canvas;
- CGContextTranslateCTM(context, rect_.x(), rect_.y());
- CGContextSaveGState(context);
-#elif WEBKIT_USING_SKIA
canvas->translate(SkIntToScalar(rect_.x()), SkIntToScalar(rect_.y()));
canvas->save();
-#endif
web_view_->layout();
web_view_->paint(canvas, paintRect);
-#if WEBKIT_USING_SKIA
canvas->restore();
-#elif WEBKIT_USING_CG
- CGContextRestoreGState(context);
-#endif
}
// Coordinates are relative to the containing window.
« no previous file with comments | « webkit/plugins/sad_plugin.cc ('k') | webkit/tools/test_shell/mock_webclipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698