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

Unified Diff: native_client_sdk/src/libraries/ppapi_simple/ps_context_2d.cc

Issue 23072027: Merge 217400 "Change ppapi_simple to support pixel format select..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1599/src/
Patch Set: Created 7 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
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_simple/ps_context_2d.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/ppapi_simple/ps_context_2d.cc
===================================================================
--- native_client_sdk/src/libraries/ppapi_simple/ps_context_2d.cc (revision 218539)
+++ native_client_sdk/src/libraries/ppapi_simple/ps_context_2d.cc (working copy)
@@ -1,6 +1,6 @@
// Copyright 2013 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.auto
+// found in the LICENSE file.
#include <stdlib.h>
#include <string.h>
@@ -21,11 +21,11 @@
#include "ppapi_simple/ps_instance.h"
#include "ppapi_simple/ps_interface.h"
-PSContext2D_t* PSContext2DAllocate() {
+PSContext2D_t* PSContext2DAllocate(PP_ImageDataFormat format) {
PSContext2D_t* ctx = (PSContext2D_t*) malloc(sizeof(PSContext2D_t));
memset(ctx, 0, sizeof(PSContext2D_t));
- ctx->format = PSInterfaceImageData()->GetNativeImageDataFormat();
+ ctx->format = format;
return ctx;
}
@@ -41,6 +41,10 @@
free(ctx);
}
+PP_ImageDataFormat PSContext2DGetNativeImageDataFormat() {
+ return PSInterfaceImageData()->GetNativeImageDataFormat();
+}
+
// Update the 2D context if the message is appropriate, returning non-zero
// if the event was consumed.
int PSContext2DHandleEvent(PSContext2D_t* ctx, PSEvent* event) {
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_simple/ps_context_2d.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698