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

Unified Diff: webkit/plugins/ppapi/resource_creation_impl.cc

Issue 6981001: Make the Pepper proxy support in-process font rendering. (Closed) Base URL: svn://chrome-svn/chrome/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | webkit/plugins/ppapi/webkit_forwarding_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/resource_creation_impl.cc
===================================================================
--- webkit/plugins/ppapi/resource_creation_impl.cc (revision 84713)
+++ webkit/plugins/ppapi/resource_creation_impl.cc (working copy)
@@ -5,7 +5,9 @@
#include "webkit/plugins/ppapi/resource_creation_impl.h"
#include "ppapi/c/pp_size.h"
+#include "ppapi/shared_impl/font_impl.h"
#include "webkit/plugins/ppapi/common.h"
+#include "webkit/plugins/ppapi/ppb_font_impl.h"
#include "webkit/plugins/ppapi/ppb_graphics_2d_impl.h"
#include "webkit/plugins/ppapi/ppb_image_data_impl.h"
@@ -23,6 +25,20 @@
return this;
}
+PP_Resource ResourceCreationImpl::CreateFontObject(
+ PP_Instance pp_instance,
+ const PP_FontDescription_Dev* description) {
+ PluginInstance* instance = ResourceTracker::Get()->GetInstance(pp_instance);
+ if (!instance)
+ return 0;
+
+ if (!pp::shared_impl::FontImpl::IsPPFontDescriptionValid(*description))
+ return 0;
+
+ scoped_refptr<PPB_Font_Impl> font(new PPB_Font_Impl(instance, *description));
+ return font->GetReference();
+}
+
PP_Resource ResourceCreationImpl::CreateGraphics2D(
PP_Instance pp_instance,
const PP_Size& size,
« no previous file with comments | « webkit/plugins/ppapi/resource_creation_impl.h ('k') | webkit/plugins/ppapi/webkit_forwarding_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698