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

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

Issue 513983002: Try out scalar picture sizes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up Created 6 years, 3 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
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 "SkPatchUtils.h" 9 #include "SkPatchUtils.h"
10 10
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 dst.set(op.cubics, SkPatchUtils::kNumCtrlPts); 314 dst.set(op.cubics, SkPatchUtils::kNumCtrlPts);
315 return this->adjustAndMap(dst, &op.paint); 315 return this->adjustAndMap(dst, &op.paint);
316 } 316 }
317 SkIRect bounds(const DrawVertices& op) const { 317 SkIRect bounds(const DrawVertices& op) const {
318 SkRect dst; 318 SkRect dst;
319 dst.set(op.vertices, op.vertexCount); 319 dst.set(op.vertices, op.vertexCount);
320 return this->adjustAndMap(dst, &op.paint); 320 return this->adjustAndMap(dst, &op.paint);
321 } 321 }
322 322
323 SkIRect bounds(const DrawPicture& op) const { 323 SkIRect bounds(const DrawPicture& op) const {
324 SkRect dst = SkRect::MakeWH(op.picture->width(), op.picture->height()); 324 SkRect dst = op.picture->cullRect();
325 if (op.matrix) { 325 if (op.matrix) {
326 op.matrix->mapRect(&dst); 326 op.matrix->mapRect(&dst);
327 } 327 }
328 return this->adjustAndMap(dst, op.paint); 328 return this->adjustAndMap(dst, op.paint);
329 } 329 }
330 330
331 SkIRect bounds(const DrawPosText& op) const { 331 SkIRect bounds(const DrawPosText& op) const {
332 const int N = op.paint.countText(op.text, op.byteLength); 332 const int N = op.paint.countText(op.text, op.byteLength);
333 if (N == 0) { 333 if (N == 0) {
334 return SkIRect::MakeEmpty(); 334 return SkIRect::MakeEmpty();
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 // Used to track the bounds of Save/Restore blocks and the control ops insid e them. 458 // Used to track the bounds of Save/Restore blocks and the control ops insid e them.
459 SkTDArray<SaveBounds> fSaveStack; 459 SkTDArray<SaveBounds> fSaveStack;
460 SkTDArray<unsigned> fControlIndices; 460 SkTDArray<unsigned> fControlIndices;
461 }; 461 };
462 462
463 } // namespace SkRecords 463 } // namespace SkRecords
464 464
465 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { 465 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) {
466 SkRecords::FillBounds(record, bbh); 466 SkRecords::FillBounds(record, bbh);
467 } 467 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698