Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle the long text for dl::push_text() #1597

Merged
merged 3 commits into from Aug 24, 2017
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Add current_used_block_num() in GpuDataRequest to get the current use…

…d block number.
  • Loading branch information
JerryShih committed Aug 23, 2017
commit 0eb5916f752e7b2fed7ffad05d44b820604ab670
@@ -468,6 +468,10 @@ impl<'a> GpuDataRequest<'a> {
self.texture.pending_blocks.extend_from_slice(blocks);
}

pub fn current_used_block_num(&self) -> usize {
self.texture.pending_blocks.len() - self.start_index
}

/// Consume the request and return the number of blocks written
pub fn close(self) -> usize {

This comment has been minimized.

@glennw

glennw Aug 22, 2017

Member

I'd prefer to keep this as close taking self as a parameter, that prevents it from being used again after the close is called.

This comment has been minimized.

@JerryShih

JerryShih Aug 23, 2017

Author Contributor

I will keep the close() function and create a new one for regular block num checking.

self.texture.pending_blocks.len() - self.start_index
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.