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

Side by Side Diff: cc/output/renderer_pixeltest.cc

Issue 61553006: Rename WebKit namespace to blink (part 5) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/output/program_binding.cc ('k') | cc/output/shader.h » ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "cc/layers/append_quads_data.h" 6 #include "cc/layers/append_quads_data.h"
7 #include "cc/output/gl_renderer.h" 7 #include "cc/output/gl_renderer.h"
8 #include "cc/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/quads/picture_draw_quad.h" 9 #include "cc/quads/picture_draw_quad.h"
10 #include "cc/quads/texture_draw_quad.h" 10 #include "cc/quads/texture_draw_quad.h"
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 EXPECT_TRUE(this->RunPixelTest( 1276 EXPECT_TRUE(this->RunPixelTest(
1277 &this->pass_list_, 1277 &this->pass_list_,
1278 PixelTest::WithOffscreenContext, 1278 PixelTest::WithOffscreenContext,
1279 base::FilePath(FILE_PATH_LITERAL("background_filter.png")), 1279 base::FilePath(FILE_PATH_LITERAL("background_filter.png")),
1280 ExactPixelComparator(true))); 1280 ExactPixelComparator(true)));
1281 } 1281 }
1282 1282
1283 class ExternalStencilPixelTest : public GLRendererPixelTest { 1283 class ExternalStencilPixelTest : public GLRendererPixelTest {
1284 protected: 1284 protected:
1285 void ClearBackgroundToGreen() { 1285 void ClearBackgroundToGreen() {
1286 WebKit::WebGraphicsContext3D* context3d = 1286 blink::WebGraphicsContext3D* context3d =
1287 output_surface_->context_provider()->Context3d(); 1287 output_surface_->context_provider()->Context3d();
1288 output_surface_->EnsureBackbuffer(); 1288 output_surface_->EnsureBackbuffer();
1289 output_surface_->Reshape(device_viewport_size_, 1); 1289 output_surface_->Reshape(device_viewport_size_, 1);
1290 context3d->clearColor(0.f, 1.f, 0.f, 1.f); 1290 context3d->clearColor(0.f, 1.f, 0.f, 1.f);
1291 context3d->clear(GL_COLOR_BUFFER_BIT); 1291 context3d->clear(GL_COLOR_BUFFER_BIT);
1292 } 1292 }
1293 1293
1294 void PopulateStencilBuffer() { 1294 void PopulateStencilBuffer() {
1295 // Set two quadrants of the stencil buffer to 1. 1295 // Set two quadrants of the stencil buffer to 1.
1296 WebKit::WebGraphicsContext3D* context3d = 1296 blink::WebGraphicsContext3D* context3d =
1297 output_surface_->context_provider()->Context3d(); 1297 output_surface_->context_provider()->Context3d();
1298 ASSERT_TRUE(context3d->getContextAttributes().stencil); 1298 ASSERT_TRUE(context3d->getContextAttributes().stencil);
1299 output_surface_->EnsureBackbuffer(); 1299 output_surface_->EnsureBackbuffer();
1300 output_surface_->Reshape(device_viewport_size_, 1); 1300 output_surface_->Reshape(device_viewport_size_, 1);
1301 context3d->clearStencil(0); 1301 context3d->clearStencil(0);
1302 context3d->clear(GL_STENCIL_BUFFER_BIT); 1302 context3d->clear(GL_STENCIL_BUFFER_BIT);
1303 context3d->enable(GL_SCISSOR_TEST); 1303 context3d->enable(GL_SCISSOR_TEST);
1304 context3d->clearStencil(1); 1304 context3d->clearStencil(1);
1305 context3d->scissor(0, 1305 context3d->scissor(0,
1306 0, 1306 0,
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
2008 EXPECT_TRUE(this->RunPixelTest( 2008 EXPECT_TRUE(this->RunPixelTest(
2009 &pass_list, 2009 &pass_list,
2010 PixelTest::NoOffscreenContext, 2010 PixelTest::NoOffscreenContext,
2011 base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")), 2011 base::FilePath(FILE_PATH_LITERAL("four_blue_green_checkers.png")),
2012 ExactPixelComparator(true))); 2012 ExactPixelComparator(true)));
2013 } 2013 }
2014 #endif // !defined(OS_ANDROID) 2014 #endif // !defined(OS_ANDROID)
2015 2015
2016 } // namespace 2016 } // namespace
2017 } // namespace cc 2017 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/program_binding.cc ('k') | cc/output/shader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698