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

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

Issue 1222243002: remove call to didModifyBackingTexture (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | Source/platform/graphics/ImageBufferSurface.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 /* 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return false; 231 return false;
232 WebGraphicsContext3D* context3D = provider->context3d(); 232 WebGraphicsContext3D* context3D = provider->context3d();
233 if (!context3D) 233 if (!context3D)
234 return false; 234 return false;
235 Platform3DObject textureId = m_surface->getBackingTextureHandleForOverwrite( ); 235 Platform3DObject textureId = m_surface->getBackingTextureHandleForOverwrite( );
236 if (!textureId) 236 if (!textureId)
237 return false; 237 return false;
238 238
239 context3D->flush(); 239 context3D->flush();
240 240
241 bool result = drawingBuffer->copyToPlatformTexture(context3D, textureId, GL_ RGBA, 241 return drawingBuffer->copyToPlatformTexture(context3D, textureId, GL_RGBA,
242 GL_UNSIGNED_BYTE, 0, true, false, sourceBuffer); 242 GL_UNSIGNED_BYTE, 0, true, false, sourceBuffer);
243
244 if (result) {
245 m_surface->didModifyBackingTexture();
246 }
247
248 return result;
249 } 243 }
250 244
251 void ImageBuffer::draw(GraphicsContext* context, const FloatRect& destRect, cons t FloatRect* srcPtr, SkXfermode::Mode op) 245 void ImageBuffer::draw(GraphicsContext* context, const FloatRect& destRect, cons t FloatRect* srcPtr, SkXfermode::Mode op)
252 { 246 {
253 if (!isSurfaceValid()) 247 if (!isSurfaceValid())
254 return; 248 return;
255 249
256 FloatRect srcRect = srcPtr ? *srcPtr : FloatRect(FloatPoint(), size()); 250 FloatRect srcRect = srcPtr ? *srcPtr : FloatRect(FloatPoint(), size());
257 m_surface->draw(context, destRect, srcRect, op); 251 m_surface->draw(context, destRect, srcRect, op);
258 } 252 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType)); 368 ASSERT(MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType));
375 369
376 Vector<char> encodedImage; 370 Vector<char> encodedImage;
377 if (!encodeImage(*this, mimeType, quality, &encodedImage)) 371 if (!encodeImage(*this, mimeType, quality, &encodedImage))
378 return "data:,"; 372 return "data:,";
379 373
380 return "data:" + mimeType + ";base64," + base64Encode(encodedImage); 374 return "data:" + mimeType + ";base64," + base64Encode(encodedImage);
381 } 375 }
382 376
383 } // namespace blink 377 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/graphics/ImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698