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

Side by Side Diff: ppapi/shared_impl/ppb_image_data_shared.cc

Issue 10837145: Add gpu targets to untrusted build, and add Graphics3D code to untrusted build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/thunk/interfaces_ppb_public_dev.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) 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 "build/build_config.h"
brettw 2012/08/07 20:02:53 This should go below (The .h always comes first wi
bbudge 2012/08/07 20:07:57 Done.
5 #include "ppapi/shared_impl/ppb_image_data_shared.h" 6 #include "ppapi/shared_impl/ppb_image_data_shared.h"
6 7
8 #if !defined(OS_NACL)
7 #include "third_party/skia/include/core/SkTypes.h" 9 #include "third_party/skia/include/core/SkTypes.h"
10 #endif
8 11
9 namespace ppapi { 12 namespace ppapi {
10 13
11 // static 14 // static
12 PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() { 15 PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
16 #if !defined(OS_NACL)
13 if (SK_B32_SHIFT == 0) 17 if (SK_B32_SHIFT == 0)
14 return PP_IMAGEDATAFORMAT_BGRA_PREMUL; 18 return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
15 else if (SK_R32_SHIFT == 0) 19 else if (SK_R32_SHIFT == 0)
16 return PP_IMAGEDATAFORMAT_RGBA_PREMUL; 20 return PP_IMAGEDATAFORMAT_RGBA_PREMUL;
17 else 21 else
18 return PP_IMAGEDATAFORMAT_BGRA_PREMUL; // Default to something on failure. 22 return PP_IMAGEDATAFORMAT_BGRA_PREMUL; // Default to something on failure.
23 #else
24 // In NaCl, just default to something. If we're wrong, it will be converted
25 // later.
26 // TODO(dmichael): Really proxy this.
27 return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
28 #endif
19 } 29 }
20 30
21 // static 31 // static
22 bool PPB_ImageData_Shared::IsImageDataFormatSupported( 32 bool PPB_ImageData_Shared::IsImageDataFormatSupported(
23 PP_ImageDataFormat format) { 33 PP_ImageDataFormat format) {
24 return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL || 34 return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL ||
25 format == PP_IMAGEDATAFORMAT_RGBA_PREMUL; 35 format == PP_IMAGEDATAFORMAT_RGBA_PREMUL;
26 } 36 }
27 37
28 } // namespace ppapi 38 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/thunk/interfaces_ppb_public_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698