Beispiel #1
0
void GrGLPathRange::initAt(size_t index, const SkPath& skPath) {
    GrGpuGL* gpu = static_cast<GrGpuGL*>(this->getGpu());
    if (NULL == gpu) {
        return;
    }

    // Make sure the path at this index hasn't been initted already.
    SkDEBUGCODE(
        GrGLboolean isPath;
        GR_GL_CALL_RET(gpu->glInterface(), isPath, IsPath(fBasePathID + index)));
    SkASSERT(GR_GL_FALSE == isPath);

    GrGLPath::InitPathObject(gpu, fBasePathID + index, skPath, fStroke);
    ++fNumDefinedPaths;
    this->didChangeGpuMemorySize();
}