OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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 <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bitmap_(bitmap), | 88 bitmap_(bitmap), |
89 content_rect_(content_rect), | 89 content_rect_(content_rect), |
90 contents_scale_(contents_scale) { | 90 contents_scale_(contents_scale) { |
91 DCHECK(picture_pile_); | 91 DCHECK(picture_pile_); |
92 DCHECK(bitmap_); | 92 DCHECK(bitmap_); |
93 } | 93 } |
94 | 94 |
95 // Overridden from internal::Task: | 95 // Overridden from internal::Task: |
96 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE { | 96 virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE { |
97 TRACE_EVENT0("cc", "OnDemandRasterTaskImpl::RunOnWorkerThread"); | 97 TRACE_EVENT0("cc", "OnDemandRasterTaskImpl::RunOnWorkerThread"); |
98 SkCanvas canvas(*bitmap_); | 98 SkBitmapDevice device(*bitmap_); |
| 99 SkCanvas canvas(&device); |
99 picture_pile_->RasterToBitmap( | 100 picture_pile_->RasterToBitmap( |
100 &canvas, content_rect_, contents_scale_, NULL); | 101 &canvas, content_rect_, contents_scale_, NULL); |
101 } | 102 } |
102 | 103 |
103 protected: | 104 protected: |
104 virtual ~OnDemandRasterTaskImpl() {} | 105 virtual ~OnDemandRasterTaskImpl() {} |
105 | 106 |
106 private: | 107 private: |
107 PicturePileImpl* picture_pile_; | 108 PicturePileImpl* picture_pile_; |
108 SkBitmap* bitmap_; | 109 SkBitmap* bitmap_; |
(...skipping 2927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3036 is_scissor_enabled_ = false; | 3037 is_scissor_enabled_ = false; |
3037 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); | 3038 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); |
3038 scissor_rect_needs_reset_ = true; | 3039 scissor_rect_needs_reset_ = true; |
3039 } | 3040 } |
3040 | 3041 |
3041 bool GLRenderer::IsContextLost() { | 3042 bool GLRenderer::IsContextLost() { |
3042 return output_surface_->context_provider()->IsContextLost(); | 3043 return output_surface_->context_provider()->IsContextLost(); |
3043 } | 3044 } |
3044 | 3045 |
3045 } // namespace cc | 3046 } // namespace cc |
OLD | NEW |