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

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

Issue 10830197: Revert 150343 - 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) 2012 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 "build/build_config.h"
6 #include "ppapi/shared_impl/ppb_image_data_shared.h" 5 #include "ppapi/shared_impl/ppb_image_data_shared.h"
7 6
8 #if !defined(OS_NACL)
9 #include "third_party/skia/include/core/SkTypes.h" 7 #include "third_party/skia/include/core/SkTypes.h"
10 #endif
11 8
12 namespace ppapi { 9 namespace ppapi {
13 10
14 // static 11 // static
15 PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() { 12 PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
16 #if !defined(OS_NACL)
17 if (SK_B32_SHIFT == 0) 13 if (SK_B32_SHIFT == 0)
18 return PP_IMAGEDATAFORMAT_BGRA_PREMUL; 14 return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
19 else if (SK_R32_SHIFT == 0) 15 else if (SK_R32_SHIFT == 0)
20 return PP_IMAGEDATAFORMAT_RGBA_PREMUL; 16 return PP_IMAGEDATAFORMAT_RGBA_PREMUL;
21 else 17 else
22 return PP_IMAGEDATAFORMAT_BGRA_PREMUL; // Default to something on failure. 18 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
29 } 19 }
30 20
31 // static 21 // static
32 bool PPB_ImageData_Shared::IsImageDataFormatSupported( 22 bool PPB_ImageData_Shared::IsImageDataFormatSupported(
33 PP_ImageDataFormat format) { 23 PP_ImageDataFormat format) {
34 return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL || 24 return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL ||
35 format == PP_IMAGEDATAFORMAT_RGBA_PREMUL; 25 format == PP_IMAGEDATAFORMAT_RGBA_PREMUL;
36 } 26 }
37 27
38 } // namespace ppapi 28 } // 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