Lines Matching defs:surface

442 bool GrGpu::readPixels(GrSurface* surface,
449 SkASSERT(surface);
450 SkASSERT(!surface->framebufferOnly());
452 surface->backendFormat()));
454 if (!SkIRect::MakeSize(surface->dimensions()).contains(rect)) {
474 return this->onReadPixels(surface, rect, surfaceColorType, dstColorType, buffer, rowBytes);
477 bool GrGpu::writePixels(GrSurface* surface,
496 surface->uniqueID().asUInt(), rect.width(), rect.height());
497 SkASSERT(surface);
498 SkASSERT(!surface->framebufferOnly());
500 if (surface->readOnly()) {
507 // We require that if we are not mipped, then the write region is contained in the surface
508 if (!SkIRect::MakeSize(surface->dimensions()).contains(rect)) {
511 } else if (rect != SkIRect::MakeSize(surface->dimensions())) {
512 // We require that if the texels are mipped, than the write region is the entire surface
521 if (this->onWritePixels(surface,
528 this->didWriteToSurface(surface, kTopLeft_GrSurfaceOrigin, &rect, mipLevelCount);
538 duration, surface->uniqueID().asUInt(), rect.width(), rect.height());
597 bool GrGpu::transferPixelsFrom(GrSurface* surface,
604 SkASSERT(surface);
607 surface->backendFormat()));
611 surfaceColorType, surface->backendFormat(), bufferColorType);
617 if (!SkIRect::MakeSize(surface->dimensions()).contains(rect)) {
622 if (this->onTransferPixelsFrom(surface,
667 void GrGpu::didWriteToSurface(GrSurface* surface, GrSurfaceOrigin origin, const SkIRect* bounds,
669 SkASSERT(surface);
670 SkASSERT(!surface->readOnly());
673 GrTexture* texture = surface->asTexture();
724 // We currently don't support passing in new surface state for multiple proxies here. The only