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

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

Issue 8824015: Revert 113290 - Rename the shared_impl resource files to give them more regular names. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/shared_impl/ppb_image_data_shared.h ('k') | ppapi/shared_impl/ppb_input_event_shared.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ppapi/shared_impl/ppb_image_data_shared.h"
6
7 #include "third_party/skia/include/core/SkTypes.h"
8
9 namespace ppapi {
10
11 // static
12 PP_ImageDataFormat PPB_ImageData_Shared::GetNativeImageDataFormat() {
13 if (SK_B32_SHIFT == 0)
14 return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
15 else if (SK_R32_SHIFT == 0)
16 return PP_IMAGEDATAFORMAT_RGBA_PREMUL;
17 else
18 return PP_IMAGEDATAFORMAT_BGRA_PREMUL; // Default to something on failure.
19 }
20
21 // static
22 bool PPB_ImageData_Shared::IsImageDataFormatSupported(
23 PP_ImageDataFormat format) {
24 return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL ||
25 format == PP_IMAGEDATAFORMAT_RGBA_PREMUL;
26 }
27
28 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_image_data_shared.h ('k') | ppapi/shared_impl/ppb_input_event_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698