• Home
  • Raw
  • Download

Lines Matching refs:reader

110     void setReader(SkReadBuffer* reader) {  in setReader()  argument
111 fReader = reader; in setReader()
244 template <typename T> const T* skip(SkReader32* reader, size_t count = 1) { in skip() argument
247 return reinterpret_cast<const T*>(reader->skip(size)); in skip()
250 template <typename T> const T* skipAlign(SkReader32* reader, size_t count = 1) { in skipAlign() argument
252 return reinterpret_cast<const T*>(reader->skip(size)); in skipAlign()
258 static void clipPath_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in clipPath_rp() argument
261 reader->readPath(&path); in clipPath_rp()
266 static void clipRegion_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in clipRegion_rp() argument
269 reader->readRegion(&rgn); in clipRegion_rp()
273 static void clipRect_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in clipRect_rp() argument
275 const SkRect* rect = skip<SkRect>(reader); in clipRect_rp()
280 static void clipRRect_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in clipRRect_rp() argument
283 reader->readRRect(&rrect); in clipRRect_rp()
290 static void setMatrix_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in setMatrix_rp() argument
293 reader->readMatrix(&matrix); in setMatrix_rp()
297 static void concat_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in concat_rp() argument
300 reader->readMatrix(&matrix); in concat_rp()
304 static void scale_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in scale_rp() argument
306 const SkScalar* param = skip<SkScalar>(reader, 2); in scale_rp()
310 static void skew_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in skew_rp() argument
312 const SkScalar* param = skip<SkScalar>(reader, 2); in skew_rp()
316 static void rotate_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in rotate_rp() argument
318 canvas->rotate(reader->readScalar()); in rotate_rp()
321 static void translate_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in translate_rp() argument
323 const SkScalar* param = skip<SkScalar>(reader, 2); in translate_rp()
329 static void save_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in save_rp() argument
334 static void saveLayer_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in saveLayer_rp() argument
341 bounds = skip<SkRect>(reader); in saveLayer_rp()
350 static void restore_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in restore_rp() argument
357 static void drawPaint_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawPaint_rp() argument
364 static void drawPoints_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawPoints_rp() argument
367 size_t count = reader->readU32(); in drawPoints_rp()
368 const SkPoint* pts = skip<SkPoint>(reader, count); in drawPoints_rp()
374 static void drawOval_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawOval_rp() argument
376 const SkRect* rect = skip<SkRect>(reader); in drawOval_rp()
382 static void drawRect_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawRect_rp() argument
384 const SkRect* rect = skip<SkRect>(reader); in drawRect_rp()
390 static void drawRRect_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawRRect_rp() argument
393 reader->readRRect(&rrect); in drawRRect_rp()
399 static void drawDRRect_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawDRRect_rp() argument
402 reader->readRRect(&outer); in drawDRRect_rp()
403 reader->readRRect(&inner); in drawDRRect_rp()
409 static void drawPatch_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawPatch_rp() argument
414 const SkPoint* cubics = skip<SkPoint>(reader, SkPatchUtils::kNumCtrlPts); in drawPatch_rp()
418 colors = skip<SkColor>(reader, SkPatchUtils::kNumCorners); in drawPatch_rp()
422 texCoords = skip<SkPoint>(reader, SkPatchUtils::kNumCorners); in drawPatch_rp()
426 int mode = reader->readInt(); in drawPatch_rp()
437 static void drawPath_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawPath_rp() argument
440 reader->readPath(&path); in drawPath_rp()
446 static void drawVertices_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawVertices_rp() argument
450 SkCanvas::VertexMode vmode = (SkCanvas::VertexMode)reader->readU32(); in drawVertices_rp()
451 int vertexCount = reader->readU32(); in drawVertices_rp()
452 const SkPoint* verts = skip<SkPoint>(reader, vertexCount); in drawVertices_rp()
456 texs = skip<SkPoint>(reader, vertexCount); in drawVertices_rp()
461 colors = skip<SkColor>(reader, vertexCount); in drawVertices_rp()
466 SkXfermode::Mode mode = (SkXfermode::Mode)reader->readU32(); in drawVertices_rp()
473 indexCount = reader->readU32(); in drawVertices_rp()
474 indices = skipAlign<uint16_t>(reader, indexCount); in drawVertices_rp()
484 static void drawText_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawText_rp() argument
486 size_t len = reader->readU32(); in drawText_rp()
487 const void* text = reader->skip(SkAlign4(len)); in drawText_rp()
488 const SkScalar* xy = skip<SkScalar>(reader, 2); in drawText_rp()
494 static void drawPosText_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawPosText_rp() argument
496 size_t len = reader->readU32(); in drawPosText_rp()
497 const void* text = reader->skip(SkAlign4(len)); in drawPosText_rp()
498 size_t posCount = reader->readU32(); // compute by our writer in drawPosText_rp()
499 const SkPoint* pos = skip<SkPoint>(reader, posCount); in drawPosText_rp()
505 static void drawPosTextH_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawPosTextH_rp() argument
507 size_t len = reader->readU32(); in drawPosTextH_rp()
508 const void* text = reader->skip(SkAlign4(len)); in drawPosTextH_rp()
509 size_t posCount = reader->readU32(); // compute by our writer in drawPosTextH_rp()
510 const SkScalar* xpos = skip<SkScalar>(reader, posCount); in drawPosTextH_rp()
511 SkScalar constY = reader->readScalar(); in drawPosTextH_rp()
517 static void drawTextOnPath_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawTextOnPath_rp() argument
519 size_t len = reader->readU32(); in drawTextOnPath_rp()
520 const void* text = reader->skip(SkAlign4(len)); in drawTextOnPath_rp()
523 reader->readPath(&path); in drawTextOnPath_rp()
528 reader->readMatrix(&matrixStorage); in drawTextOnPath_rp()
540 BitmapHolder(SkReader32* reader, uint32_t op32, SkGPipeState* state);
555 BitmapHolder::BitmapHolder(SkReader32* reader, uint32_t op32, in BitmapHolder() argument
581 static void drawBitmap_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawBitmap_rp() argument
583 BitmapHolder holder(reader, op32, state); in drawBitmap_rp()
585 SkScalar left = reader->readScalar(); in drawBitmap_rp()
586 SkScalar top = reader->readScalar(); in drawBitmap_rp()
593 static void drawBitmapNine_rp(SkCanvas* canvas, SkReader32* reader, in drawBitmapNine_rp() argument
595 BitmapHolder holder(reader, op32, state); in drawBitmapNine_rp()
597 const SkIRect* center = skip<SkIRect>(reader); in drawBitmapNine_rp()
598 const SkRect* dst = skip<SkRect>(reader); in drawBitmapNine_rp()
606 static void drawBitmapRect_rp(SkCanvas* canvas, SkReader32* reader, in drawBitmapRect_rp() argument
608 BitmapHolder holder(reader, op32, state); in drawBitmapRect_rp()
614 src = skip<SkRect>(reader); in drawBitmapRect_rp()
622 const SkRect* dst = skip<SkRect>(reader); in drawBitmapRect_rp()
630 static void drawSprite_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawSprite_rp() argument
632 BitmapHolder holder(reader, op32, state); in drawSprite_rp()
634 const SkIPoint* point = skip<SkIPoint>(reader); in drawSprite_rp()
641 static void drawImage_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, SkGPipeState* state) { in drawImage_rp() argument
645 SkScalar x = reader->readScalar(); in drawImage_rp()
646 SkScalar y = reader->readScalar(); in drawImage_rp()
653 static void drawImageRect_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawImageRect_rp() argument
661 src = skip<SkRect>(reader); in drawImageRect_rp()
663 const SkRect* dst = skip<SkRect>(reader); in drawImageRect_rp()
672 static void drawPicture_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawPicture_rp() argument
677 static void drawTextBlob_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, in drawTextBlob_rp() argument
679 SkScalar x = reader->readScalar(); in drawTextBlob_rp()
680 SkScalar y = reader->readScalar(); in drawTextBlob_rp()
682 int typefaceCount = reader->readU32(); in drawTextBlob_rp()
686 typefaceArray[i] = state->getTypeface(reader->readU32()); in drawTextBlob_rp()
689 reader->read(typefaceArray.get(), typefaceCount * sizeof(SkTypeface*)); in drawTextBlob_rp()
692 size_t blobSize = reader->readU32(); in drawTextBlob_rp()
693 const void* data = reader->skip(SkAlign4(blobSize)); in drawTextBlob_rp()
706 static void paintOp_rp(SkCanvas*, SkReader32* reader, uint32_t op32, in paintOp_rp() argument
708 size_t offset = reader->offset(); in paintOp_rp()
713 uint32_t p32 = reader->readU32(); in paintOp_rp()
722 case kColor_PaintOp: p->setColor(reader->readU32()); break; in paintOp_rp()
727 case kWidth_PaintOp: p->setStrokeWidth(reader->readScalar()); break; in paintOp_rp()
728 case kMiter_PaintOp: p->setStrokeMiter(reader->readScalar()); break; in paintOp_rp()
734 case kTextSize_PaintOp: p->setTextSize(reader->readScalar()); break; in paintOp_rp()
735 case kTextScaleX_PaintOp: p->setTextScaleX(reader->readScalar()); break; in paintOp_rp()
736 case kTextSkewX_PaintOp: p->setTextSkewX(reader->readScalar()); break; in paintOp_rp()
752 SkASSERT(reader->offset() <= stop); in paintOp_rp()
753 } while (reader->offset() < stop); in paintOp_rp()
756 static void typeface_rp(SkCanvas*, SkReader32* reader, uint32_t, in typeface_rp() argument
760 p->setTypeface(static_cast<SkTypeface*>(reader->readPtr())); in typeface_rp()
763 static void annotation_rp(SkCanvas*, SkReader32* reader, uint32_t op32, in annotation_rp() argument
769 SkReadBuffer buffer(reader->skip(size), size); in annotation_rp()
796 static void def_Factory_rp(SkCanvas*, SkReader32* reader, uint32_t, in def_Factory_rp() argument
798 state->defFactory(reader->readString()); in def_Factory_rp()
803 static void skip_rp(SkCanvas*, SkReader32* reader, uint32_t op32, SkGPipeState*) { in skip_rp() argument
805 (void)reader->skip(bytes); in skip_rp()
814 static void shareBitmapHeap_rp(SkCanvas*, SkReader32* reader, uint32_t, in shareBitmapHeap_rp() argument
816 state->setSharedHeap(static_cast<SkBitmapHeap*>(reader->readPtr())); in shareBitmapHeap_rp()
819 static void shareImageHeap_rp(SkCanvas*, SkReader32* reader, uint32_t, SkGPipeState* state) { in shareImageHeap_rp() argument
820 state->setImageHeap(static_cast<SkImageHeap*>(reader->readPtr())); in shareImageHeap_rp()
937 SkReadBuffer reader(data, length); in playback() local
938 reader.setBitmapDecoder(fProc); in playback()
942 fState->setReader(&reader); in playback()
943 while (!reader.eof()) { in playback()
944 uint32_t op32 = reader.readUInt(); in playback()
957 table[op](canvas, reader.getReader32(), op32, fState); in playback()
970 *bytesRead = reader.offset(); in playback()