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

Side by Side Diff: ppapi/shared_impl/private/ppb_browser_font_trusted_shared.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 unified diff | Download patch | Annotate | Revision Log
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 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h" 5 #include "ppapi/shared_impl/private/ppb_browser_font_trusted_shared.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ppapi/c/dev/ppb_font_dev.h" 9 #include "ppapi/c/dev/ppb_font_dev.h"
10 #include "ppapi/shared_impl/ppapi_preferences.h" 10 #include "ppapi/shared_impl/ppapi_preferences.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // the current clip bounds. 302 // the current clip bounds.
303 SkRect skclip; 303 SkRect skclip;
304 destination->getClipBounds(&skclip); 304 destination->getClipBounds(&skclip);
305 web_clip = WebRect(skclip.fLeft, skclip.fTop, skclip.fRight - skclip.fLeft, 305 web_clip = WebRect(skclip.fLeft, skclip.fTop, skclip.fRight - skclip.fLeft,
306 skclip.fBottom - skclip.fTop); 306 skclip.fBottom - skclip.fTop);
307 } else { 307 } else {
308 web_clip = WebRect(clip->point.x, clip->point.y, 308 web_clip = WebRect(clip->point.x, clip->point.y,
309 clip->size.width, clip->size.height); 309 clip->size.width, clip->size.height);
310 } 310 }
311 311
312 #if WEBKIT_USING_SKIA 312 font_->drawText(destination, run, web_position, color, web_clip,
313 WebCanvas* canvas = destination;
314 #elif WEBKIT_USING_CG
315 WebCanvas* canvas = skia::GetBitmapContext(skia::GetTopDevice(*destination));
316 #else
317 NOTIMPLEMENTED();
318 return;
319 #endif
320 font_->drawText(canvas, run, web_position, color, web_clip,
321 PP_ToBool(image_data_is_opaque)); 313 PP_ToBool(image_data_is_opaque));
322 } 314 }
323 315
324 } // namespace ppapi 316 } // namespace ppapi
325 317
OLDNEW
« no previous file with comments | « content/renderer/webplugin_delegate_proxy.cc ('k') | ppapi/shared_impl/private/ppb_font_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698