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

Side by Side Diff: samplecode/SampleAll.cpp

Issue 1540203002: Revert of change all factories to return their base-class (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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/SkXfermodeImageFilter.h ('k') | samplecode/SampleTiling.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 /* 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 radialRadius, radialColors, radialPos, radialCount, 375 radialRadius, radialColors, radialPos, radialCount,
376 radialMode); 376 radialMode);
377 377
378 SkEmbossMaskFilter::Light light; 378 SkEmbossMaskFilter::Light light;
379 light.fDirection[0] = SK_Scalar1/2; 379 light.fDirection[0] = SK_Scalar1/2;
380 light.fDirection[1] = SK_Scalar1/2; 380 light.fDirection[1] = SK_Scalar1/2;
381 light.fDirection[2] = SK_Scalar1/3; 381 light.fDirection[2] = SK_Scalar1/3;
382 light.fAmbient = 0x48; 382 light.fAmbient = 0x48;
383 light.fSpecular = 0x80; 383 light.fSpecular = 0x80;
384 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(12)/5); 384 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(12)/5);
385 SkMaskFilter* embossFilter = SkEmbossMaskFilter::Create(sigma, light); 385 SkEmbossMaskFilter* embossFilter = SkEmbossMaskFilter::Create(sigma, lig ht);
386 386
387 SkXfermode* xfermode = SkXfermode::Create(SkXfermode::kXor_Mode); 387 SkXfermode* xfermode = SkXfermode::Create(SkXfermode::kXor_Mode);
388 SkColorFilter* lightingFilter = SkColorFilter::CreateLightingFilter( 388 SkColorFilter* lightingFilter = SkColorFilter::CreateLightingFilter(
389 0xff89bc45, 0xff112233); 389 0xff89bc45, 0xff112233);
390 390
391 canvas->save(); 391 canvas->save();
392 canvas->translate(SkIntToScalar(0), SkIntToScalar(5)); 392 canvas->translate(SkIntToScalar(0), SkIntToScalar(5));
393 paint.setAntiAlias(true); 393 paint.setAntiAlias(true);
394 paint.setFilterQuality(kLow_SkFilterQuality); 394 paint.setFilterQuality(kLow_SkFilterQuality);
395 // !!! draw through a clip 395 // !!! draw through a clip
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 private: 571 private:
572 SkPoint fClickPt; 572 SkPoint fClickPt;
573 SkBitmap fBug, fTb, fTx; 573 SkBitmap fBug, fTb, fTx;
574 typedef SampleView INHERITED; 574 typedef SampleView INHERITED;
575 }; 575 };
576 576
577 ////////////////////////////////////////////////////////////////////////////// 577 //////////////////////////////////////////////////////////////////////////////
578 578
579 static SkView* MyFactory() { return new DemoView; } 579 static SkView* MyFactory() { return new DemoView; }
580 static SkViewRegister reg(MyFactory); 580 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « include/effects/SkXfermodeImageFilter.h ('k') | samplecode/SampleTiling.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698