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

Unified Diff: app/surface/transport_dib_win.cc

Issue 6665029: Adds a TransportDIB::Id value that is explicitly invalid and use it when compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mebbe this one compiles? Created 9 years, 9 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
Index: app/surface/transport_dib_win.cc
diff --git a/app/surface/transport_dib_win.cc b/app/surface/transport_dib_win.cc
index 22812c9d8400a29448209e5cd4981eaff4b09713..3de7fab4dad0a51ca1c03153115e89ae07a1bed3 100644
--- a/app/surface/transport_dib_win.cc
+++ b/app/surface/transport_dib_win.cc
@@ -56,10 +56,15 @@ TransportDIB* TransportDIB::CreateWithHandle(Handle handle) {
}
// static
-bool TransportDIB::is_valid(Handle dib) {
+bool TransportDIB::is_valid_handle(Handle dib) {
return dib != NULL;
}
+// static
+bool TransportDIB::is_valid_id(TransportDIB::Id id) {
+ return is_valid_handle(id.handle);
+}
+
skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
// This DIB already mapped the file into this process, but PlatformCanvas
// will map it again.
@@ -72,7 +77,7 @@ skia::PlatformCanvas* TransportDIB::GetPlatformCanvas(int w, int h) {
}
bool TransportDIB::Map() {
- if (!is_valid(handle()))
+ if (!is_valid_handle(handle()))
return false;
if (memory())
return true;

Powered by Google App Engine
This is Rietveld 408576698