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

Unified Diff: webkit/tools/test_shell/mock_webclipboard_impl.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/webview_plugin.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/mock_webclipboard_impl.cc
diff --git a/webkit/tools/test_shell/mock_webclipboard_impl.cc b/webkit/tools/test_shell/mock_webclipboard_impl.cc
index f36e23285c31ac914981b3ee93bdcd90833bb196..e21269a9fcd4ccc7742ab6c4b7b6c7ea006c187d 100644
--- a/webkit/tools/test_shell/mock_webclipboard_impl.cc
+++ b/webkit/tools/test_shell/mock_webclipboard_impl.cc
@@ -19,11 +19,6 @@
#include "webkit/glue/webkit_glue.h"
#include "webkit/support/webkit_support_gfx.h"
-#if WEBKIT_USING_CG
-#include <ApplicationServices/ApplicationServices.h>
-#include <CoreFoundation/CoreFoundation.h>
-#endif
-
using WebKit::WebDragData;
using WebKit::WebString;
using WebKit::WebURL;
@@ -108,7 +103,6 @@ WebKit::WebData MockWebClipboardImpl::readImage(
std::vector<unsigned char> encoded_image;
// TODO(dcheng): Verify that we can assume the image is ARGB8888. Note that
// for endianess reasons, it will be BGRA8888 on Windows.
-#if WEBKIT_USING_SKIA
const SkBitmap& bitmap = m_image.getSkBitmap();
SkAutoLockPixels lock(bitmap);
webkit_support::EncodeBGRAPNG(static_cast<unsigned char*>(bitmap.getPixels()),
@@ -117,18 +111,6 @@ WebKit::WebData MockWebClipboardImpl::readImage(
bitmap.rowBytes(),
false,
&encoded_image);
-#elif WEBKIT_USING_CG
- CGImageRef image = m_image.getCGImageRef();
- CFDataRef image_data_ref =
- CGDataProviderCopyData(CGImageGetDataProvider(image));
- webkit_support::EncodeBGRAPNG(CFDataGetBytePtr(image_data_ref),
- CGImageGetWidth(image),
- CGImageGetHeight(image),
- CGImageGetBytesPerRow(image),
- false,
- &encoded_image);
- CFRelease(image_data_ref);
-#endif
data.assign(reinterpret_cast<char*>(vector_as_array(&encoded_image)),
encoded_image.size());
return data;
« no previous file with comments | « webkit/plugins/webview_plugin.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698