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

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

Issue 480463004: Quickfix for incorrect PICTURE_MATRIX_PAINT & PATCH optimization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | 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 * 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 "SkPictureRecord.h" 8 #include "SkPictureRecord.h"
9 #include "SkBBoxHierarchy.h" 9 #include "SkBBoxHierarchy.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 if (kSaveLayerWithBoundsSize == result[0].fSize) { 450 if (kSaveLayerWithBoundsSize == result[0].fSize) {
451 // The saveLayer's bound can offset where the dbm is drawn 451 // The saveLayer's bound can offset where the dbm is drawn
452 return false; 452 return false;
453 } 453 }
454 454
455 return merge_savelayer_paint_into_drawbitmp(writer, paintDict, 455 return merge_savelayer_paint_into_drawbitmp(writer, paintDict,
456 result[0], result[3]); 456 result[0], result[3]);
457 } 457 }
458 458
459 static bool is_drawing_op(DrawType op) { 459 static bool is_drawing_op(DrawType op) {
460 return (op > CONCAT && op < ROTATE) || DRAW_DRRECT == op; 460
461 // FIXME: yuck. convert to a lookup table?
462 return (op > CONCAT && op < ROTATE)
463 || DRAW_DRRECT == op
464 || DRAW_PATCH == op
465 || DRAW_PICTURE_MATRIX_PAINT == op;
461 } 466 }
462 467
463 /* 468 /*
464 * Restore has just been called (but not recorded), so look back at the 469 * Restore has just been called (but not recorded), so look back at the
465 * matching save(), and see if we can eliminate the pair of them, due to no 470 * matching save(), and see if we can eliminate the pair of them, due to no
466 * intervening matrix/clip calls. 471 * intervening matrix/clip calls.
467 * 472 *
468 * If so, update the writer and return true, in which case we won't even record 473 * If so, update the writer and return true, in which case we won't even record
469 * the restore() call. If we still need the restore(), return false. 474 * the restore() call. If we still need the restore(), return false.
470 */ 475 */
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1513 } 1518 }
1514 1519
1515 void SkPictureRecord::addText(const void* text, size_t byteLength) { 1520 void SkPictureRecord::addText(const void* text, size_t byteLength) {
1516 fContentInfo.onDrawText(); 1521 fContentInfo.onDrawText();
1517 addInt(SkToInt(byteLength)); 1522 addInt(SkToInt(byteLength));
1518 fWriter.writePad(text, byteLength); 1523 fWriter.writePad(text, byteLength);
1519 } 1524 }
1520 1525
1521 /////////////////////////////////////////////////////////////////////////////// 1526 ///////////////////////////////////////////////////////////////////////////////
1522 1527
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698