aboutsummaryrefslogtreecommitdiffhomepage
path: root/gpu/src
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-20 15:47:04 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-04-20 15:47:04 +0000
commita55847ba22ae4a673af022e7d88404e080195464 (patch)
tree23f61eb208d288eab26089728436e1d2b6484836 /gpu/src
parent9dbdb4068f137343e8c7cbff9245544b24aa1776 (diff)
Fix alignment issues with stack allocated memory allocated as bytes but used to hold other types.
Review URL: http://codereview.appspot.com/4435060/ git-svn-id: http://skia.googlecode.com/svn/trunk@1162 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gpu/src')
-rw-r--r--gpu/src/GrClip.cpp10
-rw-r--r--gpu/src/GrInOrderDrawBuffer.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/gpu/src/GrClip.cpp b/gpu/src/GrClip.cpp
index e8da3d19d9..425ad27f07 100644
--- a/gpu/src/GrClip.cpp
+++ b/gpu/src/GrClip.cpp
@@ -18,29 +18,29 @@
#include "GrClip.h"
GrClip::GrClip()
- : fList(fListMemory, kPreAllocElements) {
+ : fList(&fListStorage) {
fConservativeBounds.setEmpty();
fConservativeBoundsValid = true;
}
GrClip::GrClip(const GrClip& src)
- : fList(fListMemory, kPreAllocElements) {
+ : fList(&fListStorage) {
*this = src;
}
GrClip::GrClip(const GrIRect& rect)
- : fList(fListMemory, kPreAllocElements) {
+ : fList(&fListStorage) {
this->setFromIRect(rect);
}
GrClip::GrClip(const GrRect& rect)
- : fList(fListMemory, kPreAllocElements) {
+ : fList(&fListStorage) {
this->setFromRect(rect);
}
GrClip::GrClip(GrClipIterator* iter, GrScalar tx, GrScalar ty,
const GrRect* bounds)
- : fList(fListMemory, kPreAllocElements) {
+ : fList(&fListStorage) {
this->setFromIterator(iter, tx, ty, bounds);
}
diff --git a/gpu/src/GrInOrderDrawBuffer.cpp b/gpu/src/GrInOrderDrawBuffer.cpp
index be4db9925e..eebae0067f 100644
--- a/gpu/src/GrInOrderDrawBuffer.cpp
+++ b/gpu/src/GrInOrderDrawBuffer.cpp
@@ -24,9 +24,9 @@
GrInOrderDrawBuffer::GrInOrderDrawBuffer(GrVertexBufferAllocPool* vertexPool,
GrIndexBufferAllocPool* indexPool) :
- fDraws(DRAWS_BLOCK_SIZE, fDrawsStorage),
- fStates(STATES_BLOCK_SIZE, fStatesStorage),
- fClips(CLIPS_BLOCK_SIZE, fClipsStorage),
+ fDraws(&fDrawStorage),
+ fStates(&fStateStorage),
+ fClips(&fClipStorage),
fClipSet(true),
fLastRectVertexLayout(0),