Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: gpu/command_buffer/tests/gl_manager.cc

Issue 1135943002: Pull in various gpu/command_buffer fixes from chromium (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | gpu/config/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/tests/gl_manager.cc
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index 4e4eccb2abed4026fc23ec1c918f52a9f3af8d74..7c0f4a5b9162ae594a282d79b4d262751de7347c 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -72,15 +72,16 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
}
// Overridden from gfx::GpuMemoryBuffer:
- void* Map() override {
+ bool Map(void** data) override {
mapped_ = true;
- return &bytes_->data().front();
+ *data = &bytes_->data().front();
+ return true;
}
void Unmap() override { mapped_ = false; }
bool IsMapped() const override { return mapped_; }
Format GetFormat() const override { return format_; }
- uint32 GetStride() const override {
- return StrideInBytes(size_.width(), format_);
+ void GetStride(uint32* stride) const override {
+ *stride = StrideInBytes(size_.width(), format_);
}
gfx::GpuMemoryBufferHandle GetHandle() const override {
NOTREACHED();
@@ -334,8 +335,8 @@ void GLManager::Destroy() {
gles2_helper_.reset();
command_buffer_.reset();
if (decoder_.get()) {
- decoder_->MakeCurrent();
- decoder_->Destroy(true);
+ bool have_context = decoder_->GetGLContext()->MakeCurrent(surface_.get());
+ decoder_->Destroy(have_context);
decoder_.reset();
}
}
« no previous file with comments | « gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc ('k') | gpu/config/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698