summaryrefslogtreecommitdiffstats
path: root/skia/ext/platform_device_linux.cc
blob: 675d19f2c0652111d6e8f02287059e74a36630b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2006-2008 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_device.h"

namespace skia {

PlatformDevice::PlatformDevice(const SkBitmap& bitmap)
    : SkDevice(NULL, bitmap, /*isForLayer=*/false) {
  SetPlatformDevice(this, this);
}

bool PlatformDevice::IsNativeFontRenderingAllowed() {
  return true;
}

void PlatformDevice::EndPlatformPaint() {
  // We don't need to do anything on Linux here.
}

void PlatformDevice::DrawToNativeContext(PlatformSurface surface, int x, int y,
                                         const PlatformRect* src_rect) {
  // Should never be called on Linux.
  SkASSERT(false);
}

}  // namespace skia