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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2121043002: 16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 SourceDrawingBuffer sourceBuffer) { 694 SourceDrawingBuffer sourceBuffer) {
695 if (m_contentsChanged) { 695 if (m_contentsChanged) {
696 if (m_antiAliasingMode != None) { 696 if (m_antiAliasingMode != None) {
697 commit(); 697 commit();
698 restoreFramebufferBindings(); 698 restoreFramebufferBindings();
699 } 699 }
700 m_gl->Flush(); 700 m_gl->Flush();
701 } 701 }
702 702
703 // Assume that the destination target is GL_TEXTURE_2D. 703 // Assume that the destination target is GL_TEXTURE_2D.
704 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM( 704 if (!m_extensionsUtil->canUseCopyTextureCHROMIUM(
705 GL_TEXTURE_2D, internalFormat, destType, level)) 705 GL_TEXTURE_2D, internalFormat, destType, level))
706 return false; 706 return false;
707 707
708 // Contexts may be in a different share group. We must transfer the texture 708 // Contexts may be in a different share group. We must transfer the texture
709 // through a mailbox first. 709 // through a mailbox first.
710 GLenum target = 0; 710 GLenum target = 0;
711 gpu::Mailbox mailbox; 711 gpu::Mailbox mailbox;
712 gpu::SyncToken produceSyncToken; 712 gpu::SyncToken produceSyncToken;
713 if (sourceBuffer == FrontBuffer && m_frontColorBuffer) { 713 if (sourceBuffer == FrontBuffer && m_frontColorBuffer) {
714 target = m_frontColorBuffer->parameters.target; 714 target = m_frontColorBuffer->parameters.target;
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1245 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1246 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1246 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1247 } 1247 }
1248 1248
1249 bool DrawingBuffer::shouldUseChromiumImage() { 1249 bool DrawingBuffer::shouldUseChromiumImage() {
1250 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1250 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1251 m_chromiumImageUsage == AllowChromiumImage; 1251 m_chromiumImageUsage == AllowChromiumImage;
1252 } 1252 }
1253 1253
1254 } // namespace blink 1254 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698