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

Unified Diff: experimental/conways_life/scoped_pixel_lock.h

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 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 | « experimental/conways_life/scons.bat ('k') | experimental/conways_life/scripting/callback.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/conways_life/scoped_pixel_lock.h
diff --git a/experimental/conways_life/scoped_pixel_lock.h b/experimental/conways_life/scoped_pixel_lock.h
deleted file mode 100644
index 4429bb3321dbcb53808915cb7152e6d44c58b9d5..0000000000000000000000000000000000000000
--- a/experimental/conways_life/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 "experimental/conways_life/locking_image_data.h"
-
-namespace life {
-
-// 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 life
-
-#endif // SCOPED_PIXEL_LOCK_H_
-
« no previous file with comments | « experimental/conways_life/scons.bat ('k') | experimental/conways_life/scripting/callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698