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

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

Issue 59133008: ozone: Support building without cairo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & fix whitespace Created 7 years, 1 month 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_skia.h ('k') | skia/ext/platform_device.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) 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/bitmap_platform_device_android.h" 5 #include "skia/ext/bitmap_platform_device_skia.h"
6 #include "skia/ext/platform_canvas.h" 6 #include "skia/ext/platform_canvas.h"
7 7
8 namespace skia { 8 namespace skia {
9 9
10 BitmapPlatformDevice* BitmapPlatformDevice::Create(int width, int height, 10 BitmapPlatformDevice* BitmapPlatformDevice::Create(int width, int height,
11 bool is_opaque) { 11 bool is_opaque) {
12 SkBitmap bitmap; 12 SkBitmap bitmap;
13 bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height, 0, 13 bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height, 0,
14 is_opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); 14 is_opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
15 if (bitmap.allocPixels()) { 15 if (bitmap.allocPixels()) {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 bitmap_.setConfig(SkBitmap::kARGB_8888_Config, width, height, 0, 90 bitmap_.setConfig(SkBitmap::kARGB_8888_Config, width, height, 0,
91 is_opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType); 91 is_opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
92 if (!bitmap_.allocPixels()) 92 if (!bitmap_.allocPixels())
93 return false; 93 return false;
94 94
95 surface_ = bitmap_.getPixels(); 95 surface_ = bitmap_.getPixels();
96 return true; 96 return true;
97 } 97 }
98 98
99 } // namespace skia 99 } // namespace skia
OLDNEW
« no previous file with comments | « skia/ext/bitmap_platform_device_skia.h ('k') | skia/ext/platform_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698