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

Side by Side Diff: src/effects/SkLayerRasterizer.cpp

Issue 169913003: replace SkBitmap::Config with SkColorType in gms (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « src/effects/SkBlurMaskFilter.cpp ('k') | 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 /* 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 "SkLayerRasterizer.h" 10 #include "SkLayerRasterizer.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 SkDraw draw; 115 SkDraw draw;
116 SkMatrix translatedMatrix; // this translates us to our local pi xels 116 SkMatrix translatedMatrix; // this translates us to our local pi xels
117 SkMatrix drawMatrix; // this translates the path by each l ayer's offset 117 SkMatrix drawMatrix; // this translates the path by each l ayer's offset
118 118
119 rectClip.setRect(SkIRect::MakeWH(mask->fBounds.width(), mask->fBounds.he ight())); 119 rectClip.setRect(SkIRect::MakeWH(mask->fBounds.width(), mask->fBounds.he ight()));
120 120
121 translatedMatrix = matrix; 121 translatedMatrix = matrix;
122 translatedMatrix.postTranslate(-SkIntToScalar(mask->fBounds.fLeft), 122 translatedMatrix.postTranslate(-SkIntToScalar(mask->fBounds.fLeft),
123 -SkIntToScalar(mask->fBounds.fTop)); 123 -SkIntToScalar(mask->fBounds.fTop));
124 124
125 device.installPixels(SkImageInfo::MakeA8(mask->fBounds.width(), 125 device.installMaskPixels(*mask);
126 mask->fBounds.height()),
127 mask->fImage, mask->fRowBytes, NULL, NULL);
128 126
129 draw.fBitmap = &device; 127 draw.fBitmap = &device;
130 draw.fMatrix = &drawMatrix; 128 draw.fMatrix = &drawMatrix;
131 draw.fRC = &rectClip; 129 draw.fRC = &rectClip;
132 draw.fClip = &rectClip.bwRgn(); 130 draw.fClip = &rectClip.bwRgn();
133 // we set the matrixproc in the loop, as the matrix changes each time (p otentially) 131 // we set the matrixproc in the loop, as the matrix changes each time (p otentially)
134 draw.fBounder = NULL; 132 draw.fBounder = NULL;
135 133
136 SkDeque::F2BIter iter(fLayers); 134 SkDeque::F2BIter iter(fLayers);
137 SkLayerRasterizer_Rec* rec; 135 SkLayerRasterizer_Rec* rec;
(...skipping 26 matching lines...) Expand all
164 buffer.writeInt(fLayers.count()); 162 buffer.writeInt(fLayers.count());
165 163
166 SkDeque::F2BIter iter(fLayers); 164 SkDeque::F2BIter iter(fLayers);
167 const SkLayerRasterizer_Rec* rec; 165 const SkLayerRasterizer_Rec* rec;
168 166
169 while ((rec = (const SkLayerRasterizer_Rec*)iter.next()) != NULL) { 167 while ((rec = (const SkLayerRasterizer_Rec*)iter.next()) != NULL) {
170 buffer.writePaint(rec->fPaint); 168 buffer.writePaint(rec->fPaint);
171 buffer.writePoint(rec->fOffset); 169 buffer.writePoint(rec->fOffset);
172 } 170 }
173 } 171 }
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698