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

Side by Side Diff: ui/gl/gl_image_io_surface.mm

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_io_surface.h ('k') | ui/gl/gl_image_memory.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 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 "ui/gl/gl_image_io_surface.h" 5 #include "ui/gl/gl_image_io_surface.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/mac/bind_objc_block.h" 10 #include "base/mac/bind_objc_block.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } 224 }
225 225
226 gfx::Size GLImageIOSurface::GetSize() { 226 gfx::Size GLImageIOSurface::GetSize() {
227 return size_; 227 return size_;
228 } 228 }
229 229
230 unsigned GLImageIOSurface::GetInternalFormat() { 230 unsigned GLImageIOSurface::GetInternalFormat() {
231 return internalformat_; 231 return internalformat_;
232 } 232 }
233 233
234 bool GLImageIOSurface::BindTexImage(unsigned target) { 234 bool GLImageIOSurface::BindTexImage(unsigned target, GLFence* fence) {
235 DCHECK(thread_checker_.CalledOnValidThread()); 235 DCHECK(thread_checker_.CalledOnValidThread());
236 TRACE_EVENT0("gpu", "GLImageIOSurface::BindTexImage"); 236 TRACE_EVENT0("gpu", "GLImageIOSurface::BindTexImage");
237 base::TimeTicks start_time = base::TimeTicks::Now(); 237 base::TimeTicks start_time = base::TimeTicks::Now();
238 238
239 // YUV_420_BIPLANAR is not supported by BindTexImage. 239 // YUV_420_BIPLANAR is not supported by BindTexImage.
240 // CopyTexImage is supported by this format as that performs conversion to RGB 240 // CopyTexImage is supported by this format as that performs conversion to RGB
241 // as part of the copy operation. 241 // as part of the copy operation.
242 if (format_ == gfx::BufferFormat::YUV_420_BIPLANAR) 242 if (format_ == gfx::BufferFormat::YUV_420_BIPLANAR)
243 return false; 243 return false;
244 244
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 // static 400 // static
401 GLImageIOSurface* GLImageIOSurface::FromGLImage(GLImage* image) { 401 GLImageIOSurface* GLImageIOSurface::FromGLImage(GLImage* image) {
402 if (!image || image->GetType() != Type::IOSURFACE) 402 if (!image || image->GetType() != Type::IOSURFACE)
403 return nullptr; 403 return nullptr;
404 return static_cast<GLImageIOSurface*>(image); 404 return static_cast<GLImageIOSurface*>(image);
405 } 405 }
406 406
407 } // namespace gl 407 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gl_image_io_surface.h ('k') | ui/gl/gl_image_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698