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

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

Issue 429343004: Stopped skipping tests in dm of SkPatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Moved DRAW_PATCH DrawType to the last position 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 | « src/core/SkBBoxRecord.h ('k') | src/core/SkCanvas.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBBoxRecord.h" 9 #include "SkBBoxRecord.h"
10 10
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 const uint16_t indices[], int indexCount, 277 const uint16_t indices[], int indexCount,
278 const SkPaint& paint) { 278 const SkPaint& paint) {
279 SkRect bbox; 279 SkRect bbox;
280 bbox.set(vertices, vertexCount); 280 bbox.set(vertices, vertexCount);
281 if (this->transformBounds(bbox, &paint)) { 281 if (this->transformBounds(bbox, &paint)) {
282 INHERITED::drawVertices(mode, vertexCount, vertices, texs, 282 INHERITED::drawVertices(mode, vertexCount, vertices, texs,
283 colors, xfer, indices, indexCount, paint); 283 colors, xfer, indices, indexCount, paint);
284 } 284 }
285 } 285 }
286 286
287 void SkBBoxRecord::drawPatch(const SkPatch& patch, const SkPaint& paint) {
288 const SkPoint* points = patch.getControlPoints();
289 SkRect bbox;
290 bbox.set(points, SkPatch::kNumCtrlPts);
291 if (this->transformBounds(bbox, &paint)) {
292 INHERITED::drawPatch(patch, paint);
293 }
294 }
295
287 void SkBBoxRecord::onDrawPicture(const SkPicture* picture) { 296 void SkBBoxRecord::onDrawPicture(const SkPicture* picture) {
288 if (picture->width() > 0 && picture->height() > 0 && 297 if (picture->width() > 0 && picture->height() > 0 &&
289 this->transformBounds(SkRect::MakeWH(picture->width(), picture->height() ), NULL)) { 298 this->transformBounds(SkRect::MakeWH(picture->width(), picture->height() ), NULL)) {
290 this->INHERITED::onDrawPicture(picture); 299 this->INHERITED::onDrawPicture(picture);
291 } 300 }
292 } 301 }
293 302
294 void SkBBoxRecord::willSave() { 303 void SkBBoxRecord::willSave() {
295 fSaveStack.push(NULL); 304 fSaveStack.push(NULL);
296 this->INHERITED::willSave(); 305 this->INHERITED::willSave();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 347 }
339 348
340 if (!outBounds.isEmpty() && !this->quickReject(outBounds)) { 349 if (!outBounds.isEmpty() && !this->quickReject(outBounds)) {
341 this->getTotalMatrix().mapRect(&outBounds); 350 this->getTotalMatrix().mapRect(&outBounds);
342 this->handleBBox(outBounds); 351 this->handleBBox(outBounds);
343 return true; 352 return true;
344 } 353 }
345 354
346 return false; 355 return false;
347 } 356 }
OLDNEW
« no previous file with comments | « src/core/SkBBoxRecord.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698