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

Side by Side Diff: samplecode/SampleAll.cpp

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « include/effects/SkPictureImageFilter.h ('k') | samplecode/SampleApp.h » ('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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(12)/5); 386 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(12)/5);
387 SkEmbossMaskFilter* embossFilter = SkEmbossMaskFilter::Create(sigma, lig ht); 387 SkEmbossMaskFilter* embossFilter = SkEmbossMaskFilter::Create(sigma, lig ht);
388 388
389 SkXfermode* xfermode = SkXfermode::Create(SkXfermode::kXor_Mode); 389 SkXfermode* xfermode = SkXfermode::Create(SkXfermode::kXor_Mode);
390 SkColorFilter* lightingFilter = SkColorFilter::CreateLightingFilter( 390 SkColorFilter* lightingFilter = SkColorFilter::CreateLightingFilter(
391 0xff89bc45, 0xff112233); 391 0xff89bc45, 0xff112233);
392 392
393 canvas->save(); 393 canvas->save();
394 canvas->translate(SkIntToScalar(0), SkIntToScalar(5)); 394 canvas->translate(SkIntToScalar(0), SkIntToScalar(5));
395 paint.setAntiAlias(true); 395 paint.setAntiAlias(true);
396 paint.setFilterLevel(SkPaint::kLow_FilterLevel); 396 paint.setFilterQuality(kLow_SkFilterQuality);
397 // !!! draw through a clip 397 // !!! draw through a clip
398 paint.setColor(SK_ColorLTGRAY); 398 paint.setColor(SK_ColorLTGRAY);
399 paint.setStyle(SkPaint::kFill_Style); 399 paint.setStyle(SkPaint::kFill_Style);
400 SkRect clip = {0, 0, SkIntToScalar(320), SkIntToScalar(120)}; 400 SkRect clip = {0, 0, SkIntToScalar(320), SkIntToScalar(120)};
401 canvas->clipRect(clip); 401 canvas->clipRect(clip);
402 paint.setShader(SkShader::CreateBitmapShader(fTx, 402 paint.setShader(SkShader::CreateBitmapShader(fTx,
403 SkShader::kMirror_TileMode, SkShader::kRepeat_TileMode))->unref(); 403 SkShader::kMirror_TileMode, SkShader::kRepeat_TileMode))->unref();
404 canvas->drawPaint(paint); 404 canvas->drawPaint(paint);
405 canvas->save(); 405 canvas->save();
406 406
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 private: 577 private:
578 SkPoint fClickPt; 578 SkPoint fClickPt;
579 SkBitmap fBug, fTb, fTx; 579 SkBitmap fBug, fTb, fTx;
580 typedef SampleView INHERITED; 580 typedef SampleView INHERITED;
581 }; 581 };
582 582
583 ////////////////////////////////////////////////////////////////////////////// 583 //////////////////////////////////////////////////////////////////////////////
584 584
585 static SkView* MyFactory() { return new DemoView; } 585 static SkView* MyFactory() { return new DemoView; }
586 static SkViewRegister reg(MyFactory); 586 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/effects/SkPictureImageFilter.h ('k') | samplecode/SampleApp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698