Lines Matching refs:buffer
166 // create and fill transfer buffer
168 sk_sp<GrGpuBuffer> buffer(resourceProvider->createBuffer(size, GrGpuBufferType::kXferCpuToGpu,
170 if (!buffer) {
173 void* data = buffer->map();
174 if (!buffer) {
175 ERRORF(reporter, "Could not map buffer");
179 buffer->unmap();
189 buffer,
226 // We keep a 1 to 1 correspondence between pixels in the buffer and the entire texture. We
227 // update the contents of a sub-rect of the buffer and push that rect to the texture. We start
228 // with a left sub-rect inset of 2 but may adjust that so we can fulfill the transfer buffer
253 data = buffer->map();
255 buffer->unmap();
261 buffer,
295 // We'll do a full texture read into the buffer followed by a partial read. These values
335 // Create the transfer buffer.
357 sk_sp<GrGpuBuffer> buffer(resourceProvider->createBuffer(
359 REPORTER_ASSERT(reporter, buffer);
360 if (!buffer) {
373 buffer,
385 // Copy the transfer buffer contents to a temporary so we can manipulate it.
386 const auto* map = reinterpret_cast<const char*>(buffer->map());
389 ERRORF(reporter, "Failed to map transfer buffer.");
394 buffer->unmap();
414 // Now test a partial read at an offset into the buffer.
420 buffer,
432 map = reinterpret_cast<const char*>(buffer->map());
435 ERRORF(reporter, "Failed to map transfer buffer.");
440 buffer->unmap();