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

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

Issue 1720933002: Add ContextRec param to SkShader::contextSize() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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
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 "SkAtomics.h" 8 #include "SkAtomics.h"
9 #include "SkBitmapProcShader.h" 9 #include "SkBitmapProcShader.h"
10 #include "SkColorShader.h" 10 #include "SkColorShader.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (!this->computeTotalInverse(rec, nullptr)) { 89 if (!this->computeTotalInverse(rec, nullptr)) {
90 return nullptr; 90 return nullptr;
91 } 91 }
92 return this->onCreateContext(rec, storage); 92 return this->onCreateContext(rec, storage);
93 } 93 }
94 94
95 SkShader::Context* SkShader::onCreateContext(const ContextRec& rec, void*) const { 95 SkShader::Context* SkShader::onCreateContext(const ContextRec& rec, void*) const {
96 return nullptr; 96 return nullptr;
97 } 97 }
98 98
99 size_t SkShader::contextSize() const { 99 size_t SkShader::contextSize(const ContextRec&) const {
100 return 0; 100 return 0;
101 } 101 }
102 102
103 SkShader::Context::Context(const SkShader& shader, const ContextRec& rec) 103 SkShader::Context::Context(const SkShader& shader, const ContextRec& rec)
104 : fShader(shader), fCTM(*rec.fMatrix) 104 : fShader(shader), fCTM(*rec.fMatrix)
105 { 105 {
106 // Because the context parameters must be valid at this point, we know that the matrix is 106 // Because the context parameters must be valid at this point, we know that the matrix is
107 // invertible. 107 // invertible.
108 SkAssertResult(fShader.computeTotalInverse(rec, &fTotalInverse)); 108 SkAssertResult(fShader.computeTotalInverse(rec, &fTotalInverse));
109 fTotalInverseClass = (uint8_t)ComputeMatrixClass(fTotalInverse); 109 fTotalInverseClass = (uint8_t)ComputeMatrixClass(fTotalInverse);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 #include "SkEmptyShader.h" 365 #include "SkEmptyShader.h"
366 366
367 void SkEmptyShader::toString(SkString* str) const { 367 void SkEmptyShader::toString(SkString* str) const {
368 str->append("SkEmptyShader: ("); 368 str->append("SkEmptyShader: (");
369 369
370 this->INHERITED::toString(str); 370 this->INHERITED::toString(str);
371 371
372 str->append(")"); 372 str->append(")");
373 } 373 }
374 #endif 374 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698