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

Unified Diff: ppapi/cpp/image_data.h

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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 | « ppapi/cpp/graphics_3d_client.cc ('k') | ppapi/cpp/image_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/image_data.h
diff --git a/ppapi/cpp/image_data.h b/ppapi/cpp/image_data.h
index 1e6def882a9aae8e6b2dc5166dee969536fabbfd..7822188b219a9465a7059a9604a30294c8ed783c 100644
--- a/ppapi/cpp/image_data.h
+++ b/ppapi/cpp/image_data.h
@@ -10,13 +10,12 @@
#include "ppapi/cpp/size.h"
#include "ppapi/cpp/resource.h"
-
/// @file
/// This file defines the APIs for determining how a browser
/// handles image data.
namespace pp {
-class Instance;
+class InstanceHandle;
class ImageData : public Resource {
public:
@@ -24,10 +23,6 @@ class ImageData : public Resource {
/// object.
ImageData();
- /// A special structure used by the constructor that does not increment the
- /// reference count of the underlying Image resource.
- struct PassRef {};
-
/// A constructor used when you have received a <code>PP_Resource</code> as a
/// return value that has already been reference counted.
///
@@ -45,8 +40,8 @@ class ImageData : public Resource {
/// with the provided parameters. The resulting object will be is_null() if
/// the allocation failed.
///
- /// @param[in] instance A <code>PP_Instance</code> identifying one instance
- /// of a module.
+ /// @param[in] instance The instance with which this resource will be
+ /// associated.
///
/// @param[in] format A PP_ImageDataFormat containing desired image format.
/// PP_ImageDataFormat is an enumeration of the different types of
@@ -62,7 +57,7 @@ class ImageData : public Resource {
/// initialized to transparent during the creation process. If this flag is
/// not set, the current contents of the bitmap will be undefined, and the
/// module should be sure to set all the pixels.
- ImageData(Instance* instance,
+ ImageData(const InstanceHandle& instance,
PP_ImageDataFormat format,
const Size& size,
bool init_to_zero);
@@ -123,7 +118,7 @@ class ImageData : public Resource {
uint32_t* GetAddr32(const Point& coord);
private:
- void PassRefAndInitData(PP_Resource resource);
+ void InitData();
PP_ImageDataDesc desc_;
void* data_;
« no previous file with comments | « ppapi/cpp/graphics_3d_client.cc ('k') | ppapi/cpp/image_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698