зеркало из https://github.com/mozilla/moz-skia.git
Add operator = to GrPaint
Review URL: http://codereview.appspot.com/4997045/ git-svn-id: http://skia.googlecode.com/svn/trunk@2248 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
4f83be8f86
Коммит
27c9b6d276
|
@ -108,6 +108,16 @@ public:
|
|||
}
|
||||
|
||||
GrPaint(const GrPaint& paint) {
|
||||
for (int i = 0; i < kMaxTextures; ++i) {
|
||||
fTextures[i] = NULL;
|
||||
}
|
||||
for (int i = 0; i < kMaxMasks; ++i) {
|
||||
fMaskTextures[i] = NULL;
|
||||
}
|
||||
*this = paint;
|
||||
}
|
||||
|
||||
GrPaint& operator=(const GrPaint& paint) {
|
||||
fSrcBlendCoeff = paint.fSrcBlendCoeff;
|
||||
fDstBlendCoeff = paint.fDstBlendCoeff;
|
||||
fAntiAlias = paint.fAntiAlias;
|
||||
|
@ -119,15 +129,18 @@ public:
|
|||
fColorFilterXfermode = paint.fColorFilterXfermode;
|
||||
|
||||
for (int i = 0; i < kMaxTextures; ++i) {
|
||||
GrSafeUnref(fTextures[i]);
|
||||
fTextureSamplers[i] = paint.fTextureSamplers[i];
|
||||
fTextures[i] = paint.fTextures[i];
|
||||
GrSafeRef(fTextures[i]);
|
||||
}
|
||||
for (int i = 0; i < kMaxMasks; ++i) {
|
||||
GrSafeUnref(fMaskTextures[i]);
|
||||
fMaskSamplers[i] = paint.fMaskSamplers[i];
|
||||
fMaskTextures[i] = paint.fMaskTextures[i];
|
||||
GrSafeRef(fMaskTextures[i]);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
~GrPaint() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче