OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "skia/ext/vector_platform_device_emf_win.h" | 5 #include "skia/ext/vector_platform_device_emf_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 void VectorPlatformDeviceEmf::setMatrixClip(const SkMatrix& transform, | 677 void VectorPlatformDeviceEmf::setMatrixClip(const SkMatrix& transform, |
678 const SkRegion& region, | 678 const SkRegion& region, |
679 const SkClipStack&) { | 679 const SkClipStack&) { |
680 transform_ = transform; | 680 transform_ = transform; |
681 LoadTransformToDC(hdc_, transform_); | 681 LoadTransformToDC(hdc_, transform_); |
682 clip_region_ = region; | 682 clip_region_ = region; |
683 if (!clip_region_.isEmpty()) | 683 if (!clip_region_.isEmpty()) |
684 LoadClipRegion(); | 684 LoadClipRegion(); |
685 } | 685 } |
686 | 686 |
687 void VectorPlatformDeviceEmf::DrawToNativeContext(HDC dc, int x, int y, | |
688 const RECT* src_rect) { | |
689 SkASSERT(false); | |
690 } | |
691 | |
692 void VectorPlatformDeviceEmf::LoadClipRegion() { | 687 void VectorPlatformDeviceEmf::LoadClipRegion() { |
693 SkMatrix t; | 688 SkMatrix t; |
694 t.reset(); | 689 t.reset(); |
695 LoadClippingRegionToDC(hdc_, clip_region_, t); | 690 LoadClippingRegionToDC(hdc_, clip_region_, t); |
696 } | 691 } |
697 | 692 |
698 SkBaseDevice* VectorPlatformDeviceEmf::onCreateCompatibleDevice( | 693 SkBaseDevice* VectorPlatformDeviceEmf::onCreateCompatibleDevice( |
699 const CreateInfo& info) { | 694 const CreateInfo& info) { |
700 SkASSERT(info.fInfo.colorType() == kN32_SkColorType); | 695 SkASSERT(info.fInfo.colorType() == kN32_SkColorType); |
701 return VectorPlatformDeviceEmf::CreateDevice( | 696 return VectorPlatformDeviceEmf::CreateDevice( |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 pixels, | 974 pixels, |
980 reinterpret_cast<const BITMAPINFO*>(&hdr), | 975 reinterpret_cast<const BITMAPINFO*>(&hdr), |
981 DIB_RGB_COLORS, | 976 DIB_RGB_COLORS, |
982 SRCCOPY); | 977 SRCCOPY); |
983 } | 978 } |
984 EndPlatformPaint(); | 979 EndPlatformPaint(); |
985 Cleanup(); | 980 Cleanup(); |
986 } | 981 } |
987 | 982 |
988 } // namespace skia | 983 } // namespace skia |
OLD | NEW |