Home | History | Annotate | Download | only in effects

Lines Matching refs:light

16 sk_sp<SkMaskFilter> SkEmbossMaskFilter::Make(SkScalar blurSigma, const Light& light) {
17 return sk_sp<SkMaskFilter>(new SkEmbossMaskFilter(blurSigma, light));
27 SkEmbossMaskFilter::Light light;
29 memcpy(light.fDirection, direction, sizeof(light.fDirection));
31 light.fAmbient = SkUnitScalarClampToByte(ambient);
34 light.fSpecular = static_cast<U8CPU>(SkScalarPin(specular, 0, 16) * kSpecularMultiplier + 0.5);
36 return SkEmbossMaskFilter::Make(blurSigma, light);
51 SkEmbossMaskFilter::SkEmbossMaskFilter(SkScalar blurSigma, const Light& light)
52 : fLight(light), fBlurSigma(blurSigma) {
90 // run the light direction through the matrix...
91 Light light = fLight;
92 matrix.mapVectors((SkVector*)(void*)light.fDirection,
97 SkVector* vec = (SkVector*)(void*)light.fDirection;
98 vec->setLength(light.fDirection[0],
99 light.fDirection[1],
102 SkEmbossMask::Emboss(dst, light);
111 Light light;
112 if (buffer.readByteArray(&light, sizeof(Light))) {
113 light.fPad = 0; // for the font-cache lookup to be clean
115 return Make(sigma, light);
121 Light tmpLight = fLight;