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

Side by Side Diff: ui/gl/gl_image_memory.cc

Issue 2388653002: gpu: Add CHROMIUM_texture_from_image spec and fence support.
Patch Set: rebase Created 4 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/gl/gl_image_memory.h" 5 #include "ui/gl/gl_image_memory.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 } 389 }
390 390
391 gfx::Size GLImageMemory::GetSize() { 391 gfx::Size GLImageMemory::GetSize() {
392 return size_; 392 return size_;
393 } 393 }
394 394
395 unsigned GLImageMemory::GetInternalFormat() { 395 unsigned GLImageMemory::GetInternalFormat() {
396 return internalformat_; 396 return internalformat_;
397 } 397 }
398 398
399 bool GLImageMemory::BindTexImage(unsigned target) { 399 bool GLImageMemory::BindTexImage(unsigned target, GLFence* fence) {
400 return false; 400 return false;
401 } 401 }
402 402
403 bool GLImageMemory::CopyTexImage(unsigned target) { 403 bool GLImageMemory::CopyTexImage(unsigned target) {
404 TRACE_EVENT2("gpu", "GLImageMemory::CopyTexImage", "width", size_.width(), 404 TRACE_EVENT2("gpu", "GLImageMemory::CopyTexImage", "width", size_.width(),
405 "height", size_.height()); 405 "height", size_.height());
406 406
407 // GL_TEXTURE_EXTERNAL_OES is not a supported target. 407 // GL_TEXTURE_EXTERNAL_OES is not a supported target.
408 if (target == GL_TEXTURE_EXTERNAL_OES) 408 if (target == GL_TEXTURE_EXTERNAL_OES)
409 return false; 409 return false;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 return false; 496 return false;
497 } 497 }
498 498
499 // static 499 // static
500 unsigned GLImageMemory::GetInternalFormatForTesting(gfx::BufferFormat format) { 500 unsigned GLImageMemory::GetInternalFormatForTesting(gfx::BufferFormat format) {
501 DCHECK(ValidFormat(format)); 501 DCHECK(ValidFormat(format));
502 return TextureFormat(format); 502 return TextureFormat(format);
503 } 503 }
504 504
505 } // namespace gl 505 } // namespace gl
OLDNEW
« ui/gl/gl_image.h ('K') | « ui/gl/gl_image_memory.h ('k') | ui/gl/gl_image_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698