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

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

Issue 6282007: First pass at making the proxy handle multiple renderers. This associates the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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/shared_impl/image_data_impl.h ('k') | ppapi/tests/test_var_deprecated.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
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/image_data_impl.h"
6
7 #include "skia/config/SkUserConfig.h"
8
9 namespace pp {
10 namespace shared_impl {
11
12 // static
13 PP_ImageDataFormat ImageDataImpl::GetNativeImageDataFormat() {
14 if (SK_B32_SHIFT == 0)
15 return PP_IMAGEDATAFORMAT_BGRA_PREMUL;
16 else if (SK_R32_SHIFT == 0)
17 return PP_IMAGEDATAFORMAT_RGBA_PREMUL;
18 else
19 return PP_IMAGEDATAFORMAT_BGRA_PREMUL; // Default to something on failure.
20 }
21
22 // static
23 bool ImageDataImpl::IsImageDataFormatSupported(PP_ImageDataFormat format) {
24 return format == PP_IMAGEDATAFORMAT_BGRA_PREMUL ||
25 format == PP_IMAGEDATAFORMAT_RGBA_PREMUL;
26 }
27
28 } // namespace shared_impl
29 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/shared_impl/image_data_impl.h ('k') | ppapi/tests/test_var_deprecated.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698