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

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

Issue 808703006: remove view matrix from context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: one more fix Created 6 years 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/SkLocalMatrixShader.h ('k') | src/core/SkPictureShader.h » ('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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #include "SkMaskFilter.h" 10 #include "SkMaskFilter.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 bool SkMaskFilter::canFilterMaskGPU(const SkRect& devBounds, 305 bool SkMaskFilter::canFilterMaskGPU(const SkRect& devBounds,
306 const SkIRect& clipBounds, 306 const SkIRect& clipBounds,
307 const SkMatrix& ctm, 307 const SkMatrix& ctm,
308 SkRect* maskRect) const { 308 SkRect* maskRect) const {
309 return false; 309 return false;
310 } 310 }
311 311
312 bool SkMaskFilter::directFilterMaskGPU(GrContext* context, 312 bool SkMaskFilter::directFilterMaskGPU(GrContext* context,
313 GrPaint* grp, 313 GrPaint* grp,
314 const SkMatrix& viewMatrix,
314 const SkStrokeRec& strokeRec, 315 const SkStrokeRec& strokeRec,
315 const SkPath& path) const { 316 const SkPath& path) const {
316 return false; 317 return false;
317 } 318 }
318 319
319 320
320 bool SkMaskFilter::directFilterRRectMaskGPU(GrContext* context, 321 bool SkMaskFilter::directFilterRRectMaskGPU(GrContext* context,
321 GrPaint* grp, 322 GrPaint* grp,
323 const SkMatrix& viewMatrix,
322 const SkStrokeRec& strokeRec, 324 const SkStrokeRec& strokeRec,
323 const SkRRect& rrect) const { 325 const SkRRect& rrect) const {
324 return false; 326 return false;
325 } 327 }
326 328
327 bool SkMaskFilter::filterMaskGPU(GrTexture* src, 329 bool SkMaskFilter::filterMaskGPU(GrTexture* src,
328 const SkMatrix& ctm, 330 const SkMatrix& ctm,
329 const SkRect& maskRect, 331 const SkRect& maskRect,
330 GrTexture** result, 332 GrTexture** result,
331 bool canOverwriteSrc) const { 333 bool canOverwriteSrc) const {
332 return false; 334 return false;
333 } 335 }
334 #endif 336 #endif
335 337
336 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const { 338 void SkMaskFilter::computeFastBounds(const SkRect& src, SkRect* dst) const {
337 SkMask srcM, dstM; 339 SkMask srcM, dstM;
338 340
339 srcM.fImage = NULL; 341 srcM.fImage = NULL;
340 srcM.fBounds = src.roundOut(); 342 srcM.fBounds = src.roundOut();
341 srcM.fRowBytes = 0; 343 srcM.fRowBytes = 0;
342 srcM.fFormat = SkMask::kA8_Format; 344 srcM.fFormat = SkMask::kA8_Format;
343 345
344 SkIPoint margin; // ignored 346 SkIPoint margin; // ignored
345 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { 347 if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) {
346 dst->set(dstM.fBounds); 348 dst->set(dstM.fBounds);
347 } else { 349 } else {
348 dst->set(srcM.fBounds); 350 dst->set(srcM.fBounds);
349 } 351 }
350 } 352 }
OLDNEW
« no previous file with comments | « src/core/SkLocalMatrixShader.h ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698