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

Side by Side Diff: Source/platform/graphics/ImageBuffer.cpp

Issue 1152733008: remove |level| in copyVideoTextureToPlatformTexture(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add TODO Created 5 years, 6 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) 2008, Google Inc. All rights reserved. 2 * Copyright (c) 2008, Google Inc. All rights reserved.
3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> 3 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 WebLayer* ImageBuffer::platformLayer() const 182 WebLayer* ImageBuffer::platformLayer() const
183 { 183 {
184 return m_surface->layer(); 184 return m_surface->layer();
185 } 185 }
186 186
187 bool ImageBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platform3 DObject texture, GLenum internalFormat, GLenum destType, GLint level, bool premu ltiplyAlpha, bool flipY) 187 bool ImageBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platform3 DObject texture, GLenum internalFormat, GLenum destType, GLint level, bool premu ltiplyAlpha, bool flipY)
188 { 188 {
189 if (!m_surface->isAccelerated() || !getBackingTexture() || !isSurfaceValid() ) 189 if (!m_surface->isAccelerated() || !getBackingTexture() || !isSurfaceValid() )
190 return false; 190 return false;
191 191
192 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(internalFormat, destType, l evel)) 192 if (!Extensions3DUtil::canUseCopyTextureCHROMIUM(GL_TEXTURE_2D, internalForm at, destType, level))
193 return false; 193 return false;
194 194
195 OwnPtr<WebGraphicsContext3DProvider> provider = adoptPtr(Platform::current() ->createSharedOffscreenGraphicsContext3DProvider()); 195 OwnPtr<WebGraphicsContext3DProvider> provider = adoptPtr(Platform::current() ->createSharedOffscreenGraphicsContext3DProvider());
196 if (!provider) 196 if (!provider)
197 return false; 197 return false;
198 WebGraphicsContext3D* sharedContext = provider->context3d(); 198 WebGraphicsContext3D* sharedContext = provider->context3d();
199 if (!sharedContext) 199 if (!sharedContext)
200 return false; 200 return false;
201 201
202 OwnPtr<WebExternalTextureMailbox> mailbox = adoptPtr(new WebExternalTextureM ailbox); 202 OwnPtr<WebExternalTextureMailbox> mailbox = adoptPtr(new WebExternalTextureM ailbox);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); 396 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
397 397
398 Vector<char> encodedImage; 398 Vector<char> encodedImage;
399 if (!encodeImage(*this, mimeType, quality, &encodedImage)) 399 if (!encodeImage(*this, mimeType, quality, &encodedImage))
400 return "data:,"; 400 return "data:,";
401 401
402 return "data:" + mimeType + ";base64," + base64Encode(encodedImage); 402 return "data:" + mimeType + ";base64," + base64Encode(encodedImage);
403 } 403 }
404 404
405 } // namespace blink 405 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.cpp ('k') | Source/platform/graphics/gpu/DrawingBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698