本文整理汇总了C++中TextureMapperLayer::backingStore方法的典型用法代码示例。如果您正苦于以下问题:C++ TextureMapperLayer::backingStore方法的具体用法?C++ TextureMapperLayer::backingStore怎么用?C++ TextureMapperLayer::backingStore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextureMapperLayer
的用法示例。
在下文中一共展示了TextureMapperLayer::backingStore方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getBackingStore
CoordinatedBackingStore* LayerTreeRenderer::getBackingStore(GraphicsLayer* graphicsLayer)
{
TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer);
ASSERT(layer);
CoordinatedBackingStore* backingStore = static_cast<CoordinatedBackingStore*>(layer->backingStore().get());
BackingStoreMap::iterator it = m_pendingSyncBackingStores.find(layer);
if (it != m_pendingSyncBackingStores.end())
backingStore = it->value.get();
return backingStore;
}
示例2: ensureLayer
PassRefPtr<LayerBackingStore> LayerTreeHostProxy::getBackingStore(WebLayerID id)
{
ensureLayer(id);
TextureMapperLayer* layer = toTextureMapperLayer(layerByID(id));
RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(layer->backingStore().get());
if (!backingStore) {
backingStore = LayerBackingStore::create();
layer->setBackingStore(backingStore.get());
}
ASSERT(backingStore);
return backingStore;
}
示例3: toTextureMapperLayer
PassRefPtr<LayerBackingStore> WebLayerTreeRenderer::getBackingStore(WebLayerID id)
{
TextureMapperLayer* layer = toTextureMapperLayer(layerByID(id));
ASSERT(layer);
RefPtr<LayerBackingStore> backingStore = static_cast<LayerBackingStore*>(layer->backingStore().get());
if (!backingStore) {
backingStore = LayerBackingStore::create();
layer->setBackingStore(backingStore.get());
}
ASSERT(backingStore);
return backingStore;
}
示例4: removeBackingStoreIfNeeded
void LayerTreeRenderer::removeBackingStoreIfNeeded(GraphicsLayer* graphicsLayer)
{
TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer);
ASSERT(layer);
// Check if the layout already has a backing store (committed or pending).
BackingStoreMap::iterator it = m_pendingSyncBackingStores.find(layer);
if (it != m_pendingSyncBackingStores.end()) {
if (it->value) {
// There is a pending addition, cancel it.
m_pendingSyncBackingStores.remove(it);
}
// There is already a pending removal.
return;
}
if (!layer->backingStore())
return; // The layer has no backing store (and no pending addition).
ASSERT(!m_pendingSyncBackingStores.contains(layer));
m_pendingSyncBackingStores.add(layer, 0);
}
示例5: createBackingStoreIfNeeded
void LayerTreeRenderer::createBackingStoreIfNeeded(GraphicsLayer* graphicsLayer)
{
TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer);
ASSERT(layer);
// Make sure the layer does not already have a backing store (committed or pending).
BackingStoreMap::iterator it = m_pendingSyncBackingStores.find(layer);
if (it != m_pendingSyncBackingStores.end()) {
if (!it->value) {
// There is a pending removal, cancel it.
m_pendingSyncBackingStores.remove(it);
}
// There is already a pending addition.
return;
}
if (layer->backingStore())
return; // The layer already has a backing store (and no pending removal).
RefPtr<CoordinatedBackingStore> backingStore(CoordinatedBackingStore::create());
backingStore->setSize(graphicsLayer->size());
ASSERT(!m_pendingSyncBackingStores.contains(layer));
m_pendingSyncBackingStores.add(layer, backingStore);
}