本文整理汇总了C++中android::sp::incStrong方法的典型用法代码示例。如果您正苦于以下问题:C++ sp::incStrong方法的具体用法?C++ sp::incStrong怎么用?C++ sp::incStrong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android::sp
的用法示例。
在下文中一共展示了sp::incStrong方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SurfaceTexture_setSurfaceTexture
static void SurfaceTexture_setSurfaceTexture(
/* [in] */ CSurfaceTexture* thiz,
/* [in] */ const android::sp<android::SurfaceTexture>& surfaceTexture)
{
android::SurfaceTexture* const p = (android::SurfaceTexture*)thiz->mSurfaceTexture;
if (surfaceTexture.get()) {
surfaceTexture->incStrong(thiz);
}
if (p) {
p->decStrong(thiz);
}
thiz->mSurfaceTexture = (Int32)surfaceTexture.get();
}
示例2: SurfaceTexture_setFrameAvailableListener
static void SurfaceTexture_setFrameAvailableListener(
/* [in] */ CSurfaceTexture* thiz,
/* [in] */ android::sp<GLConsumer::FrameAvailableListener> listener)
{
GLConsumer::FrameAvailableListener* const p = (GLConsumer::FrameAvailableListener*)thiz->mFrameAvailableListener;
if (listener.get()) {
listener->incStrong((void*)SurfaceTexture_setSurfaceTexture);
}
if (p) {
p->decStrong((void*)SurfaceTexture_setSurfaceTexture);
}
thiz->mFrameAvailableListener = (Int64)listener.get();
}
示例3: SurfaceTexture_setSurfaceTexture
static void SurfaceTexture_setSurfaceTexture(
/* [in] */ CSurfaceTexture* thiz,
/* [in] */ const android::sp<GLConsumer>& surfaceTexture)
{
GLConsumer* const p = (GLConsumer*)thiz->mSurfaceTexture;
if (surfaceTexture.get()) {
surfaceTexture->incStrong((void*)SurfaceTexture_setSurfaceTexture);
}
if (p) {
p->decStrong((void*)SurfaceTexture_setSurfaceTexture);
}
thiz->mSurfaceTexture = (Int64)surfaceTexture.get();
}
示例4: SurfaceTexture_setProducer
static void SurfaceTexture_setProducer(
/* [in] */ CSurfaceTexture* thiz,
/* [in] */ const android::sp<IGraphicBufferProducer>& producer)
{
IGraphicBufferProducer* const p =
(IGraphicBufferProducer*)thiz->mProducer;
if (producer.get()) {
producer->incStrong((void*)SurfaceTexture_setProducer);
}
if (p) {
p->decStrong((void*)SurfaceTexture_setProducer);
}
thiz->mProducer = (Int64)producer.get();
}
示例5: init
bool Shim::init() {
composer_client_ = new android::SurfaceComposerClient;
LOG("Inc ref on composerClient\n");
// Required to pass initCheck
composer_client_->incStrong(nullptr);
android::status_t status;
LOG("calling initCheck\n");
status = composer_client_->initCheck();
if (status != android::NO_ERROR) {
fprintf(stderr, "failed composer init check %d\n", status);
return false;
}
return true;
}