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

Side by Side Diff: src/pipe/SkGPipeRead.cpp

Issue 881563002: Remove clear function from SkGPipe (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/pipe/SkGPipePriv.h ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkBitmapHeap.h" 10 #include "SkBitmapHeap.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 canvas->saveLayer(bounds, paint, saveFlags); 338 canvas->saveLayer(bounds, paint, saveFlags);
339 } 339 }
340 340
341 static void restore_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, 341 static void restore_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
342 SkGPipeState* state) { 342 SkGPipeState* state) {
343 canvas->restore(); 343 canvas->restore();
344 } 344 }
345 345
346 /////////////////////////////////////////////////////////////////////////////// 346 ///////////////////////////////////////////////////////////////////////////////
347 347
348 static void drawClear_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
349 SkGPipeState* state) {
350 SkColor color = 0;
351 if (DrawOp_unpackFlags(op32) & kClear_HasColor_DrawOpFlag) {
352 color = reader->readU32();
353 }
354 canvas->clear(color);
355 }
356
357 static void drawPaint_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, 348 static void drawPaint_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
358 SkGPipeState* state) { 349 SkGPipeState* state) {
359 if (state->shouldDraw()) { 350 if (state->shouldDraw()) {
360 canvas->drawPaint(state->paint()); 351 canvas->drawPaint(state->paint());
361 } 352 }
362 } 353 }
363 354
364 static void drawPoints_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32, 355 static void drawPoints_rp(SkCanvas* canvas, SkReader32* reader, uint32_t op32,
365 SkGPipeState* state) { 356 SkGPipeState* state) {
366 SkCanvas::PointMode mode = (SkCanvas::PointMode)DrawOp_unpackFlags(op32); 357 SkCanvas::PointMode mode = (SkCanvas::PointMode)DrawOp_unpackFlags(op32);
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 static const ReadProc gReadTable[] = { 785 static const ReadProc gReadTable[] = {
795 skip_rp, 786 skip_rp,
796 clipPath_rp, 787 clipPath_rp,
797 clipRegion_rp, 788 clipRegion_rp,
798 clipRect_rp, 789 clipRect_rp,
799 clipRRect_rp, 790 clipRRect_rp,
800 concat_rp, 791 concat_rp,
801 drawBitmap_rp, 792 drawBitmap_rp,
802 drawBitmapNine_rp, 793 drawBitmapNine_rp,
803 drawBitmapRect_rp, 794 drawBitmapRect_rp,
804 drawClear_rp,
805 drawDRRect_rp, 795 drawDRRect_rp,
806 drawOval_rp, 796 drawOval_rp,
807 drawPaint_rp, 797 drawPaint_rp,
808 drawPatch_rp, 798 drawPatch_rp,
809 drawPath_rp, 799 drawPath_rp,
810 drawPicture_rp, 800 drawPicture_rp,
811 drawPoints_rp, 801 drawPoints_rp,
812 drawPosText_rp, 802 drawPosText_rp,
813 drawPosTextH_rp, 803 drawPosTextH_rp,
814 drawRect_rp, 804 drawRect_rp,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 status = kReadAtom_Status; 919 status = kReadAtom_Status;
930 break; 920 break;
931 } 921 }
932 } 922 }
933 923
934 if (bytesRead) { 924 if (bytesRead) {
935 *bytesRead = reader.offset(); 925 *bytesRead = reader.offset();
936 } 926 }
937 return status; 927 return status;
938 } 928 }
OLDNEW
« no previous file with comments | « src/pipe/SkGPipePriv.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698