Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Unified Diff: skia/ext/platform_canvas.cc

Issue 2011713003: Roll skia to 8cc209111876b7c78b5ec577c9221d8ed5e21024 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.cc
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
deleted file mode 100644
index 92359671a1ac9515eae1b2a9324ace972cdb5264..0000000000000000000000000000000000000000
--- a/skia/ext/platform_canvas.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "skia/ext/platform_canvas.h"
-
-#include "skia/ext/bitmap_platform_device.h"
-#include "third_party/skia/include/core/SkTypes.h"
-
-namespace skia {
-
-SkBaseDevice* GetTopDevice(const SkCanvas& canvas) {
- return canvas.getTopDevice(true);
-}
-
-bool SupportsPlatformPaint(const SkCanvas* canvas) {
- PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas));
- return platform_device && platform_device->SupportsPlatformPaint();
-}
-
-PlatformSurface BeginPlatformPaint(SkCanvas* canvas) {
- PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas));
- if (platform_device)
- return platform_device->BeginPlatformPaint();
-
- return 0;
-}
-
-void EndPlatformPaint(SkCanvas* canvas) {
- PlatformDevice* platform_device = GetPlatformDevice(GetTopDevice(*canvas));
- if (platform_device)
- platform_device->EndPlatformPaint();
-}
-
-void MakeOpaque(SkCanvas* canvas, int x, int y, int width, int height) {
- if (width <= 0 || height <= 0)
- return;
-
- SkRect rect;
- rect.setXYWH(SkIntToScalar(x), SkIntToScalar(y),
- SkIntToScalar(width), SkIntToScalar(height));
- SkPaint paint;
- paint.setColor(SK_ColorBLACK);
- paint.setXfermodeMode(SkXfermode::kDstATop_Mode);
- canvas->drawRect(rect, paint);
-}
-
-size_t PlatformCanvasStrideForWidth(unsigned width) {
- return 4 * width;
-}
-
-SkCanvas* CreateCanvas(const skia::RefPtr<SkBaseDevice>& device, OnFailureType failureType) {
- if (!device) {
- if (CRASH_ON_FAILURE == failureType)
- SK_CRASH();
- return NULL;
- }
- return new SkCanvas(device.get());
-}
-
-PlatformBitmap::PlatformBitmap() : surface_(0), platform_extra_(0) {}
-
-} // namespace skia
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698