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

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

Issue 1143173011: use pixmaps for dst in sprites -- NO BITMAPS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add dox 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 | « include/core/SkBitmap.h ('k') | src/core/SkBlitter.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 2008 The Android Open Source Project 3 * Copyright 2008 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 "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 1370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1381 f PixelRefOrigin.y(), 1381 f PixelRefOrigin.y(),
1382 r es.fRowBytes); 1382 r es.fRowBytes);
1383 1383
1384 result->reset(SkPixmap(this->info(), addr, res.fRowBytes, res.fCTable), 1384 result->reset(SkPixmap(this->info(), addr, res.fRowBytes, res.fCTable),
1385 res.fUnlockProc, res.fUnlockContext); 1385 res.fUnlockProc, res.fUnlockContext);
1386 return true; 1386 return true;
1387 } 1387 }
1388 return false; 1388 return false;
1389 } 1389 }
1390 1390
1391 bool SkBitmap::peekPixels(SkPixmap* pmap) const {
1392 if (fPixels) {
1393 if (pmap) {
1394 pmap->reset(fInfo, fPixels, fRowBytes, fColorTable);
1395 }
1396 return true;
1397 }
1398 return false;
1399 }
1400
1391 /////////////////////////////////////////////////////////////////////////////// 1401 ///////////////////////////////////////////////////////////////////////////////
1392 1402
1393 #ifdef SK_DEBUG 1403 #ifdef SK_DEBUG
1394 void SkImageInfo::validate() const { 1404 void SkImageInfo::validate() const {
1395 SkASSERT(fWidth >= 0); 1405 SkASSERT(fWidth >= 0);
1396 SkASSERT(fHeight >= 0); 1406 SkASSERT(fHeight >= 0);
1397 SkASSERT(SkColorTypeIsValid(fColorType)); 1407 SkASSERT(SkColorTypeIsValid(fColorType));
1398 SkASSERT(SkAlphaTypeIsValid(fAlphaType)); 1408 SkASSERT(SkAlphaTypeIsValid(fAlphaType));
1399 } 1409 }
1400 #endif 1410 #endif
OLDNEW
« no previous file with comments | « include/core/SkBitmap.h ('k') | src/core/SkBlitter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698