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

Unified Diff: content/renderer/gpu/compositor_software_output_device.cc

Issue 372093002: Fixes for re-enabling more MSVC level 4 warnings: content/renderer/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment Created 6 years, 5 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 | « content/renderer/gpu/compositor_software_output_device.h ('k') | content/renderer/history_serialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/compositor_software_output_device.cc
diff --git a/content/renderer/gpu/compositor_software_output_device.cc b/content/renderer/gpu/compositor_software_output_device.cc
index b7718fc8064dd73c0b9aebe70a28423956ebf7d2..c7470753c3f0fe4feb0329e222adccdd154c31ba 100644
--- a/content/renderer/gpu/compositor_software_output_device.cc
+++ b/content/renderer/gpu/compositor_software_output_device.cc
@@ -15,6 +15,12 @@
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/skia_util.h"
+namespace {
+
+const size_t kInvalidIndex = static_cast<size_t>(-1);
+
+} // namespace
+
namespace content {
CompositorSoftwareOutputDevice::Buffer::Buffer(
@@ -56,7 +62,7 @@ bool CompositorSoftwareOutputDevice::Buffer::FindDamageDifferenceFrom(
}
CompositorSoftwareOutputDevice::CompositorSoftwareOutputDevice()
- : current_index_(-1),
+ : current_index_(kInvalidIndex),
next_buffer_id_(1),
shared_bitmap_manager_(
RenderThreadImpl::current()->shared_bitmap_manager()) {
@@ -113,7 +119,7 @@ void CompositorSoftwareOutputDevice::Resize(
}
buffers_.clear();
- current_index_ = -1;
+ current_index_ = kInvalidIndex;
viewport_pixel_size_ = viewport_pixel_size;
}
@@ -126,7 +132,7 @@ void CompositorSoftwareOutputDevice::DiscardBackbuffer() {
}
}
buffers_.clear();
- current_index_ = -1;
+ current_index_ = kInvalidIndex;
}
void CompositorSoftwareOutputDevice::EnsureBackbuffer() {
@@ -137,7 +143,7 @@ SkCanvas* CompositorSoftwareOutputDevice::BeginPaint(
DCHECK(CalledOnValidThread());
Buffer* previous = NULL;
- if (current_index_ != size_t(-1))
+ if (current_index_ != kInvalidIndex)
previous = buffers_[current_index_];
current_index_ = FindFreeBuffer(current_index_ + 1);
Buffer* current = buffers_[current_index_];
« no previous file with comments | « content/renderer/gpu/compositor_software_output_device.h ('k') | content/renderer/history_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698