当前位置: 首页>>代码示例>>C++>>正文


C++ SkWriteBuffer::writeBitmap方法代码示例

本文整理汇总了C++中SkWriteBuffer::writeBitmap方法的典型用法代码示例。如果您正苦于以下问题:C++ SkWriteBuffer::writeBitmap方法的具体用法?C++ SkWriteBuffer::writeBitmap怎么用?C++ SkWriteBuffer::writeBitmap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SkWriteBuffer的用法示例。


在下文中一共展示了SkWriteBuffer::writeBitmap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: flatten

 void flatten(SkWriteBuffer& buf) const override {
     buf.writeBitmap(fDiffuseMap);
     buf.writeBitmap(fNormalMap);
     buf.writeScalarArray(&fLight.fDirection.fX, 3);
     buf.writeColor(fLight.fColor);
     buf.writeColor(fAmbientColor);
 }
开发者ID:mariospr,项目名称:chromium-browser,代码行数:7,代码来源:SampleLighting.cpp

示例2: flatten

void SkBitmapProcShader::flatten(SkWriteBuffer& buffer) const {
    this->INHERITED::flatten(buffer);

    buffer.writeBitmap(fRawBitmap);
    buffer.writeUInt(fTileModeX);
    buffer.writeUInt(fTileModeY);
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:7,代码来源:SkBitmapProcShader.cpp

示例3: shuttleBitmap

bool SkGPipeCanvas::shuttleBitmap(const SkBitmap& bm, int32_t slot) {
    SkASSERT(shouldFlattenBitmaps(fFlags));
    SkWriteBuffer buffer;
    buffer.setNamedFactoryRecorder(fFactorySet);
    buffer.writeBitmap(bm);
    this->flattenFactoryNames();
    size_t size = buffer.bytesWritten();
    if (this->needOpBytes(size)) {
        this->writeOp(kDef_Bitmap_DrawOp, 0, slot);
        void* dst = static_cast<void*>(fWriter.reserve(size));
        buffer.writeToMemory(dst);
        return true;
    }
    return false;
}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:15,代码来源:SkGPipeWrite.cpp

示例4: flattenToBuffer

void SkPictureData::flattenToBuffer(SkWriteBuffer& buffer) const {
    int i, n;

    if ((n = fBitmaps.count()) > 0) {
        write_tag_size(buffer, SK_PICT_BITMAP_BUFFER_TAG, n);
        for (i = 0; i < n; i++) {
            buffer.writeBitmap(fBitmaps[i]);
        }
    }

    if ((n = fPaints.count()) > 0) {
        write_tag_size(buffer, SK_PICT_PAINT_BUFFER_TAG, n);
        for (i = 0; i < n; i++) {
            buffer.writePaint(fPaints[i]);
        }
    }

    if ((n = fPaths.count()) > 0) {
        write_tag_size(buffer, SK_PICT_PATH_BUFFER_TAG, n);
        buffer.writeInt(n);
        for (int i = 0; i < n; i++) {
            buffer.writePath(fPaths[i]);
        }
    }

    if (fTextBlobCount > 0) {
        write_tag_size(buffer, SK_PICT_TEXTBLOB_BUFFER_TAG, fTextBlobCount);
        for (i = 0; i  < fTextBlobCount; ++i) {
            fTextBlobRefs[i]->flatten(buffer);
        }
    }

    if (fImageCount > 0) {
        write_tag_size(buffer, SK_PICT_IMAGE_BUFFER_TAG, fImageCount);
        for (i = 0; i  < fImageCount; ++i) {
            buffer.writeImage(fImageRefs[i]);
        }
    }
}
开发者ID:AHPlankton,项目名称:skia,代码行数:39,代码来源:SkPictureData.cpp

示例5: flatten

void SkBitmapProcShader::flatten(SkWriteBuffer& buffer) const {
    buffer.writeMatrix(this->getLocalMatrix());
    buffer.writeBitmap(fRawBitmap);
    buffer.writeUInt(fTileModeX);
    buffer.writeUInt(fTileModeY);
}
开发者ID:MichaelKohler,项目名称:gecko-dev,代码行数:6,代码来源:SkBitmapProcShader.cpp


注:本文中的SkWriteBuffer::writeBitmap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。