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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/shared_impl/ppb_image_data_shared.cc
===================================================================
--- ppapi/shared_impl/ppb_image_data_shared.cc (revision 150367)
+++ ppapi/shared_impl/ppb_image_data_shared.cc (working copy)
@@ -1,21 +1,32 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ppapi/shared_impl/ppb_image_data_shared.h"
+#include "build/build_config.h"
+
+#if !defined(OS_NACL)
#include "third_party/skia/include/core/SkTypes.h"
+#endif
namespace ppapi {
// static
PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
+#if !defined(OS_NACL)
if (SK_B32_SHIFT == 0)
return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
else if (SK_R32_SHIFT == 0)
return PP_IMAGEDATAFORMAT_RGBA_PREMUL;
else
return PP_IMAGEDATAFORMAT_BGRA_PREMUL; // Default to something on failure.
+#else
+ // In NaCl, just default to something. If we're wrong, it will be converted
+ // later.
+ // TODO(dmichael): Really proxy this.
+ return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
+#endif
}
// static

Powered by Google App Engine
This is Rietveld 408576698