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/WebImage.h> | 7 #include <public/WebImage.h> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "cc/debug_border_draw_quad.h" | 10 #include "cc/debug_border_draw_quad.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res
ourceProvider, SoftwareOutputDevice* outputDevice) | 60 SoftwareRenderer::SoftwareRenderer(RendererClient* client, ResourceProvider* res
ourceProvider, SoftwareOutputDevice* outputDevice) |
61 : DirectRenderer(client, resourceProvider) | 61 : DirectRenderer(client, resourceProvider) |
62 , m_visible(true) | 62 , m_visible(true) |
63 , m_outputDevice(outputDevice) | 63 , m_outputDevice(outputDevice) |
64 , m_skCurrentCanvas(0) | 64 , m_skCurrentCanvas(0) |
65 { | 65 { |
66 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap); | 66 m_resourceProvider->setDefaultResourceType(ResourceProvider::Bitmap); |
67 | 67 |
68 m_capabilities.maxTextureSize = INT_MAX; | 68 m_capabilities.maxTextureSize = m_resourceProvider->maxTextureSize(); |
69 m_capabilities.bestTextureFormat = GL_RGBA; | 69 m_capabilities.bestTextureFormat = m_resourceProvider->bestTextureFormat(); |
70 m_capabilities.usingSetVisibility = true; | 70 m_capabilities.usingSetVisibility = true; |
71 // The updater can access bitmaps while the SoftwareRenderer is using them. | 71 // The updater can access bitmaps while the SoftwareRenderer is using them. |
72 m_capabilities.allowPartialTextureUpdates = true; | 72 m_capabilities.allowPartialTextureUpdates = true; |
73 | 73 |
74 viewportChanged(); | 74 viewportChanged(); |
75 } | 75 } |
76 | 76 |
77 SoftwareRenderer::~SoftwareRenderer() | 77 SoftwareRenderer::~SoftwareRenderer() |
78 { | 78 { |
79 } | 79 } |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 375 } |
376 | 376 |
377 void SoftwareRenderer::setVisible(bool visible) | 377 void SoftwareRenderer::setVisible(bool visible) |
378 { | 378 { |
379 if (m_visible == visible) | 379 if (m_visible == visible) |
380 return; | 380 return; |
381 m_visible = visible; | 381 m_visible = visible; |
382 } | 382 } |
383 | 383 |
384 } // namespace cc | 384 } // namespace cc |
OLD | NEW |