Buffer11: Slight cleanup in copyFromStorage.

We can call setData internally to re-use the same code.

BUG=chromium:593024

Change-Id: I9f53bef1e86a11fc23799123937c354bf45de014
Reviewed-on: https://chromium-review.googlesource.com/411919
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Jamie Madill 2016-11-16 11:27:43 -08:00 коммит произвёл Commit Bot
Родитель 3ae1461355
Коммит 96ed3527d0
1 изменённых файлов: 1 добавлений и 5 удалений

Просмотреть файл

@ -965,12 +965,8 @@ gl::ErrorOrResult<CopyResult> Buffer11::NativeStorage::copyFromStorage(BufferSto
uint8_t *sourcePointer = nullptr;
ANGLE_TRY(source->map(sourceOffset, clampedSize, GL_MAP_READ_BIT, &sourcePointer));
uint8_t *destPointer = nullptr;
ANGLE_TRY(map(destOffset, clampedSize, GL_MAP_WRITE_BIT, &destPointer));
setData(sourcePointer, destOffset, clampedSize);
memcpy(destPointer, sourcePointer, clampedSize);
unmap();
source->unmap();
}
else