Home | History | Annotate | Download | only in jni

Lines Matching refs:layer

38 #include "Layer.h"
147 LayerAndroid* layer = static_cast<LayerAndroid*>(baseLayer->getChild(i));
148 serializeLayer(layer, stream);
192 BaseLayerAndroid* layer = new BaseLayerAndroid(content);
193 layer->setBackgroundColor(color);
197 layer->markAsDirty(dirtyRegion);
204 layer->addChild(childLayer);
206 return layer;
333 void serializeLayer(LayerAndroid* layer, SkWStream* stream)
335 if (!layer) {
336 ALOGV("NULL layer!");
340 if (layer->isMedia() || layer->isVideo()) {
341 ALOGV("Layer isn't supported for serialization: isMedia: %s, isVideo: %s",
342 layer->isMedia() ? "true" : "false",
343 layer->isVideo() ? "true" : "false");
348 if (layer->contentIsScrollable())
352 // Start with Layer fields
353 stream->writeBool(layer->shouldInheritFromRootTransform());
354 stream->writeScalar(layer->getOpacity());
355 stream->writeScalar(layer->getSize().width());
356 stream->writeScalar(layer->getSize().height());
357 stream->writeScalar(layer->getPosition().x());
358 stream->writeScalar(layer->getPosition().y());
359 stream->writeScalar(layer->getAnchorPoint().x());
360 stream->writeScalar(layer->getAnchorPoint().y());
361 writeMatrix(stream, layer->getMatrix());
362 writeMatrix(stream, layer->getChildrenMatrix());
365 stream->writeBool(layer->m_haveClip);
366 stream->writeBool(layer->isPositionFixed());
367 stream->writeBool(layer->m_backgroundColorSet);
368 stream->writeBool(layer->isIFrame());
374 if (layer->fixedPosition()) {
375 FixedPositioning* fixedPosition = layer->fixedPosition();
403 stream->writeBool(layer->m_backfaceVisibility);
404 stream->writeBool(layer->m_visible);
405 stream->write32(layer->m_backgroundColor);
406 stream->writeBool(layer->m_preserves3D);
407 stream->writeScalar(layer->m_anchorPointZ);
408 stream->writeScalar(layer->m_drawOpacity);
409 bool hasContentsImage = layer->m_imageCRC != 0;
415 ImagesManager::instance()->retainImage(layer->m_imageCRC);
418 ImagesManager::instance()->releaseImage(layer->m_imageCRC);
422 bool hasRecordingPicture = layer->m_content != 0 && !layer->m_content->isEmpty();
425 layer->m_content->serialize(stream);
428 writeTransformationMatrix(stream, layer->m_transform);
429 writeTransformationMatrix(stream, layer->m_childrenTransform);
432 static_cast<ScrollableLayerAndroid*>(layer);
438 int childCount = layer->countChildren();
441 serializeLayer(layer->getChild(i), stream);
450 LayerAndroid *layer;
452 layer = new LayerAndroid((RenderLayer*) 0);
454 layer = new ScrollableLayerAndroid((RenderLayer*) 0);
456 ALOGV("Unexpected layer type: %d, aborting!", type);
460 // Layer fields
461 layer->setShouldInheritFromRootTransform(stream->readBool());
462 layer->setOpacity(stream->readScalar());
463 layer->setSize(stream->readScalar(), stream->readScalar());
464 layer->setPosition(stream->readScalar(), stream->readScalar());
465 layer->setAnchorPoint(stream->readScalar(), stream->readScalar());
466 layer->setMatrix(readMatrix(stream));
467 layer->setChildrenMatrix(readMatrix(stream));
470 layer->m_haveClip = stream->readBool();
475 layer->m_backgroundColorSet = stream->readBool();
478 // If we are a scrollable layer android, we are an iframe content
480 IFrameContentLayerAndroid* iframeContent = new IFrameContentLayerAndroid(*layer);
481 layer->unref();
482 layer = iframeContent;
484 IFrameLayerAndroid* iframe = new IFrameLayerAndroid(*layer);
485 layer->unref();
486 layer = iframe;
490 FixedPositioning* fixedPosition = new FixedPositioning(layer);
504 layer->setFixedPosition(fixedPosition);
520 layer->m_backfaceVisibility = stream->readBool();
521 layer->m_visible = stream->readBool();
522 layer->m_backgroundColor = stream->readU32();
523 layer->m_preserves3D = stream->readBool();
524 layer->m_anchorPointZ = stream->readScalar();
525 layer->m_drawOpacity = stream->readScalar();
535 layer->setContentsImage(imageRef);
548 layer->setContent(content);
552 readTransformationMatrix(stream, layer->m_transform);
553 readTransformationMatrix(stream, layer->m_childrenTransform);
556 static_cast<ScrollableLayerAndroid*>(layer);
567 layer->addChild(childLayer);
569 ALOGV("Created layer with id %d", layer->uniqueId());
570 return layer;