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

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

Issue 7754001: Revert 98230 - CL removing inheritance of SkDevice from PlatformDevice. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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/bitmap_platform_device_mac.h ('k') | skia/ext/bitmap_platform_device_win.h » ('j') | 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/bitmap_platform_device_mac.h" 5 #include "skia/ext/bitmap_platform_device_mac.h"
6 6
7 #import <ApplicationServices/ApplicationServices.h> 7 #import <ApplicationServices/ApplicationServices.h>
8 #include <time.h> 8 #include <time.h>
9 9
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (context) 173 if (context)
174 CGContextRelease(context); 174 CGContextRelease(context);
175 175
176 return rv; 176 return rv;
177 } 177 }
178 178
179 // The device will own the bitmap, which corresponds to also owning the pixel 179 // The device will own the bitmap, which corresponds to also owning the pixel
180 // data. Therefore, we do not transfer ownership to the SkDevice's bitmap. 180 // data. Therefore, we do not transfer ownership to the SkDevice's bitmap.
181 BitmapPlatformDevice::BitmapPlatformDevice( 181 BitmapPlatformDevice::BitmapPlatformDevice(
182 BitmapPlatformDeviceData* data, const SkBitmap& bitmap) 182 BitmapPlatformDeviceData* data, const SkBitmap& bitmap)
183 : SkDevice(bitmap), 183 : PlatformDevice(bitmap),
184 data_(data) { 184 data_(data) {
185 SetPlatformDevice(this, this);
186 } 185 }
187 186
188 BitmapPlatformDevice::~BitmapPlatformDevice() { 187 BitmapPlatformDevice::~BitmapPlatformDevice() {
189 data_->unref(); 188 data_->unref();
190 } 189 }
191 190
192 CGContextRef BitmapPlatformDevice::GetBitmapContext() { 191 CGContextRef BitmapPlatformDevice::GetBitmapContext() {
193 data_->LoadConfig(); 192 data_->LoadConfig();
194 return data_->bitmap_context(); 193 return data_->bitmap_context();
195 } 194 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 } 235 }
237 236
238 SkDevice* BitmapPlatformDevice::onCreateCompatibleDevice( 237 SkDevice* BitmapPlatformDevice::onCreateCompatibleDevice(
239 SkBitmap::Config config, int width, int height, bool isOpaque, 238 SkBitmap::Config config, int width, int height, bool isOpaque,
240 Usage /*usage*/) { 239 Usage /*usage*/) {
241 SkASSERT(config == SkBitmap::kARGB_8888_Config); 240 SkASSERT(config == SkBitmap::kARGB_8888_Config);
242 return BitmapPlatformDevice::Create(NULL, width, height, isOpaque); 241 return BitmapPlatformDevice::Create(NULL, width, height, isOpaque);
243 } 242 }
244 243
245 } // namespace skia 244 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.h ('k') | skia/ext/bitmap_platform_device_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698