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

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

Issue 102193006: fix drawVertices when we have both colors and textures (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkDraw.h" 8 #include "SkDraw.h"
9 #include "SkBlitter.h" 9 #include "SkBlitter.h"
10 #include "SkBounder.h" 10 #include "SkBounder.h"
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 if (NULL == xmode) { 2522 if (NULL == xmode) {
2523 xmode = SkXfermode::Create(SkXfermode::kModulate_Mode); 2523 xmode = SkXfermode::Create(SkXfermode::kModulate_Mode);
2524 releaseMode = true; 2524 releaseMode = true;
2525 } 2525 }
2526 SkShader* compose = SkNEW_ARGS(SkComposeShader, 2526 SkShader* compose = SkNEW_ARGS(SkComposeShader,
2527 (&triShader, shader, xmode)); 2527 (&triShader, shader, xmode));
2528 p.setShader(compose)->unref(); 2528 p.setShader(compose)->unref();
2529 if (releaseMode) { 2529 if (releaseMode) {
2530 xmode->unref(); 2530 xmode->unref();
2531 } 2531 }
2532 shader = compose;
2533 } 2532 }
2534 } 2533 }
2535 2534
2536 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, p); 2535 SkAutoBlitterChoose blitter(*fBitmap, *fMatrix, p);
2537 // important that we abort early, as below we may manipulate the shader 2536 // important that we abort early, as below we may manipulate the shader
2538 // and that is only valid if the shader returned true from setContext. 2537 // and that is only valid if the shader returned true from setContext.
2539 // If it returned false, then our blitter will be the NullBlitter. 2538 // If it returned false, then our blitter will be the NullBlitter.
2540 if (blitter->isNullBlitter()) { 2539 if (blitter->isNullBlitter()) {
2541 return; 2540 return;
2542 } 2541 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2821 mask->fImage = SkMask::AllocImage(size); 2820 mask->fImage = SkMask::AllocImage(size);
2822 memset(mask->fImage, 0, mask->computeImageSize()); 2821 memset(mask->fImage, 0, mask->computeImageSize());
2823 } 2822 }
2824 2823
2825 if (SkMask::kJustComputeBounds_CreateMode != mode) { 2824 if (SkMask::kJustComputeBounds_CreateMode != mode) {
2826 draw_into_mask(*mask, devPath, style); 2825 draw_into_mask(*mask, devPath, style);
2827 } 2826 }
2828 2827
2829 return true; 2828 return true;
2830 } 2829 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698