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

Side by Side Diff: src/utils/SkPictureUtils.cpp

Issue 327263002: remove SK_SUPPORT_LEGACY_DEVICE_CONFIG code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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/utils/SkGatherPixelRefsAndRects.h ('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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 GatherPixelRefDevice(int width, int height, PixelRefSet* prset) { 55 GatherPixelRefDevice(int width, int height, PixelRefSet* prset) {
56 fSize.set(width, height); 56 fSize.set(width, height);
57 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(width, height)); 57 fEmptyBitmap.setInfo(SkImageInfo::MakeUnknown(width, height));
58 fPRSet = prset; 58 fPRSet = prset;
59 } 59 }
60 60
61 virtual int width() const SK_OVERRIDE { return fSize.width(); } 61 virtual int width() const SK_OVERRIDE { return fSize.width(); }
62 virtual int height() const SK_OVERRIDE { return fSize.height(); } 62 virtual int height() const SK_OVERRIDE { return fSize.height(); }
63 virtual bool isOpaque() const SK_OVERRIDE { return false; } 63 virtual bool isOpaque() const SK_OVERRIDE { return false; }
64 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG
65 virtual SkBitmap::Config config() const SK_OVERRIDE {
66 return SkBitmap::kNo_Config;
67 }
68 #endif
69 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } 64 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; }
70 virtual bool filterTextFlags(const SkPaint& paint, TextFlags*) SK_OVERRIDE { 65 virtual bool filterTextFlags(const SkPaint& paint, TextFlags*) SK_OVERRIDE {
71 return false; 66 return false;
72 } 67 }
73 // TODO: allow this call to return failure, or move to SkBitmapDevice only. 68 // TODO: allow this call to return failure, or move to SkBitmapDevice only.
74 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE { 69 virtual const SkBitmap& onAccessBitmap() SK_OVERRIDE {
75 return fEmptyBitmap; 70 return fEmptyBitmap;
76 } 71 }
77 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); } 72 virtual void lockPixels() SK_OVERRIDE { nothing_to_do(); }
78 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); } 73 virtual void unlockPixels() SK_OVERRIDE { nothing_to_do(); }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 canvas.clipRect(area, SkRegion::kIntersect_Op, false); 211 canvas.clipRect(area, SkRegion::kIntersect_Op, false);
217 canvas.drawPicture(pict); 212 canvas.drawPicture(pict);
218 213
219 SkData* data = NULL; 214 SkData* data = NULL;
220 int count = array.count(); 215 int count = array.count();
221 if (count > 0) { 216 if (count > 0) {
222 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) ); 217 data = SkData::NewFromMalloc(array.detach(), count * sizeof(SkPixelRef*) );
223 } 218 }
224 return data; 219 return data;
225 } 220 }
OLDNEW
« no previous file with comments | « src/utils/SkGatherPixelRefsAndRects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698