| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkTypes.h" | 8 #include "SkTypes.h" |
| 9 | 9 |
| 10 #ifndef UNICODE | 10 #ifndef UNICODE |
| (...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 bool isTTC = (data && | 1942 bool isTTC = (data && |
| 1943 fontData->getLength() >= sizeof(SkTTCFHeader) && | 1943 fontData->getLength() >= sizeof(SkTTCFHeader) && |
| 1944 ((SkTTCFHeader*)data)->ttcTag == SkTTCFHeader::TAG); | 1944 ((SkTTCFHeader*)data)->ttcTag == SkTTCFHeader::TAG); |
| 1945 | 1945 |
| 1946 TypefaceUse& newTypefaceUse = this->fTypefaces.push_back(); | 1946 TypefaceUse& newTypefaceUse = this->fTypefaces.push_back(); |
| 1947 newTypefaceUse.typefaceId = typefaceID; | 1947 newTypefaceUse.typefaceId = typefaceID; |
| 1948 newTypefaceUse.ttcIndex = isTTC ? ttcIndex : -1; | 1948 newTypefaceUse.ttcIndex = isTTC ? ttcIndex : -1; |
| 1949 newTypefaceUse.fontData = fontData; | 1949 newTypefaceUse.fontData = fontData; |
| 1950 newTypefaceUse.xpsFont = xpsFontResource.release(); | 1950 newTypefaceUse.xpsFont = xpsFontResource.release(); |
| 1951 | 1951 |
| 1952 SkAutoGlyphCache agc(paint, NULL, &SkMatrix::I()); | 1952 SkAutoGlyphCache agc(paint, &this->surfaceProps(), &SkMatrix::I()); |
| 1953 SkGlyphCache* glyphCache = agc.getCache(); | 1953 SkGlyphCache* glyphCache = agc.getCache(); |
| 1954 unsigned int glyphCount = glyphCache->getGlyphCount(); | 1954 unsigned int glyphCount = glyphCache->getGlyphCount(); |
| 1955 newTypefaceUse.glyphsUsed = new SkBitSet(glyphCount); | 1955 newTypefaceUse.glyphsUsed = new SkBitSet(glyphCount); |
| 1956 | 1956 |
| 1957 *typefaceUse = &newTypefaceUse; | 1957 *typefaceUse = &newTypefaceUse; |
| 1958 return S_OK; | 1958 return S_OK; |
| 1959 } | 1959 } |
| 1960 | 1960 |
| 1961 HRESULT SkXPSDevice::AddGlyphs(const SkDraw& d, | 1961 HRESULT SkXPSDevice::AddGlyphs(const SkDraw& d, |
| 1962 IXpsOMObjectFactory* xpsFactory, | 1962 IXpsOMObjectFactory* xpsFactory, |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2267 //To what stream do we write? | 2267 //To what stream do we write? |
| 2268 //SkXPSDevice* dev = new SkXPSDevice(this); | 2268 //SkXPSDevice* dev = new SkXPSDevice(this); |
| 2269 //SkSize s = SkSize::Make(width, height); | 2269 //SkSize s = SkSize::Make(width, height); |
| 2270 //dev->BeginCanvas(s, s, SkMatrix::I()); | 2270 //dev->BeginCanvas(s, s, SkMatrix::I()); |
| 2271 //return dev; | 2271 //return dev; |
| 2272 } | 2272 } |
| 2273 #endif | 2273 #endif |
| 2274 return new SkXPSDevice(this->fXpsFactory.get()); | 2274 return new SkXPSDevice(this->fXpsFactory.get()); |
| 2275 } | 2275 } |
| 2276 | 2276 |
| OLD | NEW |