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

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

Issue 303543009: replace config() with colorType() (Closed) Base URL: https://skia.googlecode.com/svn/trunk
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 | Annotate | Revision Log
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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 454 }
455 455
456 /////////////////////////////////////////////////////////////////////////////// 456 ///////////////////////////////////////////////////////////////////////////////
457 457
458 bool SkBitmapDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) { 458 bool SkBitmapDevice::filterTextFlags(const SkPaint& paint, TextFlags* flags) {
459 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) { 459 if (!paint.isLCDRenderText() || !paint.isAntiAlias()) {
460 // we're cool with the paint as is 460 // we're cool with the paint as is
461 return false; 461 return false;
462 } 462 }
463 463
464 if (SkBitmap::kARGB_8888_Config != fBitmap.config() || 464 if (kN32_SkColorType != fBitmap.colorType() ||
465 paint.getRasterizer() || 465 paint.getRasterizer() ||
466 paint.getPathEffect() || 466 paint.getPathEffect() ||
467 paint.isFakeBoldText() || 467 paint.isFakeBoldText() ||
468 paint.getStyle() != SkPaint::kFill_Style || 468 paint.getStyle() != SkPaint::kFill_Style ||
469 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { 469 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) {
470 // turn off lcd 470 // turn off lcd
471 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; 471 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
472 flags->fHinting = paint.getHinting(); 472 flags->fHinting = paint.getHinting();
473 return true; 473 return true;
474 } 474 }
475 // we're cool with the paint as is 475 // we're cool with the paint as is
476 return false; 476 return false;
477 } 477 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698