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

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

Issue 977413003: Revert of Update SkPicture cull rects with RTree information (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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/core/SkRTree.cpp ('k') | tests/PictureTest.cpp » ('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 "SkLayerInfo.h" 8 #include "SkLayerInfo.h"
9 #include "SkRecordDraw.h" 9 #include "SkRecordDraw.h"
10 #include "SkPatchUtils.h" 10 #include "SkPatchUtils.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 fSaveStack.top().bounds.join(bounds); 380 fSaveStack.top().bounds.join(bounds);
381 } 381 }
382 } 382 }
383 383
384 // FIXME: this method could use better bounds 384 // FIXME: this method could use better bounds
385 Bounds bounds(const DrawText&) const { return fCurrentClipBounds; } 385 Bounds bounds(const DrawText&) const { return fCurrentClipBounds; }
386 386
387 Bounds bounds(const DrawPaint&) const { return fCurrentClipBounds; } 387 Bounds bounds(const DrawPaint&) const { return fCurrentClipBounds; }
388 Bounds bounds(const NoOp&) const { return Bounds::MakeEmpty(); } // NoOp s don't draw. 388 Bounds bounds(const NoOp&) const { return Bounds::MakeEmpty(); } // NoOp s don't draw.
389 389
390 Bounds bounds(const DrawSprite& op) const { // Ignores the matrix, but resp ects the clip. 390 Bounds bounds(const DrawSprite& op) const { // Ignores the matrix.
391 SkRect rect = Bounds::MakeXYWH(op.left, op.top, op.bitmap.width(), op.bi tmap.height()); 391 return Bounds::MakeXYWH(op.left, op.top, op.bitmap.width(), op.bitmap.he ight());
392 if (!rect.intersect(fCurrentClipBounds)) {
393 return Bounds::MakeEmpty();
394 }
395 return rect;
396 } 392 }
397 393
398 Bounds bounds(const DrawRect& op) const { return this->adjustAndMap(op.rect, &op.paint); } 394 Bounds bounds(const DrawRect& op) const { return this->adjustAndMap(op.rect, &op.paint); }
399 Bounds bounds(const DrawOval& op) const { return this->adjustAndMap(op.oval, &op.paint); } 395 Bounds bounds(const DrawOval& op) const { return this->adjustAndMap(op.oval, &op.paint); }
400 Bounds bounds(const DrawRRect& op) const { 396 Bounds bounds(const DrawRRect& op) const {
401 return this->adjustAndMap(op.rrect.rect(), &op.paint); 397 return this->adjustAndMap(op.rrect.rect(), &op.paint);
402 } 398 }
403 Bounds bounds(const DrawDRRect& op) const { 399 Bounds bounds(const DrawDRRect& op) const {
404 return this->adjustAndMap(op.outer.rect(), &op.paint); 400 return this->adjustAndMap(op.outer.rect(), &op.paint);
405 } 401 }
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 SkRecords::CollectLayers visitor(cullRect, record, pictList, data); 787 SkRecords::CollectLayers visitor(cullRect, record, pictList, data);
792 788
793 for (unsigned curOp = 0; curOp < record.count(); curOp++) { 789 for (unsigned curOp = 0; curOp < record.count(); curOp++) {
794 visitor.setCurrentOp(curOp); 790 visitor.setCurrentOp(curOp);
795 record.visit<void>(curOp, visitor); 791 record.visit<void>(curOp, visitor);
796 } 792 }
797 793
798 visitor.cleanUp(bbh); 794 visitor.cleanUp(bbh);
799 } 795 }
800 796
OLDNEW
« no previous file with comments | « src/core/SkRTree.cpp ('k') | tests/PictureTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698