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

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

Issue 2870253004: Remove |highp_threshold_min| from GLRenderer() (Closed)
Patch Set: Created 3 years, 7 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 | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_unittest.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 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 "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 ::testing::ValuesIn(kBlendModeList), 367 ::testing::ValuesIn(kBlendModeList),
368 ::testing::Bool())); 368 ::testing::Bool()));
369 369
370 #endif 370 #endif
371 371
372 class FakeRendererGL : public GLRenderer { 372 class FakeRendererGL : public GLRenderer {
373 public: 373 public:
374 FakeRendererGL(const RendererSettings* settings, 374 FakeRendererGL(const RendererSettings* settings,
375 OutputSurface* output_surface, 375 OutputSurface* output_surface,
376 ResourceProvider* resource_provider) 376 ResourceProvider* resource_provider)
377 : GLRenderer(settings, output_surface, resource_provider, nullptr, 0) {} 377 : GLRenderer(settings, output_surface, resource_provider, nullptr) {}
378 378
379 FakeRendererGL(const RendererSettings* settings, 379 FakeRendererGL(const RendererSettings* settings,
380 OutputSurface* output_surface, 380 OutputSurface* output_surface,
381 ResourceProvider* resource_provider, 381 ResourceProvider* resource_provider,
382 TextureMailboxDeleter* texture_mailbox_deleter) 382 TextureMailboxDeleter* texture_mailbox_deleter)
383 : GLRenderer(settings, 383 : GLRenderer(settings,
384 output_surface, 384 output_surface,
385 resource_provider, 385 resource_provider,
386 texture_mailbox_deleter, 386 texture_mailbox_deleter) {}
387 0) {}
388 387
389 void SetOverlayProcessor(OverlayProcessor* processor) { 388 void SetOverlayProcessor(OverlayProcessor* processor) {
390 overlay_processor_.reset(processor); 389 overlay_processor_.reset(processor);
391 } 390 }
392 391
393 // GLRenderer methods. 392 // GLRenderer methods.
394 393
395 // Changing visibility to public. 394 // Changing visibility to public.
396 using GLRenderer::DoDrawQuad; 395 using GLRenderer::DoDrawQuad;
397 using GLRenderer::BeginDrawingFrame; 396 using GLRenderer::BeginDrawingFrame;
(...skipping 1826 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 void SetUp() override { 2223 void SetUp() override {
2225 auto context_support = base::MakeUnique<MockContextSupport>(); 2224 auto context_support = base::MakeUnique<MockContextSupport>();
2226 context_support_ptr_ = context_support.get(); 2225 context_support_ptr_ = context_support.get();
2227 auto context_provider = TestContextProvider::Create( 2226 auto context_provider = TestContextProvider::Create(
2228 TestWebGraphicsContext3D::Create(), std::move(context_support)); 2227 TestWebGraphicsContext3D::Create(), std::move(context_support));
2229 context_provider->BindToCurrentThread(); 2228 context_provider->BindToCurrentThread();
2230 output_surface_ = FakeOutputSurface::Create3d(std::move(context_provider)); 2229 output_surface_ = FakeOutputSurface::Create3d(std::move(context_provider));
2231 output_surface_->BindToClient(&output_surface_client_); 2230 output_surface_->BindToClient(&output_surface_client_);
2232 resource_provider_ = FakeResourceProvider::Create( 2231 resource_provider_ = FakeResourceProvider::Create(
2233 output_surface_->context_provider(), nullptr); 2232 output_surface_->context_provider(), nullptr);
2234 renderer_ = 2233 renderer_ = base::MakeUnique<GLRenderer>(&settings_, output_surface_.get(),
2235 base::MakeUnique<GLRenderer>(&settings_, output_surface_.get(), 2234 resource_provider_.get(), nullptr);
2236 resource_provider_.get(), nullptr, 0);
2237 renderer_->Initialize(); 2235 renderer_->Initialize();
2238 } 2236 }
2239 2237
2240 RendererSettings settings_; 2238 RendererSettings settings_;
2241 FakeOutputSurfaceClient output_surface_client_; 2239 FakeOutputSurfaceClient output_surface_client_;
2242 MockContextSupport* context_support_ptr_; 2240 MockContextSupport* context_support_ptr_;
2243 std::unique_ptr<OutputSurface> output_surface_; 2241 std::unique_ptr<OutputSurface> output_surface_;
2244 std::unique_ptr<ResourceProvider> resource_provider_; 2242 std::unique_ptr<ResourceProvider> resource_provider_;
2245 std::unique_ptr<GLRenderer> renderer_; 2243 std::unique_ptr<GLRenderer> renderer_;
2246 }; 2244 };
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
2351 2349
2352 TEST_F(GLRendererSwapWithBoundsTest, NonEmpty) { 2350 TEST_F(GLRendererSwapWithBoundsTest, NonEmpty) {
2353 std::vector<gfx::Rect> content_bounds; 2351 std::vector<gfx::Rect> content_bounds;
2354 content_bounds.push_back(gfx::Rect(0, 0, 10, 10)); 2352 content_bounds.push_back(gfx::Rect(0, 0, 10, 10));
2355 content_bounds.push_back(gfx::Rect(20, 20, 30, 30)); 2353 content_bounds.push_back(gfx::Rect(20, 20, 30, 30));
2356 RunTest(content_bounds); 2354 RunTest(content_bounds);
2357 } 2355 }
2358 2356
2359 } // namespace 2357 } // namespace
2360 } // namespace cc 2358 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698