aboutsummaryrefslogtreecommitdiffstats
path: root/include/pdf/SkPDFGraphicState.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pdf/SkPDFGraphicState.h')
-rw-r--r--include/pdf/SkPDFGraphicState.h33
1 files changed, 14 insertions, 19 deletions
diff --git a/include/pdf/SkPDFGraphicState.h b/include/pdf/SkPDFGraphicState.h
index 49809a4..9420405 100644
--- a/include/pdf/SkPDFGraphicState.h
+++ b/include/pdf/SkPDFGraphicState.h
@@ -1,19 +1,12 @@
+
/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Copyright 2010 The Android Open Source Project
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
*/
+
#ifndef SkPDFGraphicState_DEFINED
#define SkPDFGraphicState_DEFINED
@@ -52,7 +45,7 @@ public:
* other references.
* @param paint The SkPaint to emulate.
*/
- static SkPDFGraphicState* getGraphicStateForPaint(const SkPaint& paint);
+ static SkPDFGraphicState* GetGraphicStateForPaint(const SkPaint& paint);
/** Make a graphic state that only sets the passed soft mask. The
* reference count of the object is incremented and it is the caller's
@@ -60,7 +53,7 @@ public:
* @param sMask The form xobject to use as a soft mask.
* @param invert Indicates if the alpha of the sMask should be inverted.
*/
- static SkPDFGraphicState* getSMaskGraphicState(SkPDFFormXObject* sMask,
+ static SkPDFGraphicState* GetSMaskGraphicState(SkPDFFormXObject* sMask,
bool invert);
/** Get a graphic state that only unsets the soft mask. The reference
@@ -69,7 +62,7 @@ public:
* reference pattern used when the returned object is new and has no
* other references.
*/
- static SkPDFGraphicState* getNoSMaskGraphicState();
+ static SkPDFGraphicState* GetNoSMaskGraphicState();
private:
const SkPaint fPaint;
@@ -86,12 +79,14 @@ private:
explicit GSCanonicalEntry(SkPDFGraphicState* gs)
: fGraphicState(gs),
fPaint(&gs->fPaint) {}
- explicit GSCanonicalEntry(const SkPaint* paint) : fPaint(paint) {}
+ explicit GSCanonicalEntry(const SkPaint* paint)
+ : fGraphicState(NULL),
+ fPaint(paint) {}
};
// This should be made a hash table if performance is a problem.
- static SkTDArray<GSCanonicalEntry>& canonicalPaints();
- static SkMutex& canonicalPaintsMutex();
+ static SkTDArray<GSCanonicalEntry>& CanonicalPaints();
+ static SkMutex& CanonicalPaintsMutex();
SkPDFGraphicState();
explicit SkPDFGraphicState(const SkPaint& paint);
@@ -100,7 +95,7 @@ private:
static SkPDFObject* GetInvertFunction();
- static int find(const SkPaint& paint);
+ static int Find(const SkPaint& paint);
};
#endif