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

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

Issue 1576983002: Make SkBitmap::CopyTo respect requested dst color type when bitmap is texture backed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix size_t warnings Created 4 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
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/gpu/SkGrPixelRef.cpp » ('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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 "SkBitmapCache.h" 8 #include "SkBitmapCache.h"
9 #include "SkMutex.h" 9 #include "SkMutex.h"
10 #include "SkPixelRef.h" 10 #include "SkPixelRef.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 void SkPixelRef::setTemporarilyImmutable() { 300 void SkPixelRef::setTemporarilyImmutable() {
301 SkASSERT(fMutability != kImmutable); 301 SkASSERT(fMutability != kImmutable);
302 fMutability = kTemporarilyImmutable; 302 fMutability = kTemporarilyImmutable;
303 } 303 }
304 304
305 void SkPixelRef::restoreMutability() { 305 void SkPixelRef::restoreMutability() {
306 SkASSERT(fMutability != kImmutable); 306 SkASSERT(fMutability != kImmutable);
307 fMutability = kMutable; 307 fMutability = kMutable;
308 } 308 }
309 309
310 bool SkPixelRef::readPixels(SkBitmap* dst, const SkIRect* subset) { 310 bool SkPixelRef::readPixels(SkBitmap* dst, SkColorType ct, const SkIRect* subset ) {
311 return this->onReadPixels(dst, subset); 311 return this->onReadPixels(dst, ct, subset);
312 } 312 }
313 313
314 //////////////////////////////////////////////////////////////////////////////// /////////////////// 314 //////////////////////////////////////////////////////////////////////////////// ///////////////////
315 315
316 bool SkPixelRef::onReadPixels(SkBitmap* dst, const SkIRect* subset) { 316 bool SkPixelRef::onReadPixels(SkBitmap* dst, SkColorType, const SkIRect* subset) {
317 return false; 317 return false;
318 } 318 }
319 319
320 void SkPixelRef::onNotifyPixelsChanged() { } 320 void SkPixelRef::onNotifyPixelsChanged() { }
321 321
322 SkData* SkPixelRef::onRefEncodedData() { 322 SkData* SkPixelRef::onRefEncodedData() {
323 return nullptr; 323 return nullptr;
324 } 324 }
325 325
326 bool SkPixelRef::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3], 326 bool SkPixelRef::onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBy tes[3],
(...skipping 17 matching lines...) Expand all
344 } 344 }
345 345
346 result->fUnlockProc = unlock_legacy_result; 346 result->fUnlockProc = unlock_legacy_result;
347 result->fUnlockContext = SkRef(this); // this is balanced in our fUnlockPr oc 347 result->fUnlockContext = SkRef(this); // this is balanced in our fUnlockPr oc
348 result->fCTable = fRec.fColorTable; 348 result->fCTable = fRec.fColorTable;
349 result->fPixels = fRec.fPixels; 349 result->fPixels = fRec.fPixels;
350 result->fRowBytes = fRec.fRowBytes; 350 result->fRowBytes = fRec.fRowBytes;
351 result->fSize.set(fInfo.width(), fInfo.height()); 351 result->fSize.set(fInfo.width(), fInfo.height());
352 return true; 352 return true;
353 } 353 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/gpu/SkGrPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698