11fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com 21fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com/* 31fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com * Copyright 2012 Google Inc. 41fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com * 51fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com * Use of this source code is governed by a BSD-style license that can be 61fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com * found in the LICENSE file. 71fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com */ 81fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com 91fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com#include "GrClipMaskCache.h" 101fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com 111fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.comGrClipMaskCache::GrClipMaskCache() 121fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com : fContext(NULL) 131fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com , fStack(sizeof(GrClipStackFrame)) { 141fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com // We need an initial frame to capture the clip state prior to 151fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com // any pushes 161fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com SkNEW_PLACEMENT(fStack.push_back(), GrClipStackFrame); 171fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com} 181fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com 191fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.comvoid GrClipMaskCache::push() { 201fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com SkNEW_PLACEMENT(fStack.push_back(), GrClipStackFrame); 211fcc1b80994f7bfa60bbc74e924484da09b47e3brobertphillips@google.com} 22