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

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 1071273002: NotForReview: Implement zero/one-copy texture for ozone freon using Intel DRM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/gpu/browser_gpu_channel_host_factory.h" 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 std::vector<gfx::GpuMemoryBufferType> supported_types; 256 std::vector<gfx::GpuMemoryBufferType> supported_types;
257 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types); 257 GpuMemoryBufferFactory::GetSupportedTypes(&supported_types);
258 DCHECK(!supported_types.empty()); 258 DCHECK(!supported_types.empty());
259 259
260 // The GPU service will always use the preferred type. 260 // The GPU service will always use the preferred type.
261 gfx::GpuMemoryBufferType type = supported_types[0]; 261 gfx::GpuMemoryBufferType type = supported_types[0];
262 262
263 switch (type) { 263 switch (type) {
264 case gfx::SURFACE_TEXTURE_BUFFER: 264 case gfx::SURFACE_TEXTURE_BUFFER:
265 // Surface texture backed GPU memory buffers require 265 case gfx::OZONE_NATIVE_BUFFER:
reveman 2015/04/13 00:46:13 This change can land separately and it not current
dshwang 2015/04/14 13:15:55 got it
266 // EGLImage backed GPU memory buffers require
266 // TEXTURE_EXTERNAL_OES. 267 // TEXTURE_EXTERNAL_OES.
267 return GL_TEXTURE_EXTERNAL_OES; 268 return GL_TEXTURE_EXTERNAL_OES;
268 case gfx::IO_SURFACE_BUFFER: 269 case gfx::IO_SURFACE_BUFFER:
269 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB. 270 // IOSurface backed images require GL_TEXTURE_RECTANGLE_ARB.
270 return GL_TEXTURE_RECTANGLE_ARB; 271 return GL_TEXTURE_RECTANGLE_ARB;
271 default: 272 default:
272 return GL_TEXTURE_2D; 273 return GL_TEXTURE_2D;
273 } 274 }
274 } 275 }
275 276
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 DCHECK_CURRENTLY_ON(BrowserThread::IO); 554 DCHECK_CURRENTLY_ON(BrowserThread::IO);
554 555
555 CreateGpuMemoryBufferCallbackMap::iterator iter = 556 CreateGpuMemoryBufferCallbackMap::iterator iter =
556 create_gpu_memory_buffer_requests_.find(request_id); 557 create_gpu_memory_buffer_requests_.find(request_id);
557 DCHECK(iter != create_gpu_memory_buffer_requests_.end()); 558 DCHECK(iter != create_gpu_memory_buffer_requests_.end());
558 iter->second.Run(handle); 559 iter->second.Run(handle);
559 create_gpu_memory_buffer_requests_.erase(iter); 560 create_gpu_memory_buffer_requests_.erase(iter);
560 } 561 }
561 562
562 } // namespace content 563 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698