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

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

Issue 1768433003: remove align16 calls in skhader context sizes. will handle this elsewhere as needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « src/core/SkEmptyShader.h ('k') | src/core/SkPictureShader.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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 644
645 const SkMatrix* m = &total; 645 const SkMatrix* m = &total;
646 if (rec.fLocalMatrix) { 646 if (rec.fLocalMatrix) {
647 total.setConcat(*m, *rec.fLocalMatrix); 647 total.setConcat(*m, *rec.fLocalMatrix);
648 m = &total; 648 m = &total;
649 } 649 }
650 return m->invert(normTotalInverse); 650 return m->invert(normTotalInverse);
651 } 651 }
652 652
653 size_t SkLightingShaderImpl::onContextSize(const ContextRec&) const { 653 size_t SkLightingShaderImpl::onContextSize(const ContextRec&) const {
654 return SkAlign16(2 * sizeof(SkBitmapProcState) + sizeof(LightingShaderContex t)); 654 return 2 * sizeof(SkBitmapProcState) + sizeof(LightingShaderContext);
655 } 655 }
656 656
657 SkShader::Context* SkLightingShaderImpl::onCreateContext(const ContextRec& rec, 657 SkShader::Context* SkLightingShaderImpl::onCreateContext(const ContextRec& rec,
658 void* storage) const { 658 void* storage) const {
659 659
660 SkMatrix diffTotalInv; 660 SkMatrix diffTotalInv;
661 // computeTotalInverse was called in SkShader::createContext so we know it w ill succeed 661 // computeTotalInverse was called in SkShader::createContext so we know it w ill succeed
662 SkAssertResult(this->computeTotalInverse(rec, &diffTotalInv)); 662 SkAssertResult(this->computeTotalInverse(rec, &diffTotalInv));
663 663
664 SkMatrix normTotalInv; 664 SkMatrix normTotalInv;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 normLocalM); 717 normLocalM);
718 } 718 }
719 719
720 /////////////////////////////////////////////////////////////////////////////// 720 ///////////////////////////////////////////////////////////////////////////////
721 721
722 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingShader) 722 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingShader)
723 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLightingShaderImpl) 723 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLightingShaderImpl)
724 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 724 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
725 725
726 /////////////////////////////////////////////////////////////////////////////// 726 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/core/SkEmptyShader.h ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698