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

Side by Side Diff: src/core/SkRecordDraw.cpp

Issue 501533003: Support comment groups in SkRecord. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add unit test Created 6 years, 4 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 | « no previous file | src/core/SkRecorder.h » ('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 2014 Google Inc. 2 * Copyright 2014 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 "SkRecordDraw.h" 8 #include "SkRecordDraw.h"
9 #include "SkTSort.h" 9 #include "SkTSort.h"
10 10
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 DRAW(PopCull, popCull()); 64 DRAW(PopCull, popCull());
65 DRAW(PushCull, pushCull(r.rect)); 65 DRAW(PushCull, pushCull(r.rect));
66 DRAW(Clear, clear(r.color)); 66 DRAW(Clear, clear(r.color));
67 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix))); 67 DRAW(SetMatrix, setMatrix(SkMatrix::Concat(fInitialCTM, r.matrix)));
68 68
69 DRAW(ClipPath, clipPath(r.path, r.op, r.doAA)); 69 DRAW(ClipPath, clipPath(r.path, r.op, r.doAA));
70 DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA)); 70 DRAW(ClipRRect, clipRRect(r.rrect, r.op, r.doAA));
71 DRAW(ClipRect, clipRect(r.rect, r.op, r.doAA)); 71 DRAW(ClipRect, clipRect(r.rect, r.op, r.doAA));
72 DRAW(ClipRegion, clipRegion(r.region, r.op)); 72 DRAW(ClipRegion, clipRegion(r.region, r.op));
73 73
74 DRAW(BeginCommentGroup, beginCommentGroup(r.description));
75 DRAW(AddComment, addComment(r.key, r.value));
76 DRAW(EndCommentGroup, endCommentGroup());
77
74 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint)); 78 DRAW(DrawBitmap, drawBitmap(shallow_copy(r.bitmap), r.left, r.top, r.paint));
75 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain t)); 79 DRAW(DrawBitmapMatrix, drawBitmapMatrix(shallow_copy(r.bitmap), r.matrix, r.pain t));
76 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p aint)); 80 DRAW(DrawBitmapNine, drawBitmapNine(shallow_copy(r.bitmap), r.center, r.dst, r.p aint));
77 DRAW(DrawBitmapRectToRect, 81 DRAW(DrawBitmapRectToRect,
78 drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint, r.fl ags)); 82 drawBitmapRectToRect(shallow_copy(r.bitmap), r.src, r.dst, r.paint, r.fl ags));
79 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); 83 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint));
80 DRAW(DrawOval, drawOval(r.oval, r.paint)); 84 DRAW(DrawOval, drawOval(r.oval, r.paint));
81 DRAW(DrawPaint, drawPaint(r.paint)); 85 DRAW(DrawPaint, drawPaint(r.paint));
82 DRAW(DrawPath, drawPath(r.path, r.paint)); 86 DRAW(DrawPath, drawPath(r.path, r.paint));
83 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode.get(), r.pain t)); 87 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode.get(), r.pain t));
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // Used to track the bounds of Save/Restore blocks and the control ops insid e them. 404 // Used to track the bounds of Save/Restore blocks and the control ops insid e them.
401 SkTDArray<SaveBounds> fSaveStack; 405 SkTDArray<SaveBounds> fSaveStack;
402 SkTDArray<unsigned> fControlIndices; 406 SkTDArray<unsigned> fControlIndices;
403 }; 407 };
404 408
405 } // namespace SkRecords 409 } // namespace SkRecords
406 410
407 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { 411 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) {
408 SkRecords::FillBounds(record, bbh); 412 SkRecords::FillBounds(record, bbh);
409 } 413 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698