Title: [129332] trunk/Source/WebCore
Revision
129332
Author
[email protected]
Date
2012-09-24 01:34:10 -0700 (Mon, 24 Sep 2012)

Log Message

[chromium] Remove BitLockerSkia. It's apparently not used.
https://bugs.webkit.org/show_bug.cgi?id=97434

Reviewed by Kent Tamura.

* platform/graphics/skia/BitLockerSkia.cpp: Removed.
* platform/graphics/skia/BitLockerSkia.h: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (129331 => 129332)


--- trunk/Source/WebCore/ChangeLog	2012-09-24 07:47:02 UTC (rev 129331)
+++ trunk/Source/WebCore/ChangeLog	2012-09-24 08:34:10 UTC (rev 129332)
@@ -1,3 +1,13 @@
+2012-09-24  Nico Weber  <[email protected]>
+
+        [chromium] Remove BitLockerSkia. It's apparently not used.
+        https://bugs.webkit.org/show_bug.cgi?id=97434
+
+        Reviewed by Kent Tamura.
+
+        * platform/graphics/skia/BitLockerSkia.cpp: Removed.
+        * platform/graphics/skia/BitLockerSkia.h: Removed.
+
 2012-09-24  Matt Falkenhagen  <[email protected]>
 
         Skeleton implementation of dialog.showModal()

Deleted: trunk/Source/WebCore/platform/graphics/skia/BitLockerSkia.cpp (129331 => 129332)


--- trunk/Source/WebCore/platform/graphics/skia/BitLockerSkia.cpp	2012-09-24 07:47:02 UTC (rev 129331)
+++ trunk/Source/WebCore/platform/graphics/skia/BitLockerSkia.cpp	2012-09-24 08:34:10 UTC (rev 129332)
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- 
-#include "config.h"
-#include "BitLockerSkia.h"
-
-#include "IntRect.h"
-
-#include "SkCanvas.h"
-#include "SkDevice.h"
-#include "SkRegion.h"
-
-#include <CoreGraphics/CoreGraphics.h>
-
-namespace WebCore {
-
-static CGAffineTransform SkMatrixToCGAffineTransform(const SkMatrix& matrix)
-{
-    // CGAffineTransforms don't support perspective transforms, so make sure
-    // we don't get those.
-    ASSERT(!matrix[SkMatrix::kMPersp0]);
-    ASSERT(!matrix[SkMatrix::kMPersp1]);
-    ASSERT(matrix[SkMatrix::kMPersp2] == 1.0f);
-
-    return CGAffineTransformMake(
-        matrix[SkMatrix::kMScaleX],
-        matrix[SkMatrix::kMSkewY],
-        matrix[SkMatrix::kMSkewX],
-        matrix[SkMatrix::kMScaleY],
-        matrix[SkMatrix::kMTransX],
-        matrix[SkMatrix::kMTransY]);
-}
-
-BitLockerSkia::BitLockerSkia(SkCanvas* canvas)
-    : m_canvas(canvas)
-    , m_cgContext(0)
-{
-}
-
-BitLockerSkia::~BitLockerSkia()
-{
-    releaseIfNeeded();
-}
-
-void BitLockerSkia::releaseIfNeeded()
-{
-    if (!m_cgContext)
-        return;
-    m_canvas->getDevice()->accessBitmap(true).unlockPixels();
-    CGContextRelease(m_cgContext);
-    m_cgContext = 0;
-}
-
-CGContextRef BitLockerSkia::cgContext()
-{
-    SkDevice* device = m_canvas->getDevice();
-    ASSERT(device);
-    if (!device)
-        return 0;
-    releaseIfNeeded();
-    const SkBitmap& bitmap = device->accessBitmap(true);
-    bitmap.lockPixels();
-    void* pixels = bitmap.getPixels();
-    m_cgContext = CGBitmapContextCreate(pixels, device->width(),
-        device->height(), 8, bitmap.rowBytes(), CGColorSpaceCreateDeviceRGB(), 
-        kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedFirst);
-
-    // Apply device matrix.
-    CGAffineTransform contentsTransform = CGAffineTransformMakeScale(1, -1);
-    contentsTransform = CGAffineTransformTranslate(contentsTransform, 0, -device->height());
-    CGContextConcatCTM(m_cgContext, contentsTransform);
-
-    // Apply clip in device coordinates.
-    CGMutablePathRef clipPath = CGPathCreateMutable();
-    SkRegion::Iterator iter(m_canvas->getTotalClip());
-    for (; !iter.done(); iter.next()) {
-        IntRect rect = iter.rect();
-        CGPathAddRect(clipPath, 0, rect);
-    }
-    CGContextAddPath(m_cgContext, clipPath);
-    CGContextClip(m_cgContext);
-    CGPathRelease(clipPath);
-
-    // Apply content matrix.
-    const SkMatrix& skMatrix = m_canvas->getTotalMatrix();
-    CGAffineTransform affine = SkMatrixToCGAffineTransform(skMatrix);
-    CGContextConcatCTM(m_cgContext, affine);
-
-    return m_cgContext;
-}
-
-}

Deleted: trunk/Source/WebCore/platform/graphics/skia/BitLockerSkia.h (129331 => 129332)


--- trunk/Source/WebCore/platform/graphics/skia/BitLockerSkia.h	2012-09-24 07:47:02 UTC (rev 129331)
+++ trunk/Source/WebCore/platform/graphics/skia/BitLockerSkia.h	2012-09-24 08:34:10 UTC (rev 129332)
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2011 Google Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef BitLockerSkia_h
-#define BitLockerSkia_h
-
-typedef struct CGContext* CGContextRef;
-
-class SkCanvas;
-
-namespace WebCore {
-
-// Converts a SkCanvas temporarily to a CGContext
-class BitLockerSkia {
-public:
-    explicit BitLockerSkia(SkCanvas*);
-    ~BitLockerSkia();
-    CGContextRef cgContext();
-
-private:
-    void releaseIfNeeded();
-    SkCanvas* m_canvas;
-    CGContextRef m_cgContext;
-};
-
-}
-#endif // BitLockerSkia_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to