本文整理汇总了C++中NOTIFY_SETUP函数的典型用法代码示例。如果您正苦于以下问题:C++ NOTIFY_SETUP函数的具体用法?C++ NOTIFY_SETUP怎么用?C++ NOTIFY_SETUP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NOTIFY_SETUP函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: NOTIFY_SETUP
SkCanvas::SaveLayerStrategy SkGPipeCanvas::willSaveLayer(const SkRect* bounds, const SkPaint* paint,
SaveFlags saveFlags) {
NOTIFY_SETUP(this);
size_t size = 0;
unsigned opFlags = 0;
if (bounds) {
opFlags |= kSaveLayer_HasBounds_DrawOpFlag;
size += sizeof(SkRect);
}
if (paint) {
opFlags |= kSaveLayer_HasPaint_DrawOpFlag;
this->writePaint(*paint);
}
if (this->needOpBytes(size)) {
this->writeOp(kSaveLayer_DrawOp, opFlags, saveFlags);
if (bounds) {
fWriter.writeRect(*bounds);
}
}
this->INHERITED::willSaveLayer(bounds, paint, saveFlags);
// we don't create a layer
return kNoLayer_SaveLayerStrategy;
}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:26,代码来源:SkGPipeWrite.cpp
示例2: NOTIFY_SETUP
void SkGPipeCanvas::onDrawBitmapRect(const SkBitmap& bm, const SkRect* src, const SkRect& dst,
const SkPaint* paint,
SK_VIRTUAL_CONSTRAINT_TYPE legacyConstraint) {
SrcRectConstraint constraint = (SrcRectConstraint)legacyConstraint;
NOTIFY_SETUP(this);
size_t opBytesNeeded = sizeof(SkRect);
bool hasSrc = src != NULL;
unsigned flags;
if (hasSrc) {
flags = kDrawBitmap_HasSrcRect_DrawOpFlag;
opBytesNeeded += sizeof(int32_t) * 4;
} else {
flags = 0;
}
if (kFast_SrcRectConstraint == constraint) {
flags |= kDrawBitmap_Bleed_DrawOpFlag;
}
if (this->commonDrawBitmap(bm, kDrawBitmapRect_DrawOp, flags, opBytesNeeded, paint)) {
if (hasSrc) {
fWriter.writeRect(*src);
}
fWriter.writeRect(dst);
}
}
开发者ID:Jichao,项目名称:skia,代码行数:26,代码来源:SkGPipeWrite.cpp
示例3: NOTIFY_SETUP
void SkGPipeCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, const SkRect& dst,
const SkPaint* paint) {
NOTIFY_SETUP(this);
unsigned flags = 0;
size_t opBytesNeeded = sizeof(SkRect); // dst
if (src) {
flags |= kDrawBitmap_HasSrcRect_DrawOpFlag;
opBytesNeeded += sizeof(SkRect); // src
}
if (this->commonDrawImage(image, kDrawImageRect_DrawOp, flags, opBytesNeeded, paint)) {
if (src) {
fWriter.writeRect(*src);
}
fWriter.writeRect(dst);
}
}
开发者ID:mariospr,项目名称:chromium-browser,代码行数:16,代码来源:SkGPipeWrite.cpp
注:本文中的NOTIFY_SETUP函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论