| OLD | NEW |
| 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/software_renderer.h" | 5 #include "cc/software_renderer.h" |
| 6 | 6 |
| 7 #include <public/WebCompositorSoftwareOutputDevice.h> | 7 #include <public/WebCompositorSoftwareOutputDevice.h> |
| 8 #include <public/WebImage.h> | 8 #include <public/WebImage.h> |
| 9 #include <public/WebSize.h> | 9 #include <public/WebSize.h> |
| 10 | 10 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res
ourceProvider, WebCompositorSoftwareOutputDevice* outputDevice) | 64 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res
ourceProvider, WebCompositorSoftwareOutputDevice* outputDevice) |
| 65 : DirectRenderer(client, resourceProvider) | 65 : DirectRenderer(client, resourceProvider) |
| 66 , m_visible(true) | 66 , m_visible(true) |
| 67 , m_outputDevice(outputDevice) | 67 , m_outputDevice(outputDevice) |
| 68 , m_skCurrentCanvas(0) | 68 , m_skCurrentCanvas(0) |
| 69 { | 69 { |
| 70 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap); | 70 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap); |
| 71 | 71 |
| 72 m_capabilities.maxTextureSize = INT_MAX; | 72 m_capabilities.maxTextureSize = INT_MAX; |
| 73 m_capabilities.bestTextureFormat = GL_RGBA; | 73 m_capabilities.bestTextureFormat = GL_RGBA; |
| 74 m_capabilities.contextHasCachedFrontBuffer = true; |
| 74 m_capabilities.usingSetVisibility = true; | 75 m_capabilities.usingSetVisibility = true; |
| 75 // The updater can access bitmaps while the SoftwareRenderer is using them. | 76 // The updater can access bitmaps while the SoftwareRenderer is using them. |
| 76 m_capabilities.allowPartialTextureUpdates = true; | 77 m_capabilities.allowPartialTextureUpdates = true; |
| 77 | 78 |
| 78 viewportChanged(); | 79 viewportChanged(); |
| 79 } | 80 } |
| 80 | 81 |
| 81 SoftwareRenderer::~SoftwareRenderer() | 82 SoftwareRenderer::~SoftwareRenderer() |
| 82 { | 83 { |
| 83 } | 84 } |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 } | 380 } |
| 380 | 381 |
| 381 void SoftwareRenderer::setVisible(bool visible) | 382 void SoftwareRenderer::setVisible(bool visible) |
| 382 { | 383 { |
| 383 if (m_visible == visible) | 384 if (m_visible == visible) |
| 384 return; | 385 return; |
| 385 m_visible = visible; | 386 m_visible = visible; |
| 386 } | 387 } |
| 387 | 388 |
| 388 } // namespace cc | 389 } // namespace cc |
| OLD | NEW |