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

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

Issue 1002603003: disable LCD for layers w/ filters (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update gm Created 5 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
« gm/imagefiltersbase.cpp ('K') | « src/core/SkCanvas.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 2011 Google Inc. 2 * Copyright 2011 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 "SkDevice.h" 8 #include "SkDevice.h"
9 #include "SkDeviceProperties.h" 9 #include "SkDeviceProperties.h"
10 #include "SkDraw.h" 10 #include "SkDraw.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bitmap.notifyPixelsChanged(); 61 bitmap.notifyPixelsChanged();
62 } 62 }
63 return bitmap; 63 return bitmap;
64 } 64 }
65 65
66 SkPixelGeometry SkBaseDevice::CreateInfo::AdjustGeometry(const SkImageInfo& info , 66 SkPixelGeometry SkBaseDevice::CreateInfo::AdjustGeometry(const SkImageInfo& info ,
67 TileUsage tileUsage, 67 TileUsage tileUsage,
68 SkPixelGeometry geo) { 68 SkPixelGeometry geo) {
69 switch (tileUsage) { 69 switch (tileUsage) {
70 case kPossible_TileUsage: 70 case kPossible_TileUsage:
71 // (we think) for compatibility with old clients, we assume this lay er can support LCD
72 // even though they may not have marked it as opaque... seems like w e should update
73 // our callers (reed/robertphilips).
71 break; 74 break;
72 case kNever_TileUsage: 75 case kNever_TileUsage:
73 if (info.alphaType() != kOpaque_SkAlphaType) { 76 if (info.alphaType() != kOpaque_SkAlphaType) {
74 geo = kUnknown_SkPixelGeometry; 77 geo = kUnknown_SkPixelGeometry;
75 } 78 }
76 break; 79 break;
77 } 80 }
78 return geo; 81 return geo;
79 } 82 }
80 83
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry() 359 if (kUnknown_SkPixelGeometry == fLeakyProperties->pixelGeometry()
357 || this->onShouldDisableLCD(paint)) { 360 || this->onShouldDisableLCD(paint)) {
358 361
359 flags &= ~SkPaint::kLCDRenderText_Flag; 362 flags &= ~SkPaint::kLCDRenderText_Flag;
360 flags |= SkPaint::kGenA8FromLCD_Flag; 363 flags |= SkPaint::kGenA8FromLCD_Flag;
361 } 364 }
362 365
363 return flags; 366 return flags;
364 } 367 }
365 368
OLDNEW
« gm/imagefiltersbase.cpp ('K') | « src/core/SkCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698