// // Copyright 2014 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //
class ScratchBuffer final : NonCopyable
{ public: // If we request a scratch buffer requesting a smaller size this many times, release and // recreate the scratch buffer. This ensures we don't have a degenerate case where we are stuck // hogging memory.
ScratchBuffer();
ScratchBuffer(uint32_t lifetime);
~ScratchBuffer();
// Returns true with a memory buffer of the requested size, or false on failure. bool get(size_t requestedSize, MemoryBuffer **memoryBufferOut);
// Same as get, but ensures new values are initialized to a fixed constant. bool getInitialized(size_t requestedSize, MemoryBuffer **memoryBufferOut, uint8_t initValue);
// Ticks the release counter for the scratch buffer. Also done implicitly in get(). void tick();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.