OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "gpu/command_buffer/common/capabilities.h" | 5 #include "gpu/command_buffer/common/capabilities.h" |
6 #include "platform/RuntimeEnabledFeatures.h" | 6 #include "platform/RuntimeEnabledFeatures.h" |
7 #include "platform/graphics/CanvasColorParams.h" | 7 #include "platform/graphics/CanvasColorParams.h" |
8 #include "platform/graphics/gpu/DrawingBuffer.h" | 8 #include "platform/graphics/gpu/DrawingBuffer.h" |
9 #include "platform/graphics/gpu/Extensions3DUtil.h" | 9 #include "platform/graphics/gpu/Extensions3DUtil.h" |
10 #include "public/platform/WebGraphicsContext3DProvider.h" | 10 #include "public/platform/WebGraphicsContext3DProvider.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 Extensions3DUtil::Create(context_provider->ContextGL()); | 378 Extensions3DUtil::Create(context_provider->ContextGL()); |
379 RefPtr<DrawingBufferForTests> drawing_buffer = | 379 RefPtr<DrawingBufferForTests> drawing_buffer = |
380 AdoptRef(new DrawingBufferForTests(std::move(context_provider), | 380 AdoptRef(new DrawingBufferForTests(std::move(context_provider), |
381 std::move(extensions_util), client, | 381 std::move(extensions_util), client, |
382 preserve)); | 382 preserve)); |
383 if (!drawing_buffer->Initialize( | 383 if (!drawing_buffer->Initialize( |
384 size, use_multisampling != kDisableMultisampling)) { | 384 size, use_multisampling != kDisableMultisampling)) { |
385 drawing_buffer->BeginDestruction(); | 385 drawing_buffer->BeginDestruction(); |
386 return nullptr; | 386 return nullptr; |
387 } | 387 } |
388 return drawing_buffer.Release(); | 388 return drawing_buffer; |
389 } | 389 } |
390 | 390 |
391 DrawingBufferForTests( | 391 DrawingBufferForTests( |
392 std::unique_ptr<WebGraphicsContext3DProvider> context_provider, | 392 std::unique_ptr<WebGraphicsContext3DProvider> context_provider, |
393 std::unique_ptr<Extensions3DUtil> extensions_util, | 393 std::unique_ptr<Extensions3DUtil> extensions_util, |
394 DrawingBuffer::Client* client, | 394 DrawingBuffer::Client* client, |
395 PreserveDrawingBuffer preserve) | 395 PreserveDrawingBuffer preserve) |
396 : DrawingBuffer( | 396 : DrawingBuffer( |
397 std::move(context_provider), | 397 std::move(context_provider), |
398 std::move(extensions_util), | 398 std::move(extensions_util), |
(...skipping 17 matching lines...) Expand all Loading... |
416 GLES2InterfaceForTests* ContextGLForTests() { | 416 GLES2InterfaceForTests* ContextGLForTests() { |
417 return static_cast<GLES2InterfaceForTests*>(ContextGL()); | 417 return static_cast<GLES2InterfaceForTests*>(ContextGL()); |
418 } | 418 } |
419 | 419 |
420 bool* live_; | 420 bool* live_; |
421 | 421 |
422 int RecycledBitmapCount() { return recycled_bitmaps_.size(); } | 422 int RecycledBitmapCount() { return recycled_bitmaps_.size(); } |
423 }; | 423 }; |
424 | 424 |
425 } // blink | 425 } // blink |
OLD | NEW |