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

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

Issue 1148793007: change SkDraw and all Blitters to use pixmap instead of bitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 6 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/SkBlitter_RGB16.cpp ('k') | src/core/SkCoreBlitters.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 * Copyright 2008 The Android Open Source Project 2 * Copyright 2008 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkCanvasPriv.h" 9 #include "SkCanvasPriv.h"
10 #include "SkBitmapDevice.h" 10 #include "SkBitmapDevice.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 264 }
265 } 265 }
266 266
267 const DeviceCM* rec = fCurrLayer; 267 const DeviceCM* rec = fCurrLayer;
268 if (rec && rec->fDevice) { 268 if (rec && rec->fDevice) {
269 269
270 fMatrix = rec->fMatrix; 270 fMatrix = rec->fMatrix;
271 fClip = &((SkRasterClip*)&rec->fClip)->forceGetBW(); 271 fClip = &((SkRasterClip*)&rec->fClip)->forceGetBW();
272 fRC = &rec->fClip; 272 fRC = &rec->fClip;
273 fDevice = rec->fDevice; 273 fDevice = rec->fDevice;
274 fBitmap = &fDevice->accessBitmap(true); 274 if (!fDevice->accessPixels(&fDst)) {
275 fDst.reset(fDevice->imageInfo(), NULL, 0);
276 }
275 fPaint = rec->fPaint; 277 fPaint = rec->fPaint;
276 SkDEBUGCODE(this->validate();) 278 SkDEBUGCODE(this->validate();)
277 279
278 fCurrLayer = rec->fNext; 280 fCurrLayer = rec->fNext;
279 // fCurrLayer may be NULL now 281 // fCurrLayer may be NULL now
280 282
281 return true; 283 return true;
282 } 284 }
283 return false; 285 return false;
284 } 286 }
(...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 } 2713 }
2712 2714
2713 if (matrix) { 2715 if (matrix) {
2714 canvas->concat(*matrix); 2716 canvas->concat(*matrix);
2715 } 2717 }
2716 } 2718 }
2717 2719
2718 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { 2720 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() {
2719 fCanvas->restoreToCount(fSaveCount); 2721 fCanvas->restoreToCount(fSaveCount);
2720 } 2722 }
OLDNEW
« no previous file with comments | « src/core/SkBlitter_RGB16.cpp ('k') | src/core/SkCoreBlitters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698