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

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: Update to ToT again 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
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/effects/SkPictureImageFilter.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 "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 Bounds bounds(const DrawVertices& op) const { 317 Bounds 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 Bounds bounds(const DrawPicture& op) const { 323 Bounds 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 Bounds bounds(const DrawPosText& op) const { 331 Bounds 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 Bounds::MakeEmpty(); 334 return Bounds::MakeEmpty();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 // Used to track the bounds of Save/Restore blocks and the control ops insid e them. 456 // Used to track the bounds of Save/Restore blocks and the control ops insid e them.
457 SkTDArray<SaveBounds> fSaveStack; 457 SkTDArray<SaveBounds> fSaveStack;
458 SkTDArray<unsigned> fControlIndices; 458 SkTDArray<unsigned> fControlIndices;
459 }; 459 };
460 460
461 } // namespace SkRecords 461 } // namespace SkRecords
462 462
463 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) { 463 void SkRecordFillBounds(const SkRecord& record, SkBBoxHierarchy* bbh) {
464 SkRecords::FillBounds(record, bbh); 464 SkRecords::FillBounds(record, bbh);
465 } 465 }
OLDNEW
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698