[gpu] Rename TryCopySubTextureINTERNALMemory method
TryCopySubTextureINTERNALMemory method was mostly copied from the raster/gles decoders which have INTERNAL style. Rename the method to CopyPixelsToTexture to make it more clearer. Bug: none Change-Id: I86786c1dd73a4cad498d34d288c833d29a1715b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6140853 Reviewed-by: Colin Blundell <blundell@chromium.org> Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org> Cr-Commit-Position: refs/heads/main@{#1401823}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
0bfc269bb6
commit
43e33c15be
@ -119,7 +119,7 @@ sk_sp<SkSurface> CreateSkSurfaceWrappingGLTexture(
|
||||
dest_color_space, nullptr);
|
||||
}
|
||||
|
||||
bool TryCopySubTextureINTERNALMemory(
|
||||
bool CopyPixelsToTexture(
|
||||
GLint xoffset,
|
||||
GLint yoffset,
|
||||
GLint x,
|
||||
@ -293,12 +293,12 @@ base::expected<void, GLError> CopySharedImageHelper::CopySharedImage(
|
||||
new_cleared_rect.Contains(old_cleared_rect));
|
||||
|
||||
// Attempt to upload directly from CPU shared memory to destination texture.
|
||||
if (TryCopySubTextureINTERNALMemory(
|
||||
xoffset, yoffset, x, y, width, height, new_cleared_rect,
|
||||
source_mailbox, dest_shared_image.get(), dest_scoped_access.get(),
|
||||
representation_factory_, shared_context_state_, begin_semaphores,
|
||||
end_semaphores)) {
|
||||
// Cancel cleanup as TryCopySubTextureINTERNALMemory already handles it.
|
||||
if (CopyPixelsToTexture(xoffset, yoffset, x, y, width, height,
|
||||
new_cleared_rect, source_mailbox,
|
||||
dest_shared_image.get(), dest_scoped_access.get(),
|
||||
representation_factory_, shared_context_state_,
|
||||
begin_semaphores, end_semaphores)) {
|
||||
// Cancel cleanup as CopyPixelsToTexture already handles it.
|
||||
std::move(cleanup).Cancel();
|
||||
return base::ok();
|
||||
}
|
||||
|
Reference in New Issue
Block a user