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

Side by Side Diff: skia/ext/vector_platform_device_skia.cc

Issue 6976055: More POSIX support for Chromium, consisting mostly of broadening ifdefs. This (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « skia/ext/image_operations_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_skia.h" 5 #include "skia/ext/vector_platform_device_skia.h"
6 6
7 #include "skia/ext/bitmap_platform_device.h" 7 #include "skia/ext/bitmap_platform_device.h"
8 #include "third_party/skia/include/core/SkClipStack.h" 8 #include "third_party/skia/include/core/SkClipStack.h"
9 #include "third_party/skia/include/core/SkDraw.h" 9 #include "third_party/skia/include/core/SkDraw.h"
10 #include "third_party/skia/include/core/SkRect.h" 10 #include "third_party/skia/include/core/SkRect.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // provide a raster surface for plugins to render into - they don't have 49 // provide a raster surface for plugins to render into - they don't have
50 // a vector interface. Therefore we create a BitmapPlatformDevice here 50 // a vector interface. Therefore we create a BitmapPlatformDevice here
51 // and return the context from it, then layer on the raster data as an 51 // and return the context from it, then layer on the raster data as an
52 // image in EndPlatformPaint. 52 // image in EndPlatformPaint.
53 DCHECK(raster_surface_ == NULL); 53 DCHECK(raster_surface_ == NULL);
54 #if defined(OS_WIN) 54 #if defined(OS_WIN)
55 raster_surface_ = BitmapPlatformDevice::create(pdf_device_->width(), 55 raster_surface_ = BitmapPlatformDevice::create(pdf_device_->width(),
56 pdf_device_->height(), 56 pdf_device_->height(),
57 false, /* not opaque */ 57 false, /* not opaque */
58 NULL); 58 NULL);
59 #elif defined(OS_LINUX) 59 #elif defined(OS_POSIX)
60 raster_surface_ = BitmapPlatformDevice::Create(pdf_device_->width(), 60 raster_surface_ = BitmapPlatformDevice::Create(pdf_device_->width(),
61 pdf_device_->height(), 61 pdf_device_->height(),
62 false /* not opaque */); 62 false /* not opaque */);
63 #endif 63 #endif
64 raster_surface_->unref(); // SkRefPtr and create both took a reference. 64 raster_surface_->unref(); // SkRefPtr and create both took a reference.
65 65
66 SkCanvas canvas(raster_surface_.get()); 66 SkCanvas canvas(raster_surface_.get());
67 return raster_surface_->BeginPlatformPaint(); 67 return raster_surface_->BeginPlatformPaint();
68 } 68 }
69 69
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 const RECT* src_rect) { 211 const RECT* src_rect) {
212 SkASSERT(false); 212 SkASSERT(false);
213 } 213 }
214 #endif 214 #endif
215 215
216 SkDeviceFactory* VectorPlatformDeviceSkia::onNewDeviceFactory() { 216 SkDeviceFactory* VectorPlatformDeviceSkia::onNewDeviceFactory() {
217 return SkNEW(VectorPlatformDeviceSkiaFactory); 217 return SkNEW(VectorPlatformDeviceSkiaFactory);
218 } 218 }
219 219
220 } // namespace skia 220 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/image_operations_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698