Lines Matching refs:cg
97 CGContextRef cg = (CGContextRef)fCanvas->accessTopRasterHandle(); in drawRect() local
104 CGContextSetFillColorWithColor(cg, color); in drawRect()
105 CGContextFillRect(cg, CGRectMake(r.x(), r.y(), r.width(), r.height())); in drawRect()
109 static CGAffineTransform matrix_to_transform(CGContextRef cg, const SkMatrix& ctm) { in matrix_to_transform() argument
112 matrix.postTranslate(0, SkIntToScalar(CGBitmapContextGetHeight(cg))); in matrix_to_transform()
129 CGContextRef cg = SkCreateCGContext(SkPixmap(info, nullptr, 0)); in allocHandle() local
130 if (!cg) { in allocHandle()
134 rec->fReleaseCtx = cg; in allocHandle()
135 rec->fPixels = CGBitmapContextGetData(cg); in allocHandle()
136 rec->fRowBytes = CGBitmapContextGetBytesPerRow(cg); in allocHandle()
137 rec->fHandle = cg; in allocHandle()
138 CGContextSaveGState(cg); // balanced each time updateHandle is called in allocHandle()
143 CGContextRef cg = (CGContextRef)hndl; in updateHandle() local
145 CGContextRestoreGState(cg); in updateHandle()
146 CGContextSaveGState(cg); in updateHandle()
147 CGContextClipToRect(cg, CGRectMake(clip.x(), clip.y(), clip.width(), clip.height())); in updateHandle()
148 CGContextConcatCTM(cg, matrix_to_transform(cg, ctm)); in updateHandle()