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

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

Issue 1348583002: Make skpaint->grpaint flow work for composing draws (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused inheriteds to satisfy clang Created 5 years, 2 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 | « src/core/SkDevice.cpp ('k') | src/core/SkShader.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 2015 Google Inc. 3 * Copyright 2015 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 8
9 #include "SkBitmapProcState.h" 9 #include "SkBitmapProcState.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 SkAutoTUnref<GrTexture> normalTexture(GrRefCachedBitmapTexture(context, 393 SkAutoTUnref<GrTexture> normalTexture(GrRefCachedBitmapTexture(context,
394 fNormalMap, & normParams)); 394 fNormalMap, & normParams));
395 if (!normalTexture) { 395 if (!normalTexture) {
396 SkErrorInternals::SetError(kInternalError_SkError, "Couldn't convert bit map to texture."); 396 SkErrorInternals::SetError(kInternalError_SkError, "Couldn't convert bit map to texture.");
397 return nullptr; 397 return nullptr;
398 } 398 }
399 399
400 SkAutoTUnref<const GrFragmentProcessor> inner ( 400 SkAutoTUnref<const GrFragmentProcessor> inner (
401 new LightingFP(pdm, diffuseTexture, normalTexture, diffM, normM, diffPar ams, normParams, 401 new LightingFP(pdm, diffuseTexture, normalTexture, diffM, normM, diffPar ams, normParams,
402 fLights, fInvNormRotation)); 402 fLights, fInvNormRotation));
403 return GrFragmentProcessor::MulOuputByInputAlpha(inner); 403 return GrFragmentProcessor::MulOutputByInputAlpha(inner);
404 } 404 }
405 405
406 #endif 406 #endif
407 407
408 //////////////////////////////////////////////////////////////////////////// 408 ////////////////////////////////////////////////////////////////////////////
409 409
410 bool SkLightingShaderImpl::isOpaque() const { 410 bool SkLightingShaderImpl::isOpaque() const {
411 return fDiffuseMap.isOpaque(); 411 return fDiffuseMap.isOpaque();
412 } 412 }
413 413
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 normLocalM); 713 normLocalM);
714 } 714 }
715 715
716 /////////////////////////////////////////////////////////////////////////////// 716 ///////////////////////////////////////////////////////////////////////////////
717 717
718 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingShader) 718 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingShader)
719 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLightingShaderImpl) 719 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLightingShaderImpl)
720 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 720 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
721 721
722 /////////////////////////////////////////////////////////////////////////////// 722 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/core/SkDevice.cpp ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698