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

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

Issue 572933004: when we disable lcd for impl reasons, add kGenA8 to document the original intent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/SkDevice.h ('k') | src/core/SkCanvas.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 2013 Google Inc. 2 * Copyright 2013 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 "SkConfig8888.h" 9 #include "SkConfig8888.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // we're cool with the paint as is 379 // we're cool with the paint as is
380 return false; 380 return false;
381 } 381 }
382 382
383 if (kN32_SkColorType != fBitmap.colorType() || 383 if (kN32_SkColorType != fBitmap.colorType() ||
384 paint.getRasterizer() || 384 paint.getRasterizer() ||
385 paint.getPathEffect() || 385 paint.getPathEffect() ||
386 paint.isFakeBoldText() || 386 paint.isFakeBoldText() ||
387 paint.getStyle() != SkPaint::kFill_Style || 387 paint.getStyle() != SkPaint::kFill_Style ||
388 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { 388 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) {
389 // turn off lcd 389 // turn off lcd, but turn on kGenA8
390 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; 390 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
391 flags->fHinting = paint.getHinting(); 391 flags->fFlags |= SkPaint::kGenA8FromLCD_Flag;
392 return true; 392 return true;
393 } 393 }
394 // we're cool with the paint as is 394 // we're cool with the paint as is
395 return false; 395 return false;
396 } 396 }
OLDNEW
« no previous file with comments | « include/core/SkDevice.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698