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

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

Issue 2615813003: Migrate WTF::Vector::append() to ::push_back() [part 14 of N] (Closed)
Patch Set: rebase, small fix in FontSettings.h Created 3 years, 11 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 void DrawingBuffer::mailboxReleasedSoftware( 432 void DrawingBuffer::mailboxReleasedSoftware(
433 std::unique_ptr<cc::SharedBitmap> bitmap, 433 std::unique_ptr<cc::SharedBitmap> bitmap,
434 const IntSize& size, 434 const IntSize& size,
435 const gpu::SyncToken& syncToken, 435 const gpu::SyncToken& syncToken,
436 bool lostResource) { 436 bool lostResource) {
437 DCHECK(!syncToken.HasData()); // No sync tokens for software resources. 437 DCHECK(!syncToken.HasData()); // No sync tokens for software resources.
438 if (m_destructionInProgress || lostResource || m_isHidden || size != m_size) 438 if (m_destructionInProgress || lostResource || m_isHidden || size != m_size)
439 return; // Just delete the bitmap. 439 return; // Just delete the bitmap.
440 440
441 RecycledBitmap recycled = {std::move(bitmap), m_size}; 441 RecycledBitmap recycled = {std::move(bitmap), m_size};
442 m_recycledBitmaps.append(std::move(recycled)); 442 m_recycledBitmaps.push_back(std::move(recycled));
443 } 443 }
444 444
445 PassRefPtr<StaticBitmapImage> DrawingBuffer::transferToStaticBitmapImage() { 445 PassRefPtr<StaticBitmapImage> DrawingBuffer::transferToStaticBitmapImage() {
446 ScopedStateRestorer scopedStateRestorer(this); 446 ScopedStateRestorer scopedStateRestorer(this);
447 447
448 // This can be null if the context is lost before the first call to 448 // This can be null if the context is lost before the first call to
449 // grContext(). 449 // grContext().
450 GrContext* grContext = contextProvider()->grContext(); 450 GrContext* grContext = contextProvider()->grContext();
451 451
452 cc::TextureMailbox textureMailbox; 452 cc::TextureMailbox textureMailbox;
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 if (m_pixelUnpackBufferBindingDirty) 1266 if (m_pixelUnpackBufferBindingDirty)
1267 client->DrawingBufferClientRestorePixelUnpackBufferBinding(); 1267 client->DrawingBufferClientRestorePixelUnpackBufferBinding();
1268 } 1268 }
1269 1269
1270 bool DrawingBuffer::shouldUseChromiumImage() { 1270 bool DrawingBuffer::shouldUseChromiumImage() {
1271 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() && 1271 return RuntimeEnabledFeatures::webGLImageChromiumEnabled() &&
1272 m_chromiumImageUsage == AllowChromiumImage; 1272 m_chromiumImageUsage == AllowChromiumImage;
1273 } 1273 }
1274 1274
1275 } // namespace blink 1275 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698