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

Side by Side Diff: src/device/xps/SkXPSDevice.cpp

Issue 1214853025: Propagate SkSurfaceProps when known (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/gpu/GrTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698