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

Side by Side Diff: cc/test/test_web_graphics_context_3d.cc

Issue 2134793002: Remove the command buffer method glGetImageivCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge conflict. Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/test_web_graphics_context_3d.h" 5 #include "cc/test/test_web_graphics_context_3d.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 GLenum internalformat, 632 GLenum internalformat,
633 GLenum usage) { 633 GLenum usage) {
634 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); 634 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat));
635 GLuint image_id = NextImageId(); 635 GLuint image_id = NextImageId();
636 base::AutoLock lock(namespace_->lock); 636 base::AutoLock lock(namespace_->lock);
637 std::unordered_set<unsigned>& images = namespace_->images; 637 std::unordered_set<unsigned>& images = namespace_->images;
638 images.insert(image_id); 638 images.insert(image_id);
639 return image_id; 639 return image_id;
640 } 640 }
641 641
642 void TestWebGraphicsContext3D::getImageivCHROMIUM(GLuint image_id,
643 GLenum param,
644 GLint* data) {
645 DCHECK_EQ(GL_GPU_MEMORY_BUFFER_ID, static_cast<int>(param));
646 base::AutoLock lock(namespace_->lock);
647 std::unordered_set<unsigned>& images = namespace_->images;
648 *data = images.find(image_id) == images.end() ? -1 : 1;
649 }
650
651 GLuint64 TestWebGraphicsContext3D::insertFenceSync() { 642 GLuint64 TestWebGraphicsContext3D::insertFenceSync() {
652 return next_insert_fence_sync_++; 643 return next_insert_fence_sync_++;
653 } 644 }
654 645
655 void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync, 646 void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync,
656 GLbyte* sync_token) { 647 GLbyte* sync_token) {
657 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0, 648 gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0,
658 gpu::CommandBufferId(), fence_sync); 649 gpu::CommandBufferId(), fence_sync);
659 sync_token_data.SetVerifyFlush(); 650 sync_token_data.SetVerifyFlush();
660 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data)); 651 memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 824
834 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} 825 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {}
835 826
836 TestWebGraphicsContext3D::Buffer::~Buffer() {} 827 TestWebGraphicsContext3D::Buffer::~Buffer() {}
837 828
838 TestWebGraphicsContext3D::Image::Image() {} 829 TestWebGraphicsContext3D::Image::Image() {}
839 830
840 TestWebGraphicsContext3D::Image::~Image() {} 831 TestWebGraphicsContext3D::Image::~Image() {}
841 832
842 } // namespace cc 833 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/test_web_graphics_context_3d.h ('k') | gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698