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

Unified Diff: skia/sgl/SkTypeface.cpp

Issue 113827: Remove the remainder of the skia source code from the Chromium repo.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « skia/sgl/SkTemplatesPriv.h ('k') | skia/sgl/SkTypeface_fake.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/sgl/SkTypeface.cpp
===================================================================
--- skia/sgl/SkTypeface.cpp (revision 16859)
+++ skia/sgl/SkTypeface.cpp (working copy)
@@ -1,65 +0,0 @@
-#include "SkTypeface.h"
-#include "SkFontHost.h"
-
-static const SkTypeface* resolve_null_typeface(const SkTypeface* face)
-{
- if (NULL == face) {
- face = SkFontHost::FindTypeface(NULL, NULL, SkTypeface::kNormal);
- SkASSERT(face);
- }
- return face;
-}
-
-uint32_t SkTypeface::UniqueID(const SkTypeface* face)
-{
- return resolve_null_typeface(face)->uniqueID();
-}
-
-bool SkTypeface::Equal(const SkTypeface* facea, const SkTypeface* faceb)
-{
- return resolve_null_typeface(facea)->uniqueID() ==
- resolve_null_typeface(faceb)->uniqueID();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-SkTypeface* SkTypeface::Create(const char name[], Style style)
-{
- SkTypeface* face = SkFontHost::FindTypeface(NULL, name, style);
- if (face)
- face->ref();
- return face;
-}
-
-SkTypeface* SkTypeface::CreateFromTypeface(const SkTypeface* family, Style s)
-{
- family = resolve_null_typeface(family);
- SkTypeface* face = SkFontHost::FindTypeface(family, NULL, s);
- face->ref();
- return face;
-}
-
-SkTypeface* SkTypeface::CreateFromStream(SkStream* stream)
-{
- return SkFontHost::CreateTypeface(stream);
-}
-
-#include "SkMMapStream.h"
-SkTypeface* SkTypeface::CreateFromFile(const char path[])
-{
- return SkFontHost::CreateTypeface(SkNEW_ARGS(SkMMAPStream, (path)));
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-void SkTypeface::serialize(SkWStream* stream) const {
- SkFontHost::Serialize(this, stream);
-}
-
-SkTypeface* SkTypeface::Deserialize(SkStream* stream) {
- SkTypeface* face = SkFontHost::Deserialize(stream);
- face->ref();
- return face;
-}
-
-
« no previous file with comments | « skia/sgl/SkTemplatesPriv.h ('k') | skia/sgl/SkTypeface_fake.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698