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

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

Issue 211043002: remove all references to legacy Config8888 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 9 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/core/SkBitmapDevice.cpp ('k') | src/core/SkDevice.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 /* 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 "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 } 660 }
661 // now jam our 1st clip to be bounds, and intersect the rest with that 661 // now jam our 1st clip to be bounds, and intersect the rest with that
662 rec->fRasterClip->setRect(bounds); 662 rec->fRasterClip->setRect(bounds);
663 while ((rec = (MCRec*)iter.next()) != NULL) { 663 while ((rec = (MCRec*)iter.next()) != NULL) {
664 (void)rec->fRasterClip->op(bounds, SkRegion::kIntersect_Op); 664 (void)rec->fRasterClip->op(bounds, SkRegion::kIntersect_Op);
665 } 665 }
666 666
667 return device; 667 return device;
668 } 668 }
669 669
670 #ifdef SK_SUPPORT_LEGACY_READPIXELSCONFIG
671 bool SkCanvas::readPixels(SkBitmap* bitmap,
672 int x, int y,
673 Config8888 config8888) {
674 SkBaseDevice* device = this->getDevice();
675 if (!device) {
676 return false;
677 }
678 return device->readPixels(bitmap, x, y, config8888);
679 }
680 #endif
681
682 bool SkCanvas::readPixels(SkBitmap* bitmap, int x, int y) { 670 bool SkCanvas::readPixels(SkBitmap* bitmap, int x, int y) {
683 if (kUnknown_SkColorType == bitmap->colorType() || bitmap->getTexture()) { 671 if (kUnknown_SkColorType == bitmap->colorType() || bitmap->getTexture()) {
684 return false; 672 return false;
685 } 673 }
686 674
687 bool weAllocated = false; 675 bool weAllocated = false;
688 if (NULL == bitmap->pixelRef()) { 676 if (NULL == bitmap->pixelRef()) {
689 if (!bitmap->allocPixels()) { 677 if (!bitmap->allocPixels()) {
690 return false; 678 return false;
691 } 679 }
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
2674 if (!bitmap.installPixels(info, pixels, rowBytes)) { 2662 if (!bitmap.installPixels(info, pixels, rowBytes)) {
2675 return NULL; 2663 return NULL;
2676 } 2664 }
2677 2665
2678 // should this functionality be moved into allocPixels()? 2666 // should this functionality be moved into allocPixels()?
2679 if (!bitmap.info().isOpaque()) { 2667 if (!bitmap.info().isOpaque()) {
2680 bitmap.eraseColor(0); 2668 bitmap.eraseColor(0);
2681 } 2669 }
2682 return SkNEW_ARGS(SkCanvas, (bitmap)); 2670 return SkNEW_ARGS(SkCanvas, (bitmap));
2683 } 2671 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapDevice.cpp ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698