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

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: scoping Y8 out. 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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 SourceDrawingBuffer sourceBuffer) { 683 SourceDrawingBuffer sourceBuffer) {
684 if (m_contentsChanged) { 684 if (m_contentsChanged) {
685 if (m_antiAliasingMode != None) { 685 if (m_antiAliasingMode != None) {
686 commit(); 686 commit();
687 restoreFramebufferBindings(); 687 restoreFramebufferBindings();
688 } 688 }
689 m_gl->Flush(); 689 m_gl->Flush();
690 } 690 }
691 691
692 // Assume that the destination target is GL_TEXTURE_2D. 692 // Assume that the destination target is GL_TEXTURE_2D.
693 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM( 693 if (!m_extensionsUtil->canUseCopyTextureCHROMIUM(
694 GL_TEXTURE_2D, internalFormat, destType, level)) 694 GL_TEXTURE_2D, internalFormat, destType, level))
695 return false; 695 return false;
696 696
697 // Contexts may be in a different share group. We must transfer the texture th rough a mailbox first 697 // Contexts may be in a different share group. We must transfer the texture th rough a mailbox first
698 GLint textureId = 0; 698 GLint textureId = 0;
699 GLenum target = 0; 699 GLenum target = 0;
700 gpu::Mailbox mailbox; 700 gpu::Mailbox mailbox;
701 gpu::SyncToken produceSyncToken; 701 gpu::SyncToken produceSyncToken;
702 if (sourceBuffer == FrontBuffer && m_frontColorBuffer.texInfo.textureId) { 702 if (sourceBuffer == FrontBuffer && m_frontColorBuffer.texInfo.textureId) {
703 textureId = m_frontColorBuffer.texInfo.textureId; 703 textureId = m_frontColorBuffer.texInfo.textureId;
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE. 1319 // the public interface for WebGL does not support GL_TEXTURE_RECTANGLE.
1320 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding); 1320 m_gl->BindTexture(GL_TEXTURE_2D, m_texture2DBinding);
1321 } 1321 }
1322 1322
1323 bool DrawingBuffer::shouldUseChromiumImage() { 1323 bool DrawingBuffer::shouldUseChromiumImage() {
1324 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1324 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1325 m_chromiumImageUsage == AllowChromiumImage; 1325 m_chromiumImageUsage == AllowChromiumImage;
1326 } 1326 }
1327 1327
1328 } // namespace blink 1328 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698