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

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

Issue 68773005: Disable Blurred RR optimization in Chrome (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | 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 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 SkPath path; 225 SkPath path;
226 path.addOval(oval); 226 path.addOval(oval);
227 // call the VIRTUAL version, so any subclasses who do handle drawPath aren't 227 // call the VIRTUAL version, so any subclasses who do handle drawPath aren't
228 // required to override drawOval. 228 // required to override drawOval.
229 this->drawPath(draw, path, paint, NULL, true); 229 this->drawPath(draw, path, paint, NULL, true);
230 } 230 }
231 231
232 void SkBitmapDevice::drawRRect(const SkDraw& draw, const SkRRect& rrect, const S kPaint& paint) { 232 void SkBitmapDevice::drawRRect(const SkDraw& draw, const SkRRect& rrect, const S kPaint& paint) {
233 CHECK_FOR_ANNOTATION(paint); 233 CHECK_FOR_ANNOTATION(paint);
234 234
235 #ifdef SK_IGNORE_BLURRED_RRECT_OPT
236 SkPath path;
237
238 path.addRRect(rrect);
239 // call the VIRTUAL version, so any subclasses who do handle drawPath aren't
240 // required to override drawRRect.
241 this->drawPath(draw, path, paint, NULL, true);
242 #else
235 draw.drawRRect(rrect, paint); 243 draw.drawRRect(rrect, paint);
244 #endif
236 } 245 }
237 246
238 void SkBitmapDevice::drawPath(const SkDraw& draw, const SkPath& path, 247 void SkBitmapDevice::drawPath(const SkDraw& draw, const SkPath& path,
239 const SkPaint& paint, const SkMatrix* prePathMatri x, 248 const SkPaint& paint, const SkMatrix* prePathMatri x,
240 bool pathIsMutable) { 249 bool pathIsMutable) {
241 CHECK_FOR_ANNOTATION(paint); 250 CHECK_FOR_ANNOTATION(paint);
242 draw.drawPath(path, paint, prePathMatrix, pathIsMutable); 251 draw.drawPath(path, paint, prePathMatrix, pathIsMutable);
243 } 252 }
244 253
245 void SkBitmapDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap, 254 void SkBitmapDevice::drawBitmap(const SkDraw& draw, const SkBitmap& bitmap,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 paint.getStyle() != SkPaint::kFill_Style || 405 paint.getStyle() != SkPaint::kFill_Style ||
397 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) { 406 !SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)) {
398 // turn off lcd 407 // turn off lcd
399 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag; 408 flags->fFlags = paint.getFlags() & ~SkPaint::kLCDRenderText_Flag;
400 flags->fHinting = paint.getHinting(); 409 flags->fHinting = paint.getHinting();
401 return true; 410 return true;
402 } 411 }
403 // we're cool with the paint as is 412 // we're cool with the paint as is
404 return false; 413 return false;
405 } 414 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698