Flutter Engine
The Flutter Engine
Macros | Functions
GrBufferAllocPool.cpp File Reference
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/GrTypes.h"
#include "include/private/base/SkMacros.h"
#include "src/base/SkSafeMath.h"
#include "src/core/SkTraceEvent.h"
#include "src/gpu/ganesh/GrBufferAllocPool.h"
#include <memory>
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrCpuBuffer.h"
#include "src/gpu/ganesh/GrDirectContextPriv.h"
#include "src/gpu/ganesh/GrGpu.h"
#include "src/gpu/ganesh/GrGpuBuffer.h"
#include "src/gpu/ganesh/GrResourceProvider.h"

Go to the source code of this file.

Macros

#define UNMAP_BUFFER(block)
 

Functions

static void VALIDATE (bool=false)
 
static size_t align_up_pad (size_t x, size_t alignment)
 
static size_t align_down (size_t x, uint32_t alignment)
 

Macro Definition Documentation

◆ UNMAP_BUFFER

#define UNMAP_BUFFER (   block)
Value:
do { \
TRACE_EVENT_INSTANT1("skia.gpu", "GrBufferAllocPool Unmapping Buffer", \
TRACE_EVENT_SCOPE_THREAD, "percent_unwritten", \
(float)((block).fBytesFree) / (block).fBuffer->size()); \
SkASSERT(!block.fBuffer->isCpuBuffer()); \
static_cast<GrGpuBuffer*>(block.fBuffer.get())->unmap(); \
} while (false)
#define TRACE_EVENT_SCOPE_THREAD

Definition at line 79 of file GrBufferAllocPool.cpp.

Function Documentation

◆ align_down()

static size_t align_down ( size_t  x,
uint32_t  alignment 
)
inlinestatic

Definition at line 185 of file GrBufferAllocPool.cpp.

185 {
186 return (x / alignment) * alignment;
187}
double x

◆ align_up_pad()

static size_t align_up_pad ( size_t  x,
size_t  alignment 
)
inlinestatic

Definition at line 181 of file GrBufferAllocPool.cpp.

181 {
182 return (alignment - x % alignment) % alignment;
183}

◆ VALIDATE()

static void VALIDATE ( bool  = false)
static

Definition at line 76 of file GrBufferAllocPool.cpp.

76{}