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

Side by Side Diff: webkit/glue/webkit_glue.cc

Issue 6840057: Map webkit glue when Mac build uses Skia. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 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 | « webkit/glue/webcursor_mac.mm ('k') | webkit/glue/webthemeengine_impl_mac.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "webkit/glue/webkit_glue.h" 5 #include "webkit/glue/webkit_glue.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <objidl.h> 8 #include <objidl.h>
9 #include <mlang.h> 9 #include <mlang.h>
10 #elif defined(OS_POSIX) && !defined(OS_MACOSX) 10 #elif defined(OS_POSIX) && !defined(OS_MACOSX)
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 DumpLeakedObject(__FILE__, __LINE__, "WebFrame", count); 263 DumpLeakedObject(__FILE__, __LINE__, "WebFrame", count);
264 #endif 264 #endif
265 } 265 }
266 266
267 bool DecodeImage(const std::string& image_data, SkBitmap* image) { 267 bool DecodeImage(const std::string& image_data, SkBitmap* image) {
268 WebData web_data(image_data.data(), image_data.length()); 268 WebData web_data(image_data.data(), image_data.length());
269 WebImage web_image(WebImage::fromData(web_data, WebSize())); 269 WebImage web_image(WebImage::fromData(web_data, WebSize()));
270 if (web_image.isNull()) 270 if (web_image.isNull())
271 return false; 271 return false;
272 272
273 #if defined(OS_MACOSX) 273 #if defined(OS_MACOSX) && !defined(USE_SKIA)
274 *image = gfx::CGImageToSkBitmap(web_image.getCGImageRef()); 274 *image = gfx::CGImageToSkBitmap(web_image.getCGImageRef());
275 #else 275 #else
276 *image = web_image.getSkBitmap(); 276 *image = web_image.getSkBitmap();
277 #endif 277 #endif
278 return true; 278 return true;
279 } 279 }
280 280
281 // NOTE: This pair of conversion functions are here instead of in glue_util.cc 281 // NOTE: This pair of conversion functions are here instead of in glue_util.cc
282 // since that file will eventually die. This pair of functions will need to 282 // since that file will eventually die. This pair of functions will need to
283 // remain as the concept of a file-path specific character encoding string type 283 // remain as the concept of a file-path specific character encoding string type
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 NOTIMPLEMENTED(); 412 NOTIMPLEMENTED();
413 return NULL; 413 return NULL;
414 #endif 414 #endif
415 } 415 }
416 416
417 int GetGlyphPageCount() { 417 int GetGlyphPageCount() {
418 return WebGlyphCache::pageCount(); 418 return WebGlyphCache::pageCount();
419 } 419 }
420 420
421 } // namespace webkit_glue 421 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webcursor_mac.mm ('k') | webkit/glue/webthemeengine_impl_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698