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

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

Issue 962723002: Change CHROMIUM_image declarations to support multi planar input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reveman@ comments and const-corrected function signatures. Created 5 years, 9 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM( 584 GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM(
585 GLenum target) { 585 GLenum target) {
586 base::AutoLock lock(namespace_->lock); 586 base::AutoLock lock(namespace_->lock);
587 base::ScopedPtrHashMap<unsigned, Buffer>& buffers = namespace_->buffers; 587 base::ScopedPtrHashMap<unsigned, Buffer>& buffers = namespace_->buffers;
588 DCHECK_GT(buffers.count(bound_buffer_), 0u); 588 DCHECK_GT(buffers.count(bound_buffer_), 0u);
589 DCHECK_EQ(target, buffers.get(bound_buffer_)->target); 589 DCHECK_EQ(target, buffers.get(bound_buffer_)->target);
590 buffers.get(bound_buffer_)->pixels = nullptr; 590 buffers.get(bound_buffer_)->pixels = nullptr;
591 return true; 591 return true;
592 } 592 }
593 593
594 GLuint TestWebGraphicsContext3D::createImageCHROMIUM(ClientBuffer buffer, 594 GLuint TestWebGraphicsContext3D::createImageCHROMIUM(
595 GLsizei width, 595 const ClientBuffer* const buffers,
596 GLsizei height, 596 GLsizei width,
597 GLenum internalformat) { 597 GLsizei height,
598 GLenum internalformat) {
598 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat)); 599 DCHECK_EQ(GL_RGBA, static_cast<int>(internalformat));
599 GLuint image_id = NextImageId(); 600 GLuint image_id = NextImageId();
600 base::AutoLock lock(namespace_->lock); 601 base::AutoLock lock(namespace_->lock);
601 base::hash_set<unsigned>& images = namespace_->images; 602 base::hash_set<unsigned>& images = namespace_->images;
602 images.insert(image_id); 603 images.insert(image_id);
603 return image_id; 604 return image_id;
604 } 605 }
605 606
606 void TestWebGraphicsContext3D::destroyImageCHROMIUM( 607 void TestWebGraphicsContext3D::destroyImageCHROMIUM(
607 GLuint id) { 608 GLuint id) {
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 792
792 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {} 793 TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {}
793 794
794 TestWebGraphicsContext3D::Buffer::~Buffer() {} 795 TestWebGraphicsContext3D::Buffer::~Buffer() {}
795 796
796 TestWebGraphicsContext3D::Image::Image() {} 797 TestWebGraphicsContext3D::Image::Image() {}
797 798
798 TestWebGraphicsContext3D::Image::~Image() {} 799 TestWebGraphicsContext3D::Image::~Image() {}
799 800
800 } // namespace cc 801 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698