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

Side by Side Diff: src/core/SkBlitter.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/SkBitmapProcShader.cpp ('k') | src/core/SkColorFilterShader.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 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkBlitter.h" 8 #include "SkBlitter.h"
9 #include "SkAntiRun.h" 9 #include "SkAntiRun.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 public: 586 public:
587 Sk3DShader(SkShader* proxy) : fProxy(proxy) { 587 Sk3DShader(SkShader* proxy) : fProxy(proxy) {
588 SkSafeRef(proxy); 588 SkSafeRef(proxy);
589 } 589 }
590 590
591 virtual ~Sk3DShader() { 591 virtual ~Sk3DShader() {
592 SkSafeUnref(fProxy); 592 SkSafeUnref(fProxy);
593 } 593 }
594 594
595 size_t onContextSize(const ContextRec& rec) const override { 595 size_t onContextSize(const ContextRec& rec) const override {
596 size_t size = SkAlign16(sizeof(Sk3DShaderContext)); 596 size_t size = sizeof(Sk3DShaderContext);
597 if (fProxy) { 597 if (fProxy) {
598 size += fProxy->contextSize(rec); 598 size += fProxy->contextSize(rec);
599 } 599 }
600 return size; 600 return size;
601 } 601 }
602 602
603 Context* onCreateContext(const ContextRec& rec, void* storage) const overrid e { 603 Context* onCreateContext(const ContextRec& rec, void* storage) const overrid e {
604 SkShader::Context* proxyContext = nullptr; 604 SkShader::Context* proxyContext = nullptr;
605 if (fProxy) { 605 if (fProxy) {
606 char* proxyContextStorage = (char*) storage + sizeof(Sk3DShaderConte xt); 606 char* proxyContextStorage = (char*) storage + sizeof(Sk3DShaderConte xt);
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 fShaderContext->~Context(); 1009 fShaderContext->~Context();
1010 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext); 1010 SkShader::Context* ctx = fShader->createContext(rec, (void*)fShaderContext);
1011 if (nullptr == ctx) { 1011 if (nullptr == ctx) {
1012 // Need a valid context in fShaderContext's storage, so we can later (or our caller) call 1012 // Need a valid context in fShaderContext's storage, so we can later (or our caller) call
1013 // the in-place destructor. 1013 // the in-place destructor.
1014 new (fShaderContext) SkZeroShaderContext(*fShader, rec); 1014 new (fShaderContext) SkZeroShaderContext(*fShader, rec);
1015 return false; 1015 return false;
1016 } 1016 }
1017 return true; 1017 return true;
1018 } 1018 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkColorFilterShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698