本文整理汇总了C++中GrCachedLayer::ctm方法的典型用法代码示例。如果您正苦于以下问题:C++ GrCachedLayer::ctm方法的具体用法?C++ GrCachedLayer::ctm怎么用?C++ GrCachedLayer::ctm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GrCachedLayer
的用法示例。
在下文中一共展示了GrCachedLayer::ctm方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create_layers
// Add several layers to the cache
static void create_layers(skiatest::Reporter* reporter,
GrLayerCache* cache,
const SkPicture& picture,
int numToAdd,
int idOffset) {
for (int i = 0; i < numToAdd; ++i) {
GrCachedLayer* layer = cache->findLayerOrCreate(&picture,
idOffset+i+1, idOffset+i+2,
SkMatrix::I());
REPORTER_ASSERT(reporter, NULL != layer);
GrCachedLayer* temp = cache->findLayer(&picture, idOffset+i+1, idOffset+i+2, SkMatrix::I());
REPORTER_ASSERT(reporter, temp == layer);
REPORTER_ASSERT(reporter, TestingAccess::NumLayers(cache) == idOffset + i + 1);
REPORTER_ASSERT(reporter, picture.uniqueID() == layer->pictureID());
REPORTER_ASSERT(reporter, layer->start() == idOffset + i + 1);
REPORTER_ASSERT(reporter, layer->stop() == idOffset + i + 2);
REPORTER_ASSERT(reporter, layer->ctm() == SkMatrix::I());
REPORTER_ASSERT(reporter, NULL == layer->texture());
REPORTER_ASSERT(reporter, !layer->isAtlased());
}
cache->trackPicture(&picture);
}