Index: experimental/flocking_geese/nacl_app/scoped_pixel_lock.h |
diff --git a/experimental/flocking_geese/nacl_app/scoped_pixel_lock.h b/experimental/flocking_geese/nacl_app/scoped_pixel_lock.h |
deleted file mode 100644 |
index 46918dd0c493f1c5d8c219948dcc3670fd4fe2fa..0000000000000000000000000000000000000000 |
--- a/experimental/flocking_geese/nacl_app/scoped_pixel_lock.h |
+++ /dev/null |
@@ -1,44 +0,0 @@ |
-// Copyright (c) 2011 The Native Client Authors. All rights reserved. |
-// Use of this source code is governed by a BSD-style license that can be |
-// found in the LICENSE file. |
- |
-#ifndef SCOPED_PIXEL_LOCK_H_ |
-#define SCOPED_PIXEL_LOCK_H_ |
- |
-#include <tr1/memory> |
-#include "nacl_app/locking_image_data.h" |
- |
-namespace flocking_geese { |
- |
-// A small helper RAII class used to acquire and release the pixel lock based |
-// on C++ scoping rules. |
-class ScopedPixelLock { |
- public: |
- explicit ScopedPixelLock( |
- const std::tr1::shared_ptr<LockingImageData>& pixel_owner) |
- : pixel_owner_(pixel_owner) { |
- pixels_ = pixel_owner_ == NULL ? NULL : pixel_owner->LockPixels(); |
- } |
- |
- ~ScopedPixelLock() { |
- pixels_ = NULL; |
- if (pixel_owner_ != NULL) |
- pixel_owner_->UnlockPixels(); |
- } |
- |
- bool is_valid() const { |
- return pixels_ != NULL; |
- } |
- |
- uint32_t* pixels() const { |
- return pixels_; |
- } |
- |
- private: |
- std::tr1::shared_ptr<LockingImageData> pixel_owner_; |
- uint32_t* pixels_; // Weak reference. |
-}; |
-} // namespace flocking_geese |
- |
-#endif // SCOPED_PIXEL_LOCK_H_ |
- |