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

Side by Side Diff: cc/test/test_web_graphics_context_3d.cc

Issue 12965007: Fix cpplint errors in cc/(animation|input|layers|trees|test)/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/trees/damage_tracker.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/test/test_web_graphics_context_3d.h" 5 #include "cc/test/test_web_graphics_context_3d.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 WGC3Denum target, WebGLId framebuffer) { 247 WGC3Denum target, WebGLId framebuffer) {
248 if (!framebuffer) 248 if (!framebuffer)
249 return; 249 return;
250 EXPECT_EQ(kFramebufferId | context_id_ << 16, framebuffer); 250 EXPECT_EQ(kFramebufferId | context_id_ << 16, framebuffer);
251 } 251 }
252 252
253 void TestWebGraphicsContext3D::bindRenderbuffer( 253 void TestWebGraphicsContext3D::bindRenderbuffer(
254 WGC3Denum target, WebGLId renderbuffer) { 254 WGC3Denum target, WebGLId renderbuffer) {
255 if (!renderbuffer) 255 if (!renderbuffer)
256 return; 256 return;
257 EXPECT_EQ(kRenderbufferId | context_id_ << 16, renderbuffer); 257 EXPECT_EQ(kRenderbufferId | context_id_ << 16, renderbuffer);
258 } 258 }
259 259
260 void TestWebGraphicsContext3D::bindTexture( 260 void TestWebGraphicsContext3D::bindTexture(
261 WGC3Denum target, WebGLId texture_id) { 261 WGC3Denum target, WebGLId texture_id) {
262 if (times_bind_texture_succeeds_ >= 0) { 262 if (times_bind_texture_succeeds_ >= 0) {
263 if (!times_bind_texture_succeeds_) { 263 if (!times_bind_texture_succeeds_) {
264 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB, 264 loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
265 GL_INNOCENT_CONTEXT_RESET_ARB); 265 GL_INNOCENT_CONTEXT_RESET_ARB);
266 } 266 }
267 --times_bind_texture_succeeds_; 267 --times_bind_texture_succeeds_;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 WebGLId TestWebGraphicsContext3D::NextTextureId() { 316 WebGLId TestWebGraphicsContext3D::NextTextureId() {
317 WebGLId texture_id = next_texture_id_++; 317 WebGLId texture_id = next_texture_id_++;
318 DCHECK(texture_id < (1 << 16)); 318 DCHECK(texture_id < (1 << 16));
319 texture_id |= context_id_ << 16; 319 texture_id |= context_id_ << 16;
320 return texture_id; 320 return texture_id;
321 } 321 }
322 322
323 } // namespace cc 323 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/scheduler_test_common.h ('k') | cc/trees/damage_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698