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

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, 1 month 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
« no previous file with comments | « ui/gl/gl_image_memory.h ('k') | ui/gl/gl_image_stub.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 } 383 }
384 384
385 gfx::Size GLImageMemory::GetSize() { 385 gfx::Size GLImageMemory::GetSize() {
386 return size_; 386 return size_;
387 } 387 }
388 388
389 unsigned GLImageMemory::GetInternalFormat() { 389 unsigned GLImageMemory::GetInternalFormat() {
390 return internalformat_; 390 return internalformat_;
391 } 391 }
392 392
393 bool GLImageMemory::BindTexImage(unsigned target) { 393 bool GLImageMemory::BindTexImage(unsigned target, GLFence* fence) {
394 return false; 394 return false;
395 } 395 }
396 396
397 bool GLImageMemory::CopyTexImage(unsigned target) { 397 bool GLImageMemory::CopyTexImage(unsigned target) {
398 TRACE_EVENT2("gpu", "GLImageMemory::CopyTexImage", "width", size_.width(), 398 TRACE_EVENT2("gpu", "GLImageMemory::CopyTexImage", "width", size_.width(),
399 "height", size_.height()); 399 "height", size_.height());
400 400
401 // GL_TEXTURE_EXTERNAL_OES is not a supported target. 401 // GL_TEXTURE_EXTERNAL_OES is not a supported target.
402 if (target == GL_TEXTURE_EXTERNAL_OES) 402 if (target == GL_TEXTURE_EXTERNAL_OES)
403 return false; 403 return false;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 return false; 490 return false;
491 } 491 }
492 492
493 // static 493 // static
494 unsigned GLImageMemory::GetInternalFormatForTesting(gfx::BufferFormat format) { 494 unsigned GLImageMemory::GetInternalFormatForTesting(gfx::BufferFormat format) {
495 DCHECK(ValidFormat(format)); 495 DCHECK(ValidFormat(format));
496 return TextureFormat(format); 496 return TextureFormat(format);
497 } 497 }
498 498
499 } // namespace gl 499 } // namespace gl
OLDNEW
« no previous file with comments | « 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