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

Side by Side Diff: src/image/SkSurface_Raster.cpp

Issue 884163003: Disable LCD text when rasterizing SkPictureShader tiles. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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
« src/core/SkPictureShader.cpp ('K') | « src/core/SkPictureShader.cpp ('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 "SkSurface_Base.h" 8 #include "SkSurface_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 fBitmap.setInfo(info, info.minRowBytes()); 99 fBitmap.setInfo(info, info.minRowBytes());
100 fBitmap.setPixelRef(pr); 100 fBitmap.setPixelRef(pr);
101 fWeOwnThePixels = true; 101 fWeOwnThePixels = true;
102 102
103 if (!info.isOpaque()) { 103 if (!info.isOpaque()) {
104 fBitmap.eraseColor(SK_ColorTRANSPARENT); 104 fBitmap.eraseColor(SK_ColorTRANSPARENT);
105 } 105 }
106 } 106 }
107 107
108 SkCanvas* SkSurface_Raster::onNewCanvas() { 108 SkCanvas* SkSurface_Raster::onNewCanvas() {
109 return SkNEW_ARGS(SkCanvas, (fBitmap, this->props())); 109 return SkNEW_ARGS(SkCanvas, (fBitmap, &this->props()));
110 } 110 }
111 111
112 SkSurface* SkSurface_Raster::onNewSurface(const SkImageInfo& info) { 112 SkSurface* SkSurface_Raster::onNewSurface(const SkImageInfo& info) {
113 return SkSurface::NewRaster(info); 113 return SkSurface::NewRaster(info);
114 } 114 }
115 115
116 void SkSurface_Raster::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, 116 void SkSurface_Raster::onDraw(SkCanvas* canvas, SkScalar x, SkScalar y,
117 const SkPaint* paint) { 117 const SkPaint* paint) {
118 canvas->drawBitmap(fBitmap, x, y, paint); 118 canvas->drawBitmap(fBitmap, x, y, paint);
119 } 119 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (!SkSurface_Raster::Valid(info)) { 169 if (!SkSurface_Raster::Valid(info)) {
170 return NULL; 170 return NULL;
171 } 171 }
172 172
173 SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, 0, NULL)); 173 SkAutoTUnref<SkPixelRef> pr(SkMallocPixelRef::NewAllocate(info, 0, NULL));
174 if (NULL == pr.get()) { 174 if (NULL == pr.get()) {
175 return NULL; 175 return NULL;
176 } 176 }
177 return SkNEW_ARGS(SkSurface_Raster, (pr, props)); 177 return SkNEW_ARGS(SkSurface_Raster, (pr, props));
178 } 178 }
OLDNEW
« src/core/SkPictureShader.cpp ('K') | « src/core/SkPictureShader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698