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

Side by Side Diff: webkit/glue/plugins/pepper_device_context_2d.cc

Issue 3014034: Linux: Fix some NULL versus 0 issues to appease gcc-4.5. (Closed)
Patch Set: Created 10 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 unified diff | Download patch
« no previous file with comments | « webkit/glue/plugins/pepper_buffer.cc ('k') | webkit/glue/plugins/pepper_font.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/plugins/pepper_device_context_2d.h" 5 #include "webkit/glue/plugins/pepper_device_context_2d.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 rect->size.width, rect->size.height); 61 rect->size.width, rect->size.height);
62 } 62 }
63 return true; 63 return true;
64 } 64 }
65 65
66 PP_Resource Create(PP_Module module_id, 66 PP_Resource Create(PP_Module module_id,
67 const PP_Size* size, 67 const PP_Size* size,
68 bool is_always_opaque) { 68 bool is_always_opaque) {
69 PluginModule* module = PluginModule::FromPPModule(module_id); 69 PluginModule* module = PluginModule::FromPPModule(module_id);
70 if (!module) 70 if (!module)
71 return NULL; 71 return 0;
72 72
73 scoped_refptr<DeviceContext2D> context(new DeviceContext2D(module)); 73 scoped_refptr<DeviceContext2D> context(new DeviceContext2D(module));
74 if (!context->Init(size->width, size->height, is_always_opaque)) 74 if (!context->Init(size->width, size->height, is_always_opaque))
75 return NULL; 75 return 0;
76 return context->GetReference(); 76 return context->GetReference();
77 } 77 }
78 78
79 bool IsDeviceContext2D(PP_Resource resource) { 79 bool IsDeviceContext2D(PP_Resource resource) {
80 return !!Resource::GetAs<DeviceContext2D>(resource); 80 return !!Resource::GetAs<DeviceContext2D>(resource);
81 } 81 }
82 82
83 bool Describe(PP_Resource device_context, 83 bool Describe(PP_Resource device_context,
84 PP_Size* size, 84 PP_Size* size,
85 bool* is_always_opaque) { 85 bool* is_always_opaque) {
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 data.Execute(PP_OK); 544 data.Execute(PP_OK);
545 } 545 }
546 546
547 bool DeviceContext2D::HasPendingFlush() const { 547 bool DeviceContext2D::HasPendingFlush() const {
548 return !unpainted_flush_callback_.is_null() || 548 return !unpainted_flush_callback_.is_null() ||
549 !painted_flush_callback_.is_null() || 549 !painted_flush_callback_.is_null() ||
550 offscreen_flush_pending_; 550 offscreen_flush_pending_;
551 } 551 }
552 552
553 } // namespace pepper 553 } // namespace pepper
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_buffer.cc ('k') | webkit/glue/plugins/pepper_font.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698